Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix missing prefix when reading table schema.

When using prefixes, table metadata would be lost.
Fixes #1522

Signed-off-by: mark_story <mark@mark-story.com>
  • Loading branch information...
commit 8ff669dd1572fb8a6de8549068ca2795d4c6345d 1 parent 2bdb4fe
@fiblan fiblan authored markstory committed
Showing with 6 additions and 4 deletions.
  1. +6 −4 cake/libs/model/cake_schema.php
View
10 cake/libs/model/cake_schema.php
@@ -309,19 +309,21 @@ function read($options = array()) {
$systemTables = array(
'aros', 'acos', 'aros_acos', Configure::read('Session.table'), 'i18n'
);
-
+
+ $fulltable = $db->fullTableName($Object, false);
+
if (in_array($table, $systemTables)) {
$tables[$Object->table] = $this->__columns($Object);
$tables[$Object->table]['indexes'] = $db->index($Object);
- $tables[$Object->table]['tableParameters'] = $db->readTableParameters($table);
+ $tables[$Object->table]['tableParameters'] = $db->readTableParameters($fulltable);
} elseif ($models === false) {
$tables[$table] = $this->__columns($Object);
$tables[$table]['indexes'] = $db->index($Object);
- $tables[$table]['tableParameters'] = $db->readTableParameters($table);
+ $tables[$table]['tableParameters'] = $db->readTableParameters($fulltable);
} else {
$tables['missing'][$table] = $this->__columns($Object);
$tables['missing'][$table]['indexes'] = $db->index($Object);
- $tables['missing'][$table]['tableParameters'] = $db->readTableParameters($table);
+ $tables['missing'][$table]['tableParameters'] = $db->readTableParameters($fulltable);
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.