Hi Ugo,
In tables where I have used an auto generated ID, the latest ID is always the highest number. So I use SELECT max(ID) FROM <filename>. There may be a better way to do it, but this works fine for me.
Noel
On Tuesday, August 7, 2012 3:41:48 AM UTC+10, Ugo Matrangolo wrote:
Hi,
I need to know the auto generated ID of the last entity that was just persisted on the db using an INSERT operation.
On PostGRES I was used to the `... returning id` statement at the end of the INSERT operation. This seems to be missing from H2.
How can I get the same behavior ???
Cheers,
Ugo.