mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-09 13:02:40 +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');
|
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
|
* @var array
|
||||||
* @access protected
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $__backAssociation = array();
|
var $__backAssociation = array();
|
||||||
|
|
||||||
|
@ -365,18 +365,18 @@ class Model extends Overloadable {
|
||||||
|
|
||||||
ClassRegistry::addObject($this->currentModel, $this);
|
ClassRegistry::addObject($this->currentModel, $this);
|
||||||
ClassRegistry::map($this->currentModel, $this->currentModel);
|
ClassRegistry::map($this->currentModel, $this->currentModel);
|
||||||
|
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
|
|
||||||
if($table === false) {
|
if($table === false) {
|
||||||
$this->useTable = false;
|
$this->useTable = false;
|
||||||
} else if($table) {
|
} else if($table) {
|
||||||
$this->useTable = $table;
|
$this->useTable = $table;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->useTable !== false) {
|
if ($this->useTable !== false) {
|
||||||
$this->setDataSource($ds);
|
$this->setDataSource($ds);
|
||||||
|
|
||||||
if ($this->useTable === null) {
|
if ($this->useTable === null) {
|
||||||
$this->useTable = Inflector::tableize($this->name);
|
$this->useTable = Inflector::tableize($this->name);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue