Hi,

The "problem" comes from the following code:


  | private Collection<Role> roles = new ArrayList<Role>();
  | private Collection<Group> groups = new ArrayList<Group>();
  | 

A Collection is treated as a "bag".  You have have some possibilities to fix it.

An easy solution is to use the @CollectionID.  Another solution would be to 
change them to List<> and then use the @IndexColum, and the final solution is 
to change the to Set<>.  You must read up on Hibernate Collection mapping  
first, to see whats suits your data model best.

Go to this URL:

http://www.hibernate.org/hib_docs/annotations/reference/en/html/entity.html#entity-mapping-association

Cheers,

Andy

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

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

Reply via email to