我想知道这在 Hazelcast 中是否可行。假设我们有一个 Java 实体:
public class BrtWeekDefinitions {
private Long id;
private BrtTimeCharts brtTimeCharts;
private BrtDayDefinitions brtDayDefinitions;
private Long weekDay;
}
并且该实体在内存中加载到类型为:Long、BrtWeekDefinitions 的映射中。
BrtTimeCharts 和 BrtDayDefinitions 实体也加载到各自的地图中。
那么这会起作用吗?
//Where mapObject is a map of type <Long,BrtWeekDefinitions>
mapObject.addIndex("BrtTimeCharts.id", false);
mapObject.addIndex("BrtDayDefinitions.id", false);
还是我必须这样做?
//Where mapObject is a map of type <Long,BrtTimeCharts>
mapObject.addIndex("id", false);
和:
//Where mapObject is a map of type <Long,BrtDayDefinitions>
mapObject.addIndex("id", false);