对于键值为实体且值为整数的地图,我应该如何使用 EclipseLink 的 @BasicMap 注释?
@Entity
class A {
// This doesn't work, as the key is an entity
@BasicMap
private Map<B, Integer> myMap = new HashMap<B, Integer>();
}
@Entity
class B {
...
}
对于键值为实体且值为整数的地图,我应该如何使用 EclipseLink 的 @BasicMap 注释?
@Entity
class A {
// This doesn't work, as the key is an entity
@BasicMap
private Map<B, Integer> myMap = new HashMap<B, Integer>();
}
@Entity
class B {
...
}