@@ -96,6 +96,7 @@ abstract class DaoSaveableDefaultImplementation implements DaoSaveable, Serializ
|
||||
*/
|
||||
public function updateFromSaveableObj($saveableObject){
|
||||
$this->saveableObject = $this->toObject($saveableObject);
|
||||
|
||||
if (!property_exists($this->saveableObject, "deleted")){
|
||||
$this->saveableObject->deleted = false;
|
||||
}
|
||||
|
||||
@@ -164,6 +164,9 @@ class GenericDao{
|
||||
|
||||
$bulk = new MongoDB\Driver\BulkWrite();
|
||||
if ( array_key_exists("_id", $saveObj) && !is_null($saveObj["_id"]) ){
|
||||
if (is_string( $saveObj["_id"]) ){
|
||||
$saveObj["_id"] = new MongoDB\BSON\ObjectID($saveObj["_id"]);
|
||||
}
|
||||
$bulk->update(array("_id"=>$saveObj["_id"] ),$saveObj);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user