Hibernate hbm2ddl and SQL Server: Long as column of numeric data type
-
19-09-2019 - |
Question
Hibernate generates column of type “numeric” in SQL Server for properties of type Long of Java class. Is there a way to make Hibernate generate bigint (or int) column instead of numeric using the Hibernate hbm2ddl?
Solution
Taken from the hibernate forums: https://forum.hibernate.org/viewtopic.php?p=2377674#2377674
Looks like you're going to have to roll your own SQL server dialect. While that doesn't seem right, there doesn't seem to be any action in hibernate's JIRA that makes me think this is fixed.
Oh, or it could be driver type. I'm not sure what driver you're using but jTDS appears to map Long to BigInt.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow