]
Emmanuel Bernard resolved HSEARCH-306.
--------------------------------------
Resolution: Fixed
Please reopen if Core trunk and Search trunk are still showing the problem.
(intermittent issue is that Core has more Session.* methods than current Search and thus
might fail but this will be resolved eventually (with core beta3 release we will align)
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: