I don't think openJPA is recommended to use with JBoss and it is not supported by
JBoss either.
I personally started off my project with openJPA and I ran into problems (see my post -
help needed with openJPA and JBoss)
To help you with your problem, I assume you are talking of a bidirectional relationship,
this is how I set it up in hibernate and it works smooth:
Address_Detail - > * - 1 -> Address
@ManyToOne(optional = false, cascade = { CascadeType.PERSIST, CascadeType.REFRESH })
@JoinColumn(name = "ADDRESS_ID", nullable = false)
private Address address;
and in address, the definition is
@OneToMany(mappedBy = "address", cascade = { CascadeType.ALL })
private Collection addressDetails;
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138371#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...