[jboss-user] [JBoss Seam] - Re: Entities with one/many_to_many relationships and SEAM

petemuir do-not-reply at jboss.com
Thu Jul 20 07:08:10 EDT 2006

Yes you are right. See http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/api/javax/faces/component/UISelectOne.html for example.

I hadn't come across it as I always override the equals methods of entities to compare on id equality (if the object is set, otherwise fallback on object equality). 

A drawback the EntityConverter for which I can see no work around (you get the Entities from two different EntityManager instances [1]). So, you could either add an equals method (as on the example ClientType) or you could look at the alternive index or String strategies.  Or wait for someone to come up with a @SelectItemsSelection annotation.

[1] I couldn't get them from the SeamManaged Persistence Context as it caused entities to become detached when using Container Managed Transactions.

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959519

More information about the jboss-user mailing list