skykam wrote:
...
What I have been able to get to is that somewhere in the vacinity of the following, the fields I am interested in are getting nulled out before being persisted.
SessionImpl.persist (Object) :493
SessionImpl.persist (String, Object) :489
DefaultPersistEventListener.onPersist (PersistEvent) :38
DefaultPersistEventListener.onPersist (PersistEvent, Map) :84
DefaultPersistEventListener.entityIsTransient (PersistEvent, Map) :124
DefaultPersistEventListener(AbstractSaveEventListener).saveWithGeneratedID (Object, String, Object, SessionImplementor) :107
And a little bit further....
DefaultPersistEventListener(AbstractSaveEventListener).performSave (Object, Serializable, EntityPersister, boolean, Object, SessionImplementor) :158
DefaultPersistEventListener(AbstractSaveEventListener).performSaveOrReplicate (Object, Serializable, EntityPersister, boolean, Object, SessionImplementor) :223
SingleTableEntityPersister(BasicEntityPersister).setPropertyValues (Object, Object[], EntityMode) :2923
PojoTupilizer.setPropertyValues (Object, Object[]) :171
PojoTupilizer(AbstractTupilizer).setPropertyValues (Object, Object[]) :206
The method here appears to be where my values are being nulled out. I still do not entirely trust my version of the source code, but here's the method as I see it:
public void setPropertyValues (Object entity, Object [] values) throws HibernateException {
boolean setAll = !entityMetamodel.hasLazyProperties();
for ( int j=o; j < entityMetamodel.getPropertySpan (); j++ ) {
if ( setAll || vakues[j] != lazyPropertyInitializer.UNFETCHED_PROPERTY ) {
setters[j].set ( entity, values[j], getFactory() );
}
}
}