Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-15623 (
https://hibernate.atlassian.net/browse/HHH-15623?atlOrigin=eyJpIjoiMGIyND...
)
Re: JPA Hibernate float value not taking from Column precision for DDL Generation (
https://hibernate.atlassian.net/browse/HHH-15623?atlOrigin=eyJpIjoiMGIyND...
)
Hey there. You should report this bug to the jOOQ code generator as the generated code is
wrong IMO. The @Column annotation documents that the precision member is only used for
decimal/numeric column types, so it kind of implies that the unit is in number of decimal
digits. Hibernate 5 ignored this member so far, but in Hibernate 6, we support
interpreting the precision member, but we decided to not change the unit to suddenly mean
binary digits just because a float/double java type is used.
Since 53 is the default precision for double, the member should just be omitted. The
closest you can get with decimal numbers is by using a precision of 15 which will result
in a binary precision of 50. Using a precision of 16 would result in a binary precision of
54, which might not be supported on all databases. If you want to be in full control of
your schema, use a tool like Liquibase or Flyway.
(
https://hibernate.atlassian.net/browse/HHH-15623#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15623#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100209- sha1:9aa9d1d )