Hi,
seems like I finally got it... but this does not necessarily means I undestand it :-(
http://forum.hibernate.org/viewtopic.php?p=2182885
Debugging through Hibernate's code, seemed like my object would not be updated, because it was not considerated "dirty enough".
The test I was running is like:
Code:
IBeneficiario b3 = mgr.newBeneficiario();
b3.setSolicitud(sol);
b3.setNumAsegurado(new Integer(3));
b3.setTelfMovil(new Long(600066066));
mgr.save(b3);
mgr.close();
IPersistenceManager mgr11=Previsora.getManager();
b2.setTelfMovil(new Long(699065269));
mgr11.save(b2);
mgr11.close();
So the field setTelfMovil has been modified, so I would expect hibernate to automagically infere my object was dirty.
To force this, I'm now checking in the findDirty method if the passed object is one of my IBeneficiario implementation's and if so, I will always considere it "dirty".
This does not sound too performance aware to me, and neither too elegant, but it's the only workaround I found so far.
Has anybody else got any better solution?
Also... a doubt...
why is Interceptor.findDirty returning an array of ints??
Is it supposed to be kind of a flag/mask to decide which property has been changed? Seems like it's not checked in the calling code, till now?
_
Jorge