Hi, i have a problem with an EJB-QL Query. I have following entities, which are nested in collections Project(1)->(N)Task(1)->(N)SubTask
@Entity | public class Project{ | @OneToMany | List<Task> tasks; | } @Entity | public class Task { | @ManyToOne | Project project; | | @OneToMany | List<SubTask> subTasks; | } @Entity | public class SubTask { | @ManyToOne | Task task; | | User user; | } @Entity | public class User { | String login; | } I want to retrieve all Projects in which a user is involved. Additional the Collections should only include the Tasks which includes the SubTasks assigned to this user. I have tried the following Query but the Project which was found includes all Tasks in the List. select p from Project as p | inner join p.tasks as t | inner join t.subTasks as s | inner join s.user as u | where u.login = :username Any ideas? Thanks, klaro78 View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3939154#3939154 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3939154 ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user