[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: OneToMany Behaviour
linux.enthusiast768
do-not-reply at jboss.com
Tue Jan 15 11:33:19 EST 2008
Posting/Persisting the child enity from the Parent start working after adding cascade=CascadeType.ALL.
@Entity
@Table(name = "A")
public class A {
...
@OneToMany(cascade=CascadeType.ALL, mappedBy="A")
private List ab;
public void setAb(List ab) {
this.ab = ab;
}
}
However the question remains, whether I need to define @Id column in the Child.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120156#4120156
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120156
More information about the jboss-user
mailing list