Query of $ne null not working

215 views
Skip to first unread message

Kenner Stross

unread,
Oct 13, 2013, 12:06:26 PM10/13/13
to reacti...@googlegroups.com
I am trying to query for a field not being null, yet the query being passed doesn't appear to be constructed properly.  The relevant line of code that constructs the query (which is part of an aggregate pipeline) is:

BSONDocument("$match" -> BSONDocument("pf.ps" -> BSONDocument("$ne" -> null)))

... but the resulting section of the query looks like:

{ pf.ps: {} } }

Bug?  Or should I be constructing this in some other manner?

Thanks,
Kenner

Marcel Snijkers

unread,
Jan 27, 2014, 4:34:38 PM1/27/14
to reacti...@googlegroups.com
BSONDocument("$ne" -> BSONNull) works for me.
Reply all
Reply to author
Forward
0 new messages