Hibernate bidirectional @ManyToOne, updating the not owning side not working

后端 未结 3 829
生来不讨喜
生来不讨喜 2020-11-30 12:22

I have a really simple setup to try out a bidirectional mapping with annotations:

@Entity
public class TypeA extends AbstractModel {

    @Id
           


        
3条回答
  •  攒了一身酷
    2020-11-30 12:24

    The owning side is TypeB, so you need to call setA(), since the association is only managed by the owning side.

提交回复
热议问题