cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: Context question
Date Fri, 15 Oct 2010 08:53:07 GMT

On Oct 15, 2010, at 11:24 AM, Andrey Razumovsky wrote:

> The reason of 2) is that Cayenne uses caching of data objects, which greatly
> increases performance. So object is basically the same. You can "refresh"
> the cache using RefreshQuery.

No actually the reason for this is not caching, but the fact that ObjectContext is an isolated
view of an object sugbgraph, which can contain only 1 instance of any given object ("uniquing").
So a select that fetches data for the object already in the context will update that object
(instead of creating a second copy). On the other hand if such object is modified locally
in the context, select will not revert user modification (as an opposite behavior would have
been really evil). 


View raw message