|
@@ -1219,7 +1219,7 @@ class Model extends Object {
|
|
|
* @return array Array of table metadata
|
|
* @return array Array of table metadata
|
|
|
*/
|
|
*/
|
|
|
public function schema($field = false) {
|
|
public function schema($field = false) {
|
|
|
- if (!is_array($this->_schema) || $field === true) {
|
|
|
|
|
|
|
+ if ($this->useTable !== false && (!is_array($this->_schema) || $field === true)) {
|
|
|
$db = $this->getDataSource();
|
|
$db = $this->getDataSource();
|
|
|
$db->cacheSources = ($this->cacheSources && $db->cacheSources);
|
|
$db->cacheSources = ($this->cacheSources && $db->cacheSources);
|
|
|
if (method_exists($db, 'describe') && $this->useTable !== false) {
|
|
if (method_exists($db, 'describe') && $this->useTable !== false) {
|