The spec is ambiguous on the reason for having Set and Collection in CMR fields. It DOES NOT indicate why you sould use one over the other.
It also does NOT indicate that using a Collection should allow duplicate entries. However, it does NOT indicate that you can't have duplicate entries. Therefore the JBoss group have interpreted this in their own way. Wrongly in my opinion. The reason I say wrongly is two fold: 1. In Java Sets are used as a collection of unique values. Other Collection implementations allow duplicate entries. Why bother with the distinction otherwise. 2. The EJB spec describes how Set and Collection are used for exactly this reason in "select" methods. Set used for unique entries and Collection allows duplicates. If I was interpreting the spec I would apply this same logic to the relationship fields. Clearly the spec needs clarification on this point, but in the meantime why not just allow the developer the choice of how their beans should behave. JBoss have now restricted the use of CMR fields to just Set. If the spec ever clarifies the use of Set and Collection to allow duplicates in Collection then JBoss will need to change their code. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3849246#3849246 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3849246 ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user