[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6063) The fix for HHH-5126 breaks array constructor in PostgreSQL
Jon Vincent (JIRA)
noreply at atlassian.com
Mon Mar 28 15:29:08 EDT 2011
The fix for HHH-5126 breaks array constructor in PostgreSQL
-----------------------------------------------------------
Key: HHH-6063
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6063
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 4.0.0.Alpha1, 3.6.2, 3.6.1
Environment: PostgreSQL, any version
Reporter: Jon Vincent
The fix for HHH-5126 supports this JPA2-compliant IN query:
{{{
SELECT * FROM my_table WHERE id IN :collection
}}}
Before HHH-5126 was fixed, Hibernate required the developer to surround collection-valued parameters with parentheses:
{{{
SELECT * FROM my_table WHERE id IN (:collection)
}}}
The implemented fix was simply to output parentheses in the generated SQL. Unfortunately, this breaks _other_ uses of collection-values parameters, such as for arrays in PostgreSQL:
{{{
CREATE TABLE my_table (some_array INTEGER[]);
INSERT INTO my_table (some_array) VALUES (ARRAY[:collection]);
}}}
Is there a way to turn off the fix for HHH-5126? For us, at least, the old code was more flexible and allowed access to important database features.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list