[baseten-users] BaseTen 1.6.1 just released

Tuukka Norri tuukka.norri at karppinen.fi
Mon Mar 30 23:32:37 EEST 2009


Hi!

Jianhua Meng kirjoitti 30.3.2009 kello 22.50:
> This code has worked fine on my own machine and won't work on other  
> machines I tried. The difference between mine and others is that the  
> I have the latest schema whereas the other machines don't have the  
> latest schema. Would the difference explain for this particular error?
It looks like BaseTen thinks that the entity hasn't been BaseTen  
enabled. Can you confirm this?
There weren't have any schema changes between 1.6 and 1.6.1, so that  
shouldn't be the cause.

> What does "doesn't have relationship capability" mean? What would be  
> likely cause?
BaseTen enabling makes two features available, namely determining  
relationships between tables and views and receiving changes from  
other clients. It made more sense to treat these as capabilities that  
entities might have, but they haven't been documented very well.

> Another question: suppose I have two database contexts, contextA and  
> contextB and the both contain the same underlying Person object.  
> Suppose I changed the Person object via contextB. What's the best  
> way to refresh the same object in contextA? In general what is the  
> mechanism in baseten to refresh the contents of contextA? Is the  
> synchronization automatic?  At some point, I'll need to use multiple  
> database contexts to manage complex operations. Having a good  
> understanding of how multiple contexts work will help my design.
The synchronization should happen automatically. When rows are changed  
using BaseTen or any other client, Postgres sends a notification. The  
notification's name contains the changed relation's oid. Other BaseTen  
clients that have subscribed to the notification fetch new rows from  
BaseTen's tables to determine, what the change was. Then they create a  
new faulted object, fault an existing object or mark an object  
deleted. The fault may be subsequently fired, as existing views or  
automatically-updating collections need to access the object's values.  
This should be the case even with two database contexts in the same  
application as they don't have any special means of communicating with  
each other.

We should probably add something like this to the documentation.
-- 
Best regards,
Tuukka Norri
MK&C
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basetenframework.org/pipermail/baseten-users/attachments/20090330/2c2d0976/attachment.htm>


More information about the baseten-users mailing list