且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

需要一个 Hibernate 中的主键 @OneToOne 映射示例

更新时间:2021-11-27 00:44:16

您的意图是在 PaperChequeStopMetaData 和 PaperCheque 之间建立 1-1 的关系?如果是这样,您不能将 PaperCheque 实例定义为 PaperChequeStopMetaData 的 @Id,您必须在 PaperChequeStopMetaData 中定义一个单独的 @Id 列.

Your intention is to have a 1-1 relationship between PaperChequeStopMetaData and PaperCheque? If that's so, you can't define the PaperCheque instance as the @Id of PaperChequeStopMetaData, you have to define a separate @Id column in PaperChequeStopMetaData.