[baseten-users] BaseTen 1.6.1 just released

Jianhua Meng jh_meng at mac.com
Mon Mar 30 23:54:23 EEST 2009


Thanks Tuukki for such quick response. Much appreciated.

On Mar 30, 2009, at 1:32 PM, Tuukka Norri wrote:

> 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 "BaseTen enabled" mean? I thought doing the following  
"enables" the entities:
> - (void)primeEntities
> {
> 	NSError *error = nil;
> 	NSDictionary *allEntities = [[self databaseContext]  
> entitiesBySchemaAndName:NO error:&error];
> 	if (error == nil) {
> 		NSDictionary *entities = [allEntities objectForKey: 
> [QCXManagedObject schemaName]];
> 		NSArray *entityNames = [entities allKeys];
> 		for (NSString *entityName in entityNames) {
> 			BXEntityDescription *entityDesc = [entities  
> objectForKey:entityName];
> 			Class entityClass = NSClassFromString([NSString  
> stringWithFormat:@"QCX%@", entityName]);
> 			[entityDesc setDatabaseObjectClass:entityClass];
> 		}
> 	}
> }
I'm missing something. Please enlighten me. What does it take to  
enable an entity.

>
>> 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.
It would be nice to have more documentation. But I understand it takes  
a lot of time. At this stage getting to baseten to perform well is  
more important than documentation. For baseten to have greater  
adoption, good documentation would go a long way. I emphasize you have  
been very responsive to my inquiry, which compensates for the state of  
documentation.
> -- 
> Best regards,
> Tuukka Norri
> MK&C
> _______________________________________________
> baseten-users mailing list
> baseten-users at lists.basetenframework.org
> http://lists.basetenframework.org/mailman/listinfo/baseten-users

Regards,
Jianhua Meng






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basetenframework.org/pipermail/baseten-users/attachments/20090330/d5dd7d8e/attachment-0001.htm>


More information about the baseten-users mailing list