Closed
Description
Lucas POUZAC opened DATAMONGO-1379 and commented
If the attribute name (java) is different from the field (mongo document), spring-data-mongodb throw an PropertyReferenceException.
Example :
public class Foo {
@Field(name = "bar")
private String foo;
...
}
Query query = new Query();
query.addCriteria(Criteria.where("bar").is("bar_value"));
return findOne(query);
The result is correct but the memory consumption is very high.
Moreover, if the field name contains an underscore, it is not correctly parsed. DATACMNS-816
public class Foo {
@Field(name = "bar_underscore")
private String foo;
...
}
Query query = new Query();
query.addCriteria(Criteria.where("bar_underscore").is("bar_value"));
return findOne(query);
Attachments: