Hi all,
I'm looking for recommendations, patterns, or examples for setting up relationships
between entity beans that span persistence units. For example, I have a single value
unidirectional relationship from class Foo to Bar:
| @Entity
| class Foo{
| private Bar bar;
|
| @ManyToOne(fetch=FetchType.LAZY)
| @JoinColumn(name="BAR_ID")
| public Bar getBar();
| }
|
Foo is managed by persistence-unit A, Bar is managed by persistence-unit B. My current
solution foregos the object relationship and just stores a Long barId in Foo.
I've read through the ejb3_persist spec for guidance, but there are no examples or
indications saying, "Don't do this." If these types of relationships are
verboten, what patterns are people using to resolve these types of entity associations?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147636#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...