[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: why nobody talks openJPA here?

nitros do-not-reply at jboss.com
Fri Mar 21 16:59:31 EDT 2008


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#4138371

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



More information about the jboss-user mailing list