Unverified Commit 4ae4a7c6 authored by jim5359's avatar jim5359 Committed by GitHub

Update src/Jenssegers/Mongodb/Relations/EmbedsMany.php

Co-Authored-By: 's avatarJens Segers <segers.jens@gmail.com>
parent 4cd4317e
......@@ -237,7 +237,7 @@ class EmbedsMany extends EmbedsOneOrMany
protected function associateNew($model)
{
// Create a new key if needed.
if ($model->getKeyName() == '_id' && !$model->getAttribute('_id')) {
if ($model->getKeyName() === '_id' && !$model->getAttribute('_id')) {
$model->setAttribute('_id', new ObjectID);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment