@OneToMany and composite primary keys?

前端 未结 9 1745
温柔的废话
温柔的废话 2020-12-01 03:31

I\'m using Hibernate with annotations (in spring), and I have an object which has an ordered, many-to-one relationship which a child object which has a composite primary key

9条回答
  •  生来不讨喜
    2020-12-01 04:21

    After saving the Parent object, you have to explicitly set the parentId in the Child objects for the inserts on the Child objects to work.

提交回复
热议问题