I have two to tables:
Table1 and Table2 . I have mapped them like this:
| @Entity
| @Table(name = "Table1")
|
| class Table1{
| int id;
| int level;
|
| @OneToMany
| List<Table2> items
|
| }
|
|
|
|
| @Entity
| @Table(name = "Table2")
|
| class Table2{
|
| int id;
|
|
|
| }
|
|
|
I woud like to do a filter for Table2 entity which returns same result as this query
returns:
select * from Table2 t2 where (select t1.level from Table1 t1 where t1.id=t2.id)=
:accessLevel
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050961#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...