Skip to content

Conversation

@pinkysek
Copy link

@pinkysek pinkysek commented Jan 25, 2026

Description:

Hello, I tried fix bug with array_intersects which doesn't work with an array as a parameter for JIRA issue - https://hibernate.atlassian.net/browse/HHH-19202.
Where H2 database throws: org.hibernate.exception.GenericJDBCException: could not prepare statement [Unknown data type: "?3"; SQL statement
This contains fix for H2, HSQL and possible PostgreSQL with nullable.

Changes:

H2ArrayIntersectsFunction.java - use walker.render with SqlAstNodeRenderingMode.NO_PLAIN_PARAMETER
ArrayIntersectsUnnestFunction.java - use walker.render with SqlAstNodeRenderingMode.NO_PLAIN_PARAMETER
ArrayIntersectsTest.java - add tests for testIntersectsArrayParameter, testIntersectsArrayParameterNullFully and testIntersectsArrayParameterNull


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.



Please make sure that the following tasks are completed:
Tasks specific to HHH-19202 (Bug):

  • Add test reproducing the bug
  • Add entries as relevant to migration-guide.adoc OR check there are no breaking changes

Copy link
Member

@mbellade mbellade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pinkysek

@mbellade
Copy link
Member

@pinkysek static code analysis is failing, fix it by running ./gradlew spotlessApply (also please keep it to a single commit)

@pinkysek
Copy link
Author

@pinkysek static code analysis is failing, fix it by running ./gradlew spotlessApply (also please keep it to a single commit)

Done :)

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.

3 participants