Very recent install. Excluding fields in find()
doesn’t seem to work.
I have tried every variation I can imagine of the following and still ‘Potnum’ is returned.
php > $a = $db->selectCollection("image")->find(array('Potnum' => 1), array('Potnum' => false, 'Dirpath' => true, 'Filename' => true))->toArray();
php > var_dump($a);
array(1) {
[0]=>
object(MongoDB\Model\BSONDocument)#276 (1) {
["storage":"ArrayObject":private]=>
array(4) {
["_id"]=>
object(MongoDB\BSON\ObjectId)#273 (1) {
["oid"]=>
string(24) "5f3057ccd84aeb83c4872119"
}
["Potnum"]=>
int(1)
["Dirpath"]=>
string(11) "a/burnished"
["Filename"]=>
string(16) "watercarrier.png"
}
}
}