带有@Field 的字段未转换为正确的值
Field with @Field not getting translated to the correct value
我有一个文档,其中一个字段的名称被@Field 覆盖了:
public User {
@Id
private String id;
private String username;
@Field("profiles")
private List<BusinessProfile>
businessProfiles;
...
}
和一个带有匹配操作的聚合操作如下:
match(where("businessProfiles.services").elemMatch(Criteria.where("category").is(serviceCategory)))
但是,在这最终生成的查询中,businessProfiles 并未转换为配置文件。这是我从日志文件中得到的查询:
Executing aggregation: [ { "$match" : { "businessProfiles.services" : { "$elemMatch" : { "category" : "Cloud_Initiation"}}}} ...]
这种行为看起来很奇怪。这应该以这种方式工作吗?谢谢
字段映射仅为 TypedAggregation
提供映射源类型。
TypedAggregation<Product> agg = newAggregation(User.class,
match(where("businessProfiles.services")...
我创建了 DATAMONGO-2310 来改进该领域的文档。
我有一个文档,其中一个字段的名称被@Field 覆盖了:
public User {
@Id
private String id;
private String username;
@Field("profiles")
private List<BusinessProfile>
businessProfiles;
...
}
和一个带有匹配操作的聚合操作如下:
match(where("businessProfiles.services").elemMatch(Criteria.where("category").is(serviceCategory)))
但是,在这最终生成的查询中,businessProfiles 并未转换为配置文件。这是我从日志文件中得到的查询:
Executing aggregation: [ { "$match" : { "businessProfiles.services" : { "$elemMatch" : { "category" : "Cloud_Initiation"}}}} ...]
这种行为看起来很奇怪。这应该以这种方式工作吗?谢谢
字段映射仅为 TypedAggregation
提供映射源类型。
TypedAggregation<Product> agg = newAggregation(User.class,
match(where("businessProfiles.services")...
我创建了 DATAMONGO-2310 来改进该领域的文档。