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

Reply via email to