Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove floating point types from types advertised to support precision & scale #4559

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adferrand
Copy link
Contributor

@adferrand adferrand commented Jan 8, 2024

Related to HBX-1408

This PR fixes an inconsistency in Java entities generation. Indeed hibernate-tools generate entities whose floating point type fields are annotated with a @Type with scale and precision parameters. However these parameters are not relevant and generate IllegalArgumentException as per https://github.com/hibernate/hibernate-orm/blob/7c58fe9a16eb15e5d1432e4bb3434c89cf214e16/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java#L5097-L5112.

This PR changes JdbcToHibernateTypeHelper so that typeHasScaleAndPrecision do not advertise these types to support scale and precision.

@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Jan 8, 2024

Thanks for your pull request!

This pull request appears to follow the contribution rules.

› This message was automatically generated.

@adferrand adferrand force-pushed the bugfix/noscale-for-floating branch 3 times, most recently from edc4218 to 37cb871 Compare January 8, 2024 09:00
@koentsje koentsje deleted the branch hibernate:main July 2, 2024 15:34
@koentsje koentsje closed this Jul 2, 2024
@koentsje koentsje reopened this Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants