cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre Gilquin" <pgilq...@bluewin.ch>
Subject Re: Child context for Web App
Date Sat, 22 Mar 2008 06:59:27 GMT
Thanks Andrey,



I am using what you propose for getting child context at session level
chidContext= globalContext.createChildDataContext();. But I dont understand your sentence
:
>> it  collapses to just calling one method.

Do you mean using localObject to get object in globalContext ?

objectInGlobalContext = (XXX) globalContext.localObject(myObjectInLocalContext.getObjectId(),myObjectInLocalContext);


Thanks again for your help



Pierre


----- Original Message ----- 
From: "Razumovsky Andrey" <hmail@hotmail.ru>
To: <user@cayenne.apache.org>
Sent: Friday, March 21, 2008 11:23 AM
Subject: Re: Child context for Web App


> Hi Pierre!
>
> When you use nested contexts (http://cayenne.apache.org/doc/nested-datacontexts.html),
you don't need to manually copy 
> objects between contexts, it collapses to just calling one method. I think that's exactly
what you need.
>
> Manually calling setObjectContext (and even worse, deprecated setDataContext), by my
experience, usually results in 
> errors since Cayenne's internal object graph isn't properly updated.
>
> Andrey 


Mime
View raw message