On Jan 24, 2011, at 1:04 PM, Bruno René Santos wrote: > So the best way to do this is to keep my shared DataContext for reading and > when I need to change something I create a new DataContext, pass the object > read to this new context (using for instants an ObjectIdQuery) and commit on > this new Context.
Correct. Or you can use ObjectContext.localObject(object.getObjectId(), null) to get a copy of an object in another context. > To refresh the read-only Context with the changes I will need to perform a > new query? Actually Cayenne should refresh it for you after peer context commit. Andrus