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

Deprecate AbstractArrayUserType, BigintArrayUserType, and TextArrayUserType for removal #1117

Closed
sleberknight opened this issue Apr 9, 2024 · 1 comment · Fixed by #1119
Assignees
Labels
deprecation Deprecates an existing feature
Milestone

Comments

@sleberknight
Copy link
Member

sleberknight commented Apr 9, 2024

Hibernate 6 supports arrays natively now, so there is no longer a need for us to have custom array UserType classes in kiwi.

Deprecate this and its two sub-classes for removal in a future version.

For information on Hibernate 6's support for arrays, see Collections mapped to SQL arrays in An Introduction to Hibernate 6.

Another resource is: https://in.relation.to/2022/06/24/hibernate-orm-61-features/

In addition, there is an issue using this starting after Postgres 14 where we encountered a ClassCastException when using these custom types in our entity classes. Here are a few of the resources I found:

So, these custom user types stop working when using Hibernate 6 and Postgres 15+. Another reason to remove them.

@sleberknight
Copy link
Member Author

The actual exception message included the following:

ArrayUserTypesIntegrationTest.beforeAll:36 » ClassCast class org.hibernate.type.CustomType cannot be
                cast to class org.hibernate.type.BasicPluralType (org.hibernate.type.CustomType and
                org.hibernate.type.BasicPluralType are in unnamed module of loader 'app')

@sleberknight sleberknight self-assigned this Apr 25, 2024
sleberknight added a commit that referenced this issue Apr 25, 2024
* Deprecate AbstractArrayUserType, BigintArrayUserType, and TextArrayUserType for removal
* Suppress the removal warnings in test code

Closes #1117
sleberknight added a commit that referenced this issue Apr 25, 2024
* Deprecate custom Hibernate array UserTypes

* Deprecate AbstractArrayUserType, BigintArrayUserType, and TextArrayUserType for removal
* Suppress the removal warnings in test code

Closes #1117

* Add missing deprecate tag to javadoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation Deprecates an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant