ids for this class must be manually assigned before calling save()

后端 未结 3 705
情书的邮戳
情书的邮戳 2021-01-02 17:38

I\'ve got some problem with hibernate @OneToMany mapping. It goes like here

@Entity
@Table(name = \"albums\")
@SequenceGenerator(name = \"ALBUMS         


        
3条回答
  •  爱一瞬间的悲伤
    2021-01-02 18:26

    You are using two primary keys in one table and one of the keys is also a primary key in another table. The simple solution is to remove the one of the primary keys which is also the foreign key

提交回复
热议问题