diff --git a/src/Dao/AbstractDao.php b/src/Dao/AbstractDao.php index 9811e2b2..06fe0e19 100644 --- a/src/Dao/AbstractDao.php +++ b/src/Dao/AbstractDao.php @@ -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;