-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Filters should work on inner joins
PostPosted: Tue Mar 15, 2011 12:18 pm 
Newbie

Joined: Tue Mar 15, 2011 12:16 pm
Posts: 1
I've a class 'Employee' which has a filter defined on.
The filter filters all employees with a salary less than 1000.

I also have an 'EmployeePhoneNumber' class. An employee may have many 'EmployeePhoneNumber's but each 'EmployeePhoneNumber' is connected to a single employee. (many-to-one)

When I enable the filter and query for employees:
'SELECT employee from Employee employee'.
The filter works fine, and only appropriate employees with a salary more than 1000 are returned.

When I query for the inner-join between employee and employees:
'SELECT employeePhoneNumber.id, employee.id from EmployeePhoneNumber employeePhoneNumber inner join employeePhoneNumber.employee employee' .
The filter doesn't work, and I get phone numbers from employees with a salary less than 1000.

How can I solve it (still using filters)?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.