On 2012-10-24 17:01, Peter Rodgers wrote:
Hi - just wondering if anyone has any ideas? If this is expected behaviour then we'll have to go with a workaround.

Thanks in advance for any help.


The change happened in revision 3568 and is related to this issue:
Issue 308: Statement.getGeneratedKeys() now returns an empty result set if no key was generated.

The relevant code change is in the CommandContainer#update() method, where it calls session.setLastIdentity(ValueNull.INSTANCE)

Unfortunately I'm not sure how to fix this. Thomas, the easiest way to test this is:

  create table test(id identity primary key);
  insert into test values();
  set @x = identity();
  select @x;

which will return null instead of a valid number.



--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to