Fixed deprecated MongoDB option
This commit is contained in:
parent
0889472bf3
commit
1104eaf591
1 changed files with 2 additions and 2 deletions
|
@ -25,11 +25,11 @@ abstract class AbstractDao implements ICrudDao
|
|||
if ($entity->id)
|
||||
{
|
||||
unset ($arrayEntity['_id']);
|
||||
$this->collection->update(['_id' => new \MongoId($entity->id)], $arrayEntity, ['safe' => true]);
|
||||
$this->collection->update(['_id' => new \MongoId($entity->id)], $arrayEntity, ['w' => true]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->collection->insert($arrayEntity, ['safe' => true]);
|
||||
$this->collection->insert($arrayEntity, ['w' => true]);
|
||||
}
|
||||
$entity = $this->entityConverter->toEntity($arrayEntity);
|
||||
return $entity;
|
||||
|
|
Loading…
Reference in a new issue