[jboss-user] [EJB 3.0] - OneToMany w/ Composite Key problem
lydiachung
do-not-reply at jboss.com
Fri Dec 1 14:09:24 EST 2006
Hi,
I have Order and Item classes.
In Order class:
@OneToMany(mappedBy="order")
public Collection items = new ArrayList();
In Item class:
@Id
@Column(name = "orderid", insertable = false, updatable = false)
public Long orderid;
@ManyToOne
@JoinColumn(name = "orderid")
public Order order;
When I deploy my app to jboss 4.0.4 GA. It throws the following error:
Repeated column in mapping for entity: Item column: orderid (should be mapped with insert="false" update="false")
What's wrong with my code?
Thanks,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990534#3990534
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990534
More information about the jboss-user
mailing list