I am trying to query MongoDB and find the row which has a specific '_id' but I can not do that. When I write for example:
$r = $cursor->getNext();
and debug, I find the value of $r['_id'] is empty. Not null, but empty! Any idea why this happens and how to avoid it? Using PHP
Update:
I was able to retrieve the '_id' by $cursor->key()
but still I can't query and I wonder why the reason behind that!