|
|
@@ -953,9 +953,11 @@ class Model extends Object implements CakeEventListener {
|
|
|
* Example: Turn off the associated Model Support request,
|
|
|
* to temporarily lighten the User model:
|
|
|
*
|
|
|
- * `$this->User->unbindModel( array('hasMany' => array('Supportrequest')) );`
|
|
|
+ * `$this->User->unbindModel(array('hasMany' => array('SupportRequest')));`
|
|
|
+ * Or alternatively:
|
|
|
+ * `$this->User->unbindModel(array('hasMany' => 'SupportRequest'));`
|
|
|
*
|
|
|
- * unbound models that are not made permanent will reset with the next call to Model::find()
|
|
|
+ * Unbound models that are not made permanent will reset with the next call to Model::find()
|
|
|
*
|
|
|
* @param array $params Set of bindings to unbind (indexed by binding type)
|
|
|
* @param boolean $reset Set to false to make the unbinding permanent
|
|
|
@@ -967,7 +969,7 @@ class Model extends Object implements CakeEventListener {
|
|
|
if ($reset === true && !isset($this->__backAssociation[$assoc])) {
|
|
|
$this->__backAssociation[$assoc] = $this->{$assoc};
|
|
|
}
|
|
|
-
|
|
|
+ $models = Hash::normalize((array)$models, false);
|
|
|
foreach ($models as $model) {
|
|
|
if ($reset === false && isset($this->__backAssociation[$assoc][$model])) {
|
|
|
unset($this->__backAssociation[$assoc][$model]);
|