[jboss-user] [JBoss Seam] - Re: selectManyCheckbox

pete.muir@jboss.org do-not-reply at jboss.com
Tue Jul 31 14:16:00 EDT 2007


Yeah, I know the exact problem, in fact, its a oft discussed topic when using hibernate.  There is something on the SeamProblemsFAQ about this (but not coming from your angle, I will update).

When you load the same entity twice from the same persistence context the same object is returned.  If you load the same entity from two different persistence contexts a different object is returned, so they don't have "object equality".  So, if you load and select everything using the same PC you are home and dry not implementing .equals (look at the hibernate website for an in depth discussion of this, and why we don't recommend this), but if you don't...

We should really document this much better as it comes up time and time again...

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069308#4069308

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069308



More information about the jboss-user mailing list