1

I am using MySQL on vitess and My java application is running on docker version 19.03. When I add any record in the database table using hibernate, it is showing error

unsupported: LAST_INSERT_ID is only allowed for unsharded keyspaces.

Not sure why this error is showing as I didn't write anywhere to

select last insert id

I am adding records through hibernate save() function and didn't used any insert/update query.

keikai
  • 14,085
  • 9
  • 49
  • 68

1 Answers1

0

We recently expanded support for last_insert_id. The latest code should work for sharded keyspaces also. There's still no support for last_insert_id(val) yet, only last_insert_id(). But it should be coming up soon.

You'll need to vitess 6.0 version.

Sugu Sougoumarane
  • 406
  • 1
  • 3
  • 7