From 1104eaf591105abe04aa7a7510f494e1ec7ea49c Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sun, 31 Aug 2014 16:55:49 +0200 Subject: [PATCH] Fixed deprecated MongoDB option --- src/Dao/AbstractDao.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;