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:
phpnut 2007-05-20 05:05:18 +00:00
parent e2617621fd
commit dcad548cac

View file

@ -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);
}