added butchInsert to mongo model
This commit is contained in:
@ -77,12 +77,13 @@ class MongoDriver extends NoSqlDbDriver
|
||||
return $this->query($command, $params);
|
||||
}
|
||||
|
||||
public function insert($collection, $data, $safe = true)
|
||||
public function insert($collection, $data, $multiple = false, $safe = true)
|
||||
{
|
||||
$command = MongoCommandBuilder::factory(MongoCommandBuilder::INSERT, $this->getCollection($collection));
|
||||
$params = array(
|
||||
'data' => $data,
|
||||
'safe' => $safe
|
||||
'safe' => $safe,
|
||||
'multiple' => $multiple
|
||||
);
|
||||
$result = $this->query($command, $params);
|
||||
$this->last_insert_id = $result->getInsertId();
|
||||
|
Reference in New Issue
Block a user