incubator icon indicating copy to clipboard operation
incubator copied to clipboard

MongoCollection::find now requires fields param to be associative array

Open tkroll opened this issue 7 years ago • 1 comments

Old code using the fields param as an array now fails with only the _id returned.

$blah = Blah::find([ 'fields' => ['a', b', c'], 'conditions' => ['a' => 1] ]);

Field parms now works when expressed with the field as the key and 1 as the value:

$blah = Blah::find([ 'fields' => [ 'a' => 1, 'b' => 1, 'c' => 1 ], 'conditions' => ['a' => 1] ]);

Not sure why this changed. It does match Mongo shell syntax properly.

tkroll avatar Aug 01 '17 04:08 tkroll

@sergeysviridenko Could you please take a look

sergeyklay avatar Aug 01 '17 07:08 sergeyklay

Try to use phalcon/[email protected]

Jeckerson avatar Jul 09 '23 21:07 Jeckerson