我正在尝试在 datanucleus 中使用复合键映射一个类。主键由两个外键组成,我似乎无法在 fetchgroup 中包含这些外部类:
使用注释:
@PrimaryKey
@Column(name = idElementOne, allowsNull = "false")
private Long idElementOne;
@PrimaryKey
@Column(name = "idElementTwo", allowsNull = "false");
private Long idElementTwo;
作品
@PrimaryKey
@Column(name = idElementOne, allowsNull = "false");
private ElementOne elementOne;
@Column(name = "idElementTwo", allowsNull = "false");
private Long idElementTwo;
作品
但
@PrimaryKey
@Column(name = idElementOne, allowsNull = "false")
private ElementOne elementOne;
@PrimaryKey
@Column(name = "idElementTwo", allowsNull = "false");
private Long idElementTwo;
才不是。
我该怎么做?