cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc A. Donis" <m...@runbox.com>
Subject Cayenne 2.0: obtaining a shared DataContext
Date Sat, 27 Oct 2007 19:25:20 GMT
Hi,

Long time EOF user, new to Cayenne.

I would like to keep my read-only reference data in a shared DataContext, so 
that I don't have to save a copy of the reference CayenneDataObjects in each 
user's own DataContext.  I've tried fetching my ref data into a DataContext 
created with:

DataContext.createDataContext(true);

but that didn't seem to do the trick.  I get an exception indicating that I 
am not allowed to create a reference between objects in two different 
DataContexts.  Clearly, this is true... unless one of the DataContexts is a 
shared DataContext (at least, that's how it works in EOF).
What is the right way to obtain a shared DataContext?  Or am I going about 
this all wrong?

tia,
Marc


Mime
View raw message