FAQ

This leaves me wondering. Does this mean I can have two objects that map to the same database record, one in the individual object cache and one in the query result cache?
No. The DataObject uniquing is guaranteed per ObjectContext by Cayenne regardless of the caching.
Phew :-)

I have a few more questions if you don't mind. These aren't as important as the above one, I'm just checking how inaccurate my mental model of Cayenne is. So even a response of "you're asking the wrong questions" might be helpful.

Here goes:

Do both caches contain just persistent objects?
Things I can imagine for the query cache:
- Scalar results, such as the result from a SELECT COUNT(*)
- Prepared queries (I guess it's actually associated with the ObjectContext)
- Result sets, scrollable ones in particular (probably in ObjectContext, too)

If both caches contain persistent objects: from the answer above I conclude that the same object can be in both caches.
If an object is culled from one of the caches, is it removed from the other as well, or is it kept?

Regards,
Jo

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
groupuser @
categoriescayenne
postedAug 18, '11 at 10:59a
activeAug 18, '11 at 11:22a
posts3
users2
websitecayenne.apache.org

People

Translate

site design / logo © 2022 Grokbase