Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Mapping primary key types in liquibase and hibernate

$
0
0
When I create a table via liquibase I have to use int type. And cannot use long cause it's not supported:
  1.             <column name="id" type="int">
  2.                 <constraints primaryKey="true" nullable="false"/>
  3.             </column>
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.

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>