fakemongo / fongo

faked out in-memory mongo for java
Apache License 2.0
523 stars 156 forks source link

Support for BasicQuery with MongoOperations? #287

Open anat0lius opened 7 years ago

anat0lius commented 7 years ago

Does fongo support MongoOperations using BasicQuery?

When I try to run this query:

@Autowired
private MongoOperations operations;

String queryStry = "
{
    'tags': 
    { 
        $all: 
        [
            { 
                $elemMatch: 
                { 
                    'field1':'foo', 'field2': {$gte: 2 } 
                } 
            }
        ]
    }
}";

List<Foo> result = operations.find(new BasicQuery(queryStr), Foo.class);

It returns me null and it shouldn't. Could be related with https://github.com/fakemongo/fongo/issues/286 ?