Hi,

The are a few ways that the multiple bag exception can be avoided.  

You mentioned using a Set instead, this would solve the problem but it has the 
restriction that it can only contain distinct values so you need to consider if 
they will work for you.

Another solution would be to use Lists, but i would personally never do this as 
i have experienced lots of problems (like them missing out the join table they 
create in queries) with Bi-Directional indexed relationships (using a list to 
map a oneToMany)

The thrid solution could be to keep using collections, but also annotate with 
@CollectionId, i have not used this yet, but i reckon it could also run into 
problems with bi-directional relationships.

Andy

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4009555
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to