I am sure this is documented somewhere - but be damned if I can find it:
Basically, I want to map a property such that when the object is saved or updated, it is set to a table-wide incremented value. Without using a trigger. Its essentially an incrementing "transaction id" for that table.
Its kind of like <version> - but letting me specify a generator - in this case, an oracle sequence.
Its also kind of like generated="always" - but letting me specify custom sql that sets the value on insert or update.
ala
Code:
update Issue set lastUpdateId=Issue_lastUpdateId_sequence.NEXTVAL, title='moo' where id='A9FB96DA8C6542DCA8F911E30341CBF5';
My feeling is there must be a way to do this - but I havent been able to find it. I must be blind.
Thanks.
-Nick