Commit 652ef4b0 authored by Jens Segers's avatar Jens Segers

Tweaking PR #145

parent b5efc304
...@@ -162,7 +162,7 @@ class EmbedsMany extends Relation { ...@@ -162,7 +162,7 @@ class EmbedsMany extends Relation {
protected function performInsert(Model $model) protected function performInsert(Model $model)
{ {
// Create a new key. // Create a new key.
if ( ! isset($model['_id']) or empty($model['_id'])) if ( ! $model->getAttribute('_id'))
{ {
$model->setAttribute('_id', new MongoId); $model->setAttribute('_id', new MongoId);
} }
......
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