]
Sanne Grinovero commented on HSEARCH-306:
-----------------------------------------
what made you think this is a Hibernate Search bug?
Could you change the attachment to a unit test? I didn't understand what you are
expecting.
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=16e54abb3dbc45...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: