Closed
Description
I get the error:
Undefined index: myId in /Jenssegers/Mongodb/Query/Builder.php:575
It looks like the Builder class is hard-coded to expect the key as _id:
return $sequence == '_id' ? $result->getInsertedId() : $values[$sequence];
This causes problems when doing a find($id) when you've modified the primaryKey to be something else in the model class.
public $primaryKey = 'myId';
I'm using the latest master version using PHP7 and Mongo 3.4
Metadata
Metadata
Assignees
Labels
No labels