浏览代码

Merge pull request #114 from janriokrause/master

Issue with double prefixed shadow tables
Mark S. 11 年之前
父节点
当前提交
a2e471f987
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Model/Behavior/RevisionBehavior.php

+ 2 - 2
Model/Behavior/RevisionBehavior.php

@@ -971,10 +971,10 @@ class RevisionBehavior extends ModelBehavior {
 		}
 		$shadowModel = $this->settings[$Model->alias]['model'];
 		if ($shadowModel) {
-			$options = array('class' => $shadowModel, 'table' => $fullTableName, 'ds' => $dbConfig);
+			$options = array('class' => $shadowModel, 'table' => $shadowTable, 'ds' => $dbConfig);
 			$Model->ShadowModel = ClassRegistry::init($options);
 		} else {
-			$Model->ShadowModel = new Model(false, $fullTableName, $dbConfig);
+			$Model->ShadowModel = new Model(false, $shadowTable, $dbConfig);
 		}
 		if ($Model->tablePrefix) {
 			$Model->ShadowModel->tablePrefix = $Model->tablePrefix;