[JBoss-user] [EJB 3.0] - Re: EJB-QL for @ManyToMany?

2006-02-22 Thread epbernard
The showing code cannot create such an exception AFAIK, you probably have some other code somewhere. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3925601#3925601 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3925601

[JBoss-user] [EJB 3.0] - Re: EJB-QL for @ManyToMany?

2006-02-22 Thread gus888
Hi Emmanuel, you are great. Yes, the other codes in the Group class made the exceptions. Now I fixed, but I have a new question. That is how to insert new data into the joined table, e.g. add a new group into table groups(group_id,...) and table group_members (group_id, account_id). Thank you

[JBoss-user] [EJB 3.0] - Re: EJB-QL for @ManyToMany?

2006-02-22 Thread gus888
Hi Emmanul, I got the insert method. Thank you so much. GUS View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3925744#3925744 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3925744

[JBoss-user] [EJB 3.0] - Re: EJB-QL for @ManyToMany?

2006-02-21 Thread epbernard
select genre from Genre genre left outer join genre.movies Set genres = new HashSet( query.getResultList ); View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3925312#3925312 Reply to the post :

[JBoss-user] [EJB 3.0] - Re: EJB-QL for @ManyToMany?

2006-02-21 Thread gus888
Hi Emmanuel, I also have a problem with manytomany query. Following are my codes: public class Account { | ... | @ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE}, | fetch = FetchType.LAZY, mappedBy=accounts) | public ListGroup getGroups() { |