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
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to