[hibernate-dev] Missing setLoadedPersister() and this.loadedKey = loadedKey in CollectionEntry constructor ?

Emmanuel Bernard emmanuel at hibernate.org
Mon Jan 4 06:18:23 EST 2010


What problems does it lead to?
As per the doc, "loaded" means the reference is consistent with the DB state, a new or deferenced collection is by definition not consistent.


On 24 déc. 2009, at 16:47, Florent Bayle wrote:

> Hi,
> 
> While testing one of our app, I found a problem : after saving a pojo
> with a new HashSet, the saved pojo PersistentSet role/key were null.
> 
> I tracked the problem down to one of the CollectionEntry constructors:
> public CollectionEntry(CollectionPersister persister,
> PersistentCollection collection).
> It seems that in this constructor, setLoadedPersister(loadedPersister)
> isn't called, nor this.loadedKey = loadedKey, contrary to the other
> constructors.
> Thus, when collection.setSnapshot(loadedKey, role, snapshot) is
> called at the end of the constructor, role and loadedKey  are null and
> so, the PersistentSet role/key are null.
> 
> Is there a reason for that, and is it possible to patch it ?
> 
> Thanks.
> 
> --
> Florent Bayle
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev





More information about the hibernate-dev mailing list