Permalink
Browse files

set schemaName for joinTable object in TranslateBehavior

  • Loading branch information...
rchavik committed Nov 7, 2011
1 parent 2048518 commit 813ecb6348b9ecdb90f449f15c8749a42d3db44a
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/Cake/Model/Behavior/TranslateBehavior.php
@@ -102,6 +102,7 @@ public function beforeFind($model, $query) {
$joinTable = new StdClass();
$joinTable->tablePrefix = $tablePrefix;
$joinTable->table = $RuntimeModel->table;
+ $joinTable->schemaName = $RuntimeModel->getDataSource()->getSchemaName();
if (is_string($query['fields']) && 'COUNT(*) AS '.$db->name('count') == $query['fields']) {
$query['fields'] = 'COUNT(DISTINCT('.$db->name($model->alias . '.' . $model->primaryKey) . ')) ' . $db->alias . 'count';

0 comments on commit 813ecb6

Please sign in to comment.