Description
Hi,
Our current Spring Data MongoDB version is 2.0.5.RELEASE.
We are migrating to 3.1.5.
Below is the query we use to retrieve the data from the database
@Autowired
private MongoOperations mongoOperation;
query.addCriteria(Criteria.where("business_area").is(buName)
.andOperator(Criteria.where("onboard_status").exists(true)
.andOperator(Criteria.where("onboard_status").is("approve"))));
mongoOperation.find(query, ABC.class, "abc");
and these are the imports we use for the above classes.
import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
In 2.0.5.RELEASE this used to be working fine. We get the desired data. But in 3.1.5. version, we are getting the below error.
org.springframework.data.mapping.PropertyReferenceException: No property onboard found for type FluidApplication!
Below is the POJO definition for the above data.
`public class FluidApplication {
@Id
@JsonSerialize(using = ToStringSerializer.class)
private ObjectId id;
private String requestor_name;
private String requestor_email;
private String business_area;
private String onboard_status;
private String appType;
private String application_name;
private String application_type;
private String business_functionality;
private String service_critically;
private String business_impact;
private String golivedate;
} `
Please let us know how to solve this issue. We cannot use @column annotation above the fields as we have more fields of this kind in other collections and please let us know whether something has changed from 2.0.5.RELEASE to 3.1.5.