We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi All,
I think that validation for aggregation with $size is invalid. Step by step:
Fongo version: 2.1.1
My collection:
[{ "_id": 5b894357a0c84d5a5d221f25, "conferenceName": "myFirstConference", "startDate": 1535722327, "endDate": 1535722420, "participants": [{ "name": "user1", "origin": "internal", "ip": "192.168.0.2" }, { "name": "user2", "origin": "external", "ip": "172.20.0.3" },{ "name": "user3", "origin": "internal", "ip": "192.168.0.3" }, ] } ]
My mongo query that works is :
db.collection.aggregate([{ "$project": { "conferenceName": 1, "startDate": 1, "endDate": 1, "internalUsersCount": { "$size": { "$filter": { "input": "$participants", "as": "part", "cond": { "$eq": ["$$part.origin", "internal"] } } } } } }])
In that case as an input we have a LinkedHasMap not List but parsing was implementet as below
class ProjectedSize ..... private String parseOperand(Object value) { if (!(value instanceof String) && (!(value instanceof List) || ((List) value).size() != 1)) { errorResult(coll, 16020, "the " + keyword + " operator requires an array of 1 operand"); } }
But it doesn't work in fongo, Anybody can help ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi All,
I think that validation for aggregation with $size is invalid. Step by step:
Fongo version: 2.1.1
My collection:
My mongo query that works is :
In that case as an input we have a LinkedHasMap not List but parsing was implementet as below
But it doesn't work in fongo, Anybody can help ?
The text was updated successfully, but these errors were encountered: