[jboss-user] [JBoss Seam] - Re: Using EntityHome with multiple Entities

cja987 do-not-reply at jboss.com
Fri Mar 9 13:25:00 EST 2007


If they really are unrelated, why not just use two EntityHome instances?   If they are actually related somehow, you can express the relation in JPA/Hibernate terms as @OneToOne (or whatever your relation is) and get at one object through the other -- no entityhome required.

@EntityHome seems to exist largely for the purpose of exposing entities as components without making the entities themselves components.  It's also a great place to do bijection that concerns entities (since even if you do use the antipattern of entities-as-components, they don't intercept).  If you need to deal with a list of objects, you could always wrap a @DataModel with your own controller.


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

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



More information about the jboss-user mailing list