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).
Andrus