Open spring-projects-issues opened 5 years ago
Mark Paluch commented
We migrated in Spring Data MongoDB 2.1 off Querydsl's MongoDB support classes towards our own types as Querydsl requires DBObject API usage and we're already on the Document API. Currently, your only option would be subclassing SpringDataMongodbQuery
and increasing createQuery()
visibility to public
.
Using Querydsl together with Aggregation is a neat approach. Let's see whether we can provide dedicated support for this kind of queries out of the box
Hi @mp911de,
Using Querydsl together with Aggregation is a neat approach. Let's see whether we can provide dedicated support for this kind of queries out of the box
Is there anything new regarding this?
Best Regards, Frank
Cesar Tron-Lozai opened DATAMONGO-2177 and commented
When migrating to 2.1.3 I noticed that the
asDBobject
method of SpringDataMongodbQuery method has been removedI tried to work around it by trying to extend the class but most of the useful methods are either private or package private which makes it really hard to do that sort of things.
The reason I need that is because I want to to use a QueryDsl predicate into an aggregation pipeline.
I used to do it with something like that:
Then I would do some modification on the DBObject to add a prefix required by the aggregation and finally transform it into a CriteriaDefinition:
Now that the asDBObject method is method is gone, how can I get a Document or DBobject from a Predicate or a query?
Issue Links:
1 votes, 3 watchers