Mapping primary key types in liquibase and hibernate

When I create a table via liquibase I have to use int type. And cannot use long cause it’s not supported:

  1.            
  2.                
  3.            

Which type should I use when I define an entity? Should it be long or int or something else?


  1. @Id
  2.     private long id;

I’d like to have the same scheme generation script when I invoke liquibase:updateSQL or generate it via hibernate option. But it is not clear to me the mapping issue.

If I want to use long as type in Java code, I have to use bigint as type in the liquibase. So, the issue is resolved.