Disabling Model::loadInfo() for models that do not use tables

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4426 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-02-03 17:31:42 +00:00
parent 381bd36c94
commit 75eea8950c

View file

@ -801,8 +801,10 @@ class Model extends Overloadable {
function loadInfo() {
$db =& ConnectionManager::getDataSource($this->useDbConfig);
if (!is_object($this->_tableInfo) && $db->isInterfaceSupported('describe')) {
if (!is_object($this->_tableInfo) && $db->isInterfaceSupported('describe') && $this->useTable !== false) {
$this->_tableInfo = new Set($db->describe($this));
} elseif ($this->useTable === false) {
return new Set();
}
return $this->_tableInfo;
}