How to map smallint type in Hibernate to Postgres

Hibernate does define a “smallint” type. If you try to set the Type to smallint, you’ll get an error stating “Could not determine type for: smallint”. So what type should be used when mapping to a smallint field? The answer is to use “short:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s