[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6063) The fix for HHH-5126 breaks array constructor in PostgreSQL

Steve Ebersole (JIRA) noreply at atlassian.com
Tue Jan 10 11:11:10 EST 2012


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45068#comment-45068 ] 

Steve Ebersole commented on HHH-6063:
-------------------------------------

Unscheduling.  Still awaiting test case

> 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
>
> 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

        


More information about the hibernate-issues mailing list