My sql code looks as follows
Code:
select e.id from entry e, groups_belong_to_group_member g where e.id=g.groups_belong_to_id and
group_entry='Yes' and
name like '%(Countries)%';
I have tried to convert this to HQL but only get this far
Code:
sb.append("select entry from com.workpool.directory.Entry entry where ");
sb.append("entry.groupEntry=\"Yes\" and ");
sb.append("entry.name like '%(Countries)%'");
i still need to add this code to the query
Code:
e.id=g.groups_belong_to_id
" g.groups_belong_to_id" is an object on entry so how do you get the entry.id = to a object on entry namely "g.groups_belong_to_id" using HQL, or what type of joion do i use
any help appreciated thanks