Save child objects automatically using JPA Hibernate

前端 未结 7 706
南方客
南方客 2020-11-27 13:13

I have a one-to-many relation between Parent and Child table. In the parent object I have a

List setChildren(List childs)
         


        
7条回答
  •  爱一瞬间的悲伤
    2020-11-27 14:03

    Use org.hibernate.annotations for doing Cascade , if the hibernate and JPA are used together , its somehow complaining on saving the child objects.

提交回复
热议问题