Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updating doc blocks for bindModel and unbindModel, explaining that as…

…sociations are only reset when find() is called. Refs #652
  • Loading branch information...
commit 257665eb5b0b3eb928352b028961a6561457e040 1 parent ad51115
@markstory markstory authored
Showing with 10 additions and 7 deletions.
  1. +10 −7 cake/libs/model/model.php
View
17 cake/libs/model/model.php
@@ -510,14 +510,16 @@ function call__($method, $params) {
/**
* Bind model associations on the fly.
*
- * If $reset is false, association will not be reset
+ * If `$reset` is false, association will not be reset
* to the originals defined in the model
*
* Example: Add a new hasOne binding to the Profile model not
* defined in the model source code:
- * <code>
- * $this->User->bindModel( array('hasOne' => array('Profile')) );
- * </code>
+ *
+ * `$this->User->bindModel( array('hasOne' => array('Profile')) );`
+ *
+ * Bindings that are not made permanent will be reset by the next Model::find() call on this
+ * model.
*
* @param array $params Set of bindings (indexed by binding type)
* @param boolean $reset Set to false to make the binding permanent
@@ -554,9 +556,10 @@ function bindModel($params, $reset = true) {
*
* Example: Turn off the associated Model Support request,
* to temporarily lighten the User model:
- * <code>
- * $this->User->unbindModel( array('hasMany' => array('Supportrequest')) );
- * </code>
+ *
+ * `$this->User->unbindModel( array('hasMany' => array('Supportrequest')) );`
+ *
+ * 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
Please sign in to comment.
Something went wrong with that request. Please try again.