morphia-0.99.jar, mongo-java-driver-2.5.3.jar, mongodb-10gen 1.8.1
MongoDB does not allow to have multiple "$or" conditions and Morphia just
silently uses the last "$or" condition applied. Surprisingly enough, the rich
Query API builds the whole query structure and then just blindly sets the "$or"
field when building MongoDB query DBObject.
This should be detected either when
a) When building MongoDB object (which is relatively easy - you just have to
check "$or" field before setting it)
b) When .or() is called.
I think that throwing UnsupportedOperationException is adequate response in
this case.
Original issue reported on code.google.com by Pasko.Bo...@gmail.com on 29 Jun 2011 at 7:48
Original issue reported on code.google.com by
Pasko.Bo...@gmail.com
on 29 Jun 2011 at 7:48