[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4109?page=c...
]
ggsoft(a)gmx.net commented on HHH-4109:
-------------------------------------
Tried it now. I can see all Params and Filters but the order of
List parameterSpecs = queryTranslator.getCollectedParameterSpecifications();
(here the set param comes first)
does not meet the statement where the filter comes first.
filter and join "with" do not work
----------------------------------
Key: HHH-4109
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4109
Project: Hibernate Core
Issue Type: Bug
Components: query-hql
Affects Versions: 3.2.6
Environment: Hibernate 3.2.6GA, MySql
Reporter: ggsoft(a)gmx.net
Priority: Blocker
When using filters and joins with a with clause, Hibernate applies the parameters in
wrong order.
<property name="defaultFilterCondition"
value="deleted=:p_deleted"/>
The filter sets only a soft delete flag. On the HQL
select u, b. as buddyState from User as u left join u.buddiesForUserB as b with
b.userByUserA.userid = :p_userAid where u.username = :p_username;
the filter is applied to the with and to the where clause. Resulting in:
...
buddiesfor1_ on user0_.userid=buddiesfor1_.userB and buddiesfor1_.deleted=0 and
(buddiesfor1_.userA=0) where user0_.deleted=1 and user0_.username='myUsername'
...
because the order is filter, param,filter, param
But in Hibernates QueryLoader Class bindFilterParameterValues l.496 (511-516) it is
assumed the filters come first.
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira