Use fill()+save() instead of save()

This commit is contained in:
Samuel Georges 2015-06-27 14:32:52 +10:00
parent 6c6c7b9e1f
commit f4efcb455e
4 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,7 @@
* **Build 27x** (2015-06-xx)
- List columns now support specifying a `default` option used when the value would otherwise be null.
- Implement a custom autoloader for plugins that use composer. Now only one instance of composer is used, all packages are now added to a global pool to prevent double loading and the load order is respected.
- The method signature of `Model::save()` has been fixed to match Eloquent.
* **Build 272** (2015-06-27)
- Protected images and their thumbnails are now supported in the back-end.

View File

@ -915,7 +915,8 @@ class RelationController extends ControllerBehavior
if ($this->viewMode == 'multi') {
$model = $this->relationModel->find($this->manageId);
$model->save($saveData, $this->manageWidget->getSessionKey());
$model->fill($saveData);
$model->save(null, $this->manageWidget->getSessionKey());
}
elseif ($this->viewMode == 'single') {
$this->viewWidget->setFormValues($saveData);

View File

@ -125,7 +125,8 @@ class SettingsModel extends ModelBehavior
{
$data = is_array($key) ? $key : [$key => $value];
$obj = self::instance();
return $obj->save($data);
$obj->fill($data);
return $obj->save();
}
/**

View File

@ -1,7 +1,5 @@
<?php namespace System\Classes;
use Composer\Autoload\ClassLoader as ComposerLoader;
/**
* Composer manager
*