An easy one I guess. When executing on the mongo shell:
db.topic.find({"user_id":ObjectId("52e39be16700006700d646ad"), "post_id":null})
It will list all topics where post_id either is null or does not exist. This works fine.
However when using Scala code I try following which doesn't work:
val cursor = db("topic").find(
BSONDocument("user_id" -> user.id),
BSONDocument("post_id" -> null)).cursor[Topic]
cursor.collect[List]()
Basically I have to change the condition BSONDocument("post_id" -> null). But how?
Many thanks! Marcel