-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Marc Tarin opened DATAMONGO-2327 and commented
Hello.
Starting with Spring Data MongoDB 2.1.9 (Spring Boot 2.1), SpringDataMongodbQuery inherits its where() method from QuerydslAbstractMongodbQuery instead of AbstractMongodbQuery.
QuerydslAbstractMongodbQuery favors org.bson.Document over com.mongodb.DBObject
Therefore, while AbstractMongodbQuery$toString() provides a parseable JSON string of a queryDSL Predicate (using DBObject$toString()), QuerydslAbstractMongodbQuery$toString() does not, as it uses Document.toString().
For use cases similar to the example in the referred URL, QuerydslAbstractMongodbQuery could benefit having a toJson() method that internally uses Document$toJson()
Affects: 2.1.9 (Lovelace SR9)
Reference URL: https://stackoverflow.com/a/48824169/5873923
Referenced from: pull request #774