Hello,
I have the object retrieved from a previous session and try to load its lazy collection in a new session:
try {
PersistentSession session = new PersistentSession();
if (!Hibernate.isInitialized(((NetPortalProvider)node).getNetworks()))
{
session.getPersistentSession().lock(((NetPortalProvider)node), LockMode.NONE);
Hibernate.initialize(((NetPortalProvider)node).getNetworks());
}
}
catch(Exception e) {
return null;
}
(PersistentSession is a wrapper for a Hibernate session)
I get this exception on the highlighted line:
"reassociated object has dirty collection reference"
Anyone knows what this means?
TIA,
--steve p.
|