Adding fix for #2210

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4655 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-03-23 07:08:40 +00:00
parent 38577ca149
commit 2925df7c54

View file

@ -273,13 +273,13 @@ class DataSource extends Object{
* @return mixed
*/
function describe($model) {
if (isset($this->__descriptions[$model->table])) {
return $this->__descriptions[$model->table];
if (isset($this->__descriptions[$model->tablePrefix.$model->table])) {
return $this->__descriptions[$model->tablePrefix.$model->table];
}
$cache = $this->__cacheDescription($model->tablePrefix.$model->table);
if ($cache !== null) {
$this->__descriptions[$model->table] =& $cache;
$this->__descriptions[$model->tablePrefix.$model->table] =& $cache;
return $cache;
}
return null;