I am having a POJO which implements the Lifecycle interface. I overrideen the methods onSave(),onDelete(),onUpdate() and onLoad().
When persisting an object, the onSave() is getting called.
When loading an object, the onLoad() is getting called and
when deleting an object, the onDelete() is also getting called.
But when updating an object, the
onUpdate() is not getting called. But the database is getting updated. Why it is? Whether anyone came across the same problem?
for updating the object, the code snippet used by me is:
Code:
session.update(newObject); or
session.saveOrUpdate(newObject);
Both are working properly, but the onUpdate() is not getting called.
Any help is appreciated.
Thanx in advance.