Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Mongodb: cast with "as" in query produces unexpected result #1427
I'm trying to cast a class in a query on mongodb, but it doesn't work as I would expect.
I wrote some unit tests to illustrate, you can see it here: https://github.com/jotak/querydsl/commit/28756b91c5a3494130f684e19c4266f1bb5300aa
2 of my tests fail:
the json produced is
instead of expected:
So it returns 0 result
For information, this ticket follows what I wrote on discussion board: https://groups.google.com/forum/#!topic/querydsl/KaUWIUwov6w
Just made a pull request #1428
I leave the "instanceOf" unsupported operation issue. Looks like the user must handle it his way. Maybe however we could imagine adding a kind "instanceOf" hooks in metadata, written by the user, so that the operation can be supported in mongodb.