-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
HHH-19276 - Native query with enum list param leads to OutOfMemory #10876
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
Conversation
@beikov converted back to draft because the test isn't correctly establishing that no additonal instances of the enum java type or basic type are being generated. |
...e-core/src/test/java/org/hibernate/orm/test/mapping/converted/enums/OrdinalEnumTypeTest.java
Fixed
Show fixed
Hide fixed
21e7dfc
to
c6bf358
Compare
...e-core/src/test/java/org/hibernate/orm/test/mapping/converted/enums/OrdinalEnumTypeTest.java
Fixed
Show fixed
Hide fixed
c6bf358
to
c98a9a6
Compare
hibernate-core/src/main/java/org/hibernate/type/descriptor/java/EnumJavaType.java
Outdated
Show resolved
Hide resolved
A very simple test would be to simply verify that |
The registryValues Map was dropped from BasicTypeRegistry since it's no longer needed, and it could lead to an OutOfMemoryError (accumulation of EnumJavaType instances as keys in the Map).
c98a9a6
to
0a5ab82
Compare
...ore/src/main/java/org/hibernate/dialect/function/array/ArrayAndElementArgumentValidator.java
Show resolved
Hide resolved
&& !expectedElementType.getJavaType() | ||
.isAssignableFrom( elementType.getExpressibleJavaType().getJavaTypeClass() ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
&& !expectedElementType.getJavaType() | |
.isAssignableFrom( elementType.getExpressibleJavaType().getJavaTypeClass() ) ) { | |
&& !TypecheckUtil.isTypeAssignable( expectedElementType, elementType.getSqmType(), bindingContext ) ) { | |
// && !expectedElementType.getRelationalJavaType().getJavaTypeClass() | |
// .isAssignableFrom( elementType.getRelationalJavaType().getJavaTypeClass() ) ) { |
[Please describe here what your change is about]
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.
https://hibernate.atlassian.net/browse/HHH-19276