Hi there,
I am looking of a way to force Hibernate to always include a specified attribute (of type Long) in EVERY update/insert operation hibernate ever makes. The attribute is always set by an interceptor in onSave/onFlushDirty. This attribute is needed for the DB triggers to work.
I have noticed that right now I have to closely watch in which order I save/update objects in case one object depends on another. Then it may be that all columns are updated except for the foreign key (e.g. because the other object must be created first), then the foreign is updated separately. During this foreign key update, I *also* want the specified attribute updated (even if it has already been during the first update/insert). Is this possible?
Thanks,
Thomas
|