[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6063?page=c...
]
Gail Badner commented on HHH-6063:
----------------------------------
Jon, please attach a runnable test case that reproduces this issue, or, preferably, fork
the hibernate-core git repo at
https://github.com/hibernate/hibernate-core and create a
pull request that adds your test case to
hibernate-core/src/matrix/java/org/hibernate/test/...
For an example of executing a dialect-specific CREATE TABLE statement for a unit test,
please see org.hibernate.test.rowid.RowIdTest.
Thanks,
Gail
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: 3.6.1, 3.6.2, 4.0.0.Alpha1
Environment: PostgreSQL, any version
Reporter: Jon Vincent
Assignee: Gail Badner
Fix For: 4.0.0.next
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.
For more information on JIRA, see:
http://www.atlassian.com/software/jira