Replace nextval with JPA TableGenerator

* Fixes failing tests.