i\'m trying to compare two string in mongoDB spring Data.
My Code:
@GET
@Path(\"/reqvolatility\")
@Produces(MediaType.APPLICATION_JSON)
p
Standard query operations do not compare the values of one field against another. In order to do this, you need to employ the JavaScript evaluation server side which can actually compare the two field values:
Assuming both fields are ISODate instances
BasicQuery query = new BasicQuery(
new BasicDBObject("$where", "this.creationTime.getTime() != this.lastModified.getTime()")
);