[jboss-user] [EJB 3.0] - SQL Query for Collection object [OneToMany]

alexrozario do-not-reply at jboss.com
Tue Nov 11 06:56:52 EST 2008


Hi every one

I have three tables Post, Reply and Abuse

One Post may have more than one reply.
Post table and Reply tables have OneToMany relationship.
So when we fetch any Post from DB it also fetches its replies.

If any one the reply is abused by users. It will be saved in Abuse table

Here my problem is,
Now, I need to hide those abused reply from my replies collection.But I can't hide that particular reply, though it is coming from collection.

How to leave that reply through sql where condition?
Is it possible to do through annotation?
Is there any other way to achieve this?

By
Alex

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4188447#4188447

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4188447



More information about the jboss-user mailing list