Re: Re[2]: Child context for Web App

2008-03-24 Thread Pierre Gilquin
your help. Pierre - Original Message - From: "Razumovsky Andrey" <[EMAIL PROTECTED]> To: Sent: Sunday, March 23, 2008 11:01 AM Subject: Re: Re[2]: Child context for Web App Hi again, Pierre! I think i finally understood your problem, forget all i said about nested

Re: Re[2]: Child context for Web App

2008-03-23 Thread Pierre Gilquin
ndrey" <[EMAIL PROTECTED]> To: Sent: Sunday, March 23, 2008 11:01 AM Subject: Re: Re[2]: Child context for Web App Hi again, Pierre! I think i finally understood your problem, forget all i said about nested contexts :) PG> It seems to me that if you want to make relations between obj

Re: Re[2]: Child context for Web App

2008-03-23 Thread Razumovsky Andrey
Hi again, Pierre! I think i finally understood your problem, forget all i said about nested contexts :) PG> It seems to me that if you want to make relations between objects, they have to be in the same context. Not 100% sure, but i think so. For workaround, you need that localObject() method.

Re: Re[2]: Child context for Web App

2008-03-23 Thread Pierre Gilquin
I haven't actually ever used the 'localObject' method. I mean you can work with nested context the same way as with parent (global) one, i.e: It seems to me that if you want to make relations between objects, they have to be in the same context. My idea is to have my list of objects in the pa

Re[2]: Child context for Web App

2008-03-22 Thread Razumovsky Andrey
Hi Pierre, I haven't actually ever used the 'localObject' method. I mean you can work with nested context the same way as with parent (global) one, i.e: DataContext context = DataContext.createDataContext(); DataContext nested = context.createChildDataContext(); Dicrow d = (Dicrow)nested.newObj

Re: Child context for Web App

2008-03-22 Thread Pierre Gilquin
e: 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

Re: Child context for Web App

2008-03-21 Thread Razumovsky Andrey
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, deprecat

Child context for Web App

2008-03-21 Thread Pierre Gilquin
Hi, I plan to have a list of DataObject in my application. At init, the list is loaded with the global DataContext associated with application level. At the session level, I will have a child DataContext so that objects can be created/updated/deleted without interfering with others sessions u