[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4109) filter and join "with" do not work
ggsoft@gmx.net (JIRA)
noreply at atlassian.com
Thu Aug 27 08:20:15 EDT 2009
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 at 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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list