Hello,
what i'm needing is something like deep cloning for hibernate objects with large object graphs.
replicate(object,ReplicationMode.EXCEPTION) works, if i replicate a previously persisted object.
But for a previously persisted object with some new "childs", it throws an
null identifier AssertionFailure :
Code:
net.sf.hibernate.AssertionFailure: null identifier
at net.sf.hibernate.engine.Key.<init>(Key.java:22)
at net.sf.hibernate.engine.Key.<init>(Key.java:32)
at net.sf.hibernate.impl.SessionImpl.replicate(SessionImpl.java:3712)
at net.sf.hibernate.engine.Cascades$6.cascade(Cascades.java:147)
at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:436)
at net.sf.hibernate.engine.Cascades.cascadeCollection(Cascades.java:526)
at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:452)
at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:503)
at net.sf.hibernate.impl.SessionImpl.doReplicate(SessionImpl.java:1431)
at net.sf.hibernate.impl.SessionImpl.replicate(SessionImpl.java:3705)
Plain, cause the new "childs" haven't an ID.
But is this wanted or is it a bug?