]
Shawn Clowater commented on HHH-4109:
-------------------------------------
Have you tried 3.2.7 yet? There was alot of work done around the parsing of the filter
parameters for
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: