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)
|
if ($entity->id)
|
||||||
{
|
{
|
||||||
unset ($arrayEntity['_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
|
else
|
||||||
{
|
{
|
||||||
$this->collection->insert($arrayEntity, ['safe' => true]);
|
$this->collection->insert($arrayEntity, ['w' => true]);
|
||||||
}
|
}
|
||||||
$entity = $this->entityConverter->toEntity($arrayEntity);
|
$entity = $this->entityConverter->toEntity($arrayEntity);
|
||||||
return $entity;
|
return $entity;
|
||||||
|
|
Loading…
Reference in a new issue