[jboss-user] [JBossCache] - Re: JBoss Cache (PojoCache) with Hibernate Collections (Pers
nniv
do-not-reply at jboss.com
Wed Sep 20 08:44:04 EDT 2006
The simple way to overcome the Hibernate collections' problem is to copy the contents of the collection in your object to a standard Java collection property before putting the object in the cache (e.g., in each setter method which Hibernate uses, replace the incoming Hibernate collection with a Java collection and store it in your object).
Be aware that if you return the Java collection on the object's getter methods (which Hibernate uses), it makes the collection property "dirty" from Hibernate perspective, so the copied collections will probably be written back to the DB...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972913#3972913
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972913
More information about the jboss-user
mailing list