Right, this is necessary to handle the possibility of concurrent inserts
in diff transactions. 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Matthew Mastracci
Sent: Thursday, 29 September 2005 11:24 PM
To: hibernate-devel@lists.sourceforge.net
Subject: [Hibernate] Collections evicted from cache for update/recreate

I'm looking at code from both Hibernate 3.1 and the latest NHibernate
code and they seem to share a behaviour that I'm curious about.  I think
it has a rational explanation, but I'm unable to discover what it is.

Hibernate seems to evict a collection from the cache whenever an update
is made to the collection.  What I find strange, however, is that it
doesn't update the collection in the cache with the new contents of the
collection while it has it available.

The end result of this is that any collection modified during one
session will be read from the database during a second session, no
matter what the cache settings would be.

Is there any reason that the collection actions couldn't update the
cache with the new collection instead of doing a full eviction?  I'll
admit that my understanding of the caching model of Hibernate is still
young and I might have overlooked something completely obvious.

Thanks,
Matt.



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads,
discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to