mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding fix for #2587, _ _backAssociation as real class member
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5125 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
e2617621fd
commit
dcad548cac
1 changed files with 6 additions and 6 deletions
|
@ -312,10 +312,10 @@ class Model extends Overloadable {
|
|||
var $__associations = array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany');
|
||||
|
||||
/**
|
||||
* Holds association data to be reverted to
|
||||
* Holds model associations temporarily to allow for dynamic (un)binding
|
||||
*
|
||||
* @var array
|
||||
* @access protected
|
||||
* @access private
|
||||
*/
|
||||
var $__backAssociation = array();
|
||||
|
||||
|
@ -365,18 +365,18 @@ class Model extends Overloadable {
|
|||
|
||||
ClassRegistry::addObject($this->currentModel, $this);
|
||||
ClassRegistry::map($this->currentModel, $this->currentModel);
|
||||
|
||||
|
||||
$this->id = $id;
|
||||
|
||||
|
||||
if($table === false) {
|
||||
$this->useTable = false;
|
||||
} else if($table) {
|
||||
$this->useTable = $table;
|
||||
}
|
||||
|
||||
|
||||
if ($this->useTable !== false) {
|
||||
$this->setDataSource($ds);
|
||||
|
||||
|
||||
if ($this->useTable === null) {
|
||||
$this->useTable = Inflector::tableize($this->name);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue