HQL - Filtering data based on a particular field of a class in a one to many mapping

128 views Asked by At

I have one class "MasterUsers". This class has another class "Master" as a reference. The class "Master" has a one-to-many mapping to "Actions" class using List interface. "Actions" class is mapped to "ACTIONS" table and "MASTERUSERS" is mapped to "MASTERUSERS" table and "MASTER" is mapped to "MASTER" table.

My HQL looks like below :

StringBuffer hql = new StringBuffer() ; hql.append("from MasterUsers where") ;

"ACTIONS" Table has a column called "actions_taken_id". I do not want to retrieve those data whose actions_id is 10.

What condition to be added here ?

0

There are 0 answers