I'm not sure if I understood your problem. But this reminds me of a list of entities
in which I wanted to show the amount of relations to other entities (just like e.g. users
and his posts in this forum). So I put the following into the user entity:
@Formula("(select count(*) from Post p where p.user_id = id)")
| private int postcount;
|
| //+ getter + setter
The query for the postcount var is being executed on the fly for every user in this
example. Maybe you can adapt this proceeding for your purposes.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957163#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...