jeudi 9 avril 2015

$ne in mongodb not giving proper result

Vote count:


$ne in momgodb using java not giving proper result. Am i missing something? My database is as below. enter image description here

Which contains value where mac_address = "-".

My code for retrieving records where mac_address != "-" is as,

BasicDBObject whereQuery = new BasicDBObject("mac_address", new BasicDBObject("$ne", "-"));
DBCursor cursor = node_info.find(whereQuery);

It's returning all the records. What can be probably wrong.?

asked 1 min ago

$ne in mongodb not giving proper result

Aucun commentaire:

Enregistrer un commentaire