TableGenerator Integration

I use the Hibernate basic TableGenerator strategy and after inserting data using changesets my sequence table is WRONG.
This causes bugs trying to insert new entities.

Any ideas on how to solve the problem? Am I missing something??

Thanks to all

liquibase does not know anything about your id generation strategy. 

As a result try to insert using liquibase only data that is not going to be changed via application.

If it’s not suitable for you, then use the following sequence:

  1. insert data using liquibase.

  2. create a table that is used by your tableGeneratar, 

  3. set initial values using last id value, inserted in the first step.