示例#1
0
文件: Model.php 项目: navruzm/lmongo
 /**
  * Insert the given attributes and set the ID on the model.
  *
  * @param  \LMongo\Eloquent\Builder  $query
  * @param  array  $attributes
  * @return void
  */
 protected function insertAndSetId($query, $attributes)
 {
     $keyName = $this->getKeyName();
     $this->setAttribute($keyName, $query->save($attributes));
 }