[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-306) Problem with composite key

Hardy Ferentschik (JIRA) noreply at atlassian.com
Tue Apr 28 11:54:17 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33040#action_33040 ] 

Hardy Ferentschik commented on HSEARCH-306:
-------------------------------------------

Sounds very much like a duplicate of HSEARCH-248. Can't check the forum at the moment though :(

> Problem with composite key
> --------------------------
>
>                 Key: HSEARCH-306
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-306
>             Project: Hibernate Search
>          Issue Type: Bug
>          Components: query
>    Affects Versions: 3.1.0.CR1
>            Reporter: Mohit Khopkar
>         Attachments: hibernate jira.zip
>
>
> When a composite key is used and more than one results are expected , the values passed to the query are not in a proper expected order.
> In the below query the parameters passed are (A00, A00),(A00, 1),(2,5) ....instead of the correct order which should be (A00,1) ,(A00,2), (A00,5)
> (I have omitted the select part)..
> ..
> where ((this_.key_client, this_.key_identifier) in ((?, ?), (?, ?), (?, ?)))
> I tried to debug this issue and found that in the class org.hibernate.criterion.InExpression, the method getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery)  has 2 for loops , one for types and other for values. I get 2 types CustomType and LongType and so for each type it retrieves the value and adds it in the list in the order A00,A00,A00,1,2,5
> I have attached the source code for your reference.
> For more information, refer to the below topic on the hibernate forums:
> http://forums.hibernate.org/viewtopic.php?t=992121&sid=16e54abb3dbc45d314f528a4646763cc

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