Browse Source

Add removed getDataSource() call.

This fixes an issue where the wrong datasource could potentially be used
for getting the full table name.
mark_story 13 years ago
parent
commit
0bbf61ce3d
1 changed files with 1 additions and 0 deletions
  1. 1 0
      lib/Cake/Model/CakeSchema.php

+ 1 - 0
lib/Cake/Model/CakeSchema.php

@@ -257,6 +257,7 @@ class CakeSchema extends Object {
 				if (!is_object($Object) || $Object->useTable === false) {
 					continue;
 				}
+				$db = $Object->getDataSource();
 
 				$fulltable = $table = $db->fullTableName($Object, false, false);
 				if ($prefix && strpos($table, $prefix) !== 0) {