Skip to content
Browse files

CStatElement with join bugfix

  • Loading branch information...
1 parent cf1c20c commit bbd21413c9bc75cf573ee8c629fcf07f40edff83 @Yiivgeny Yiivgeny committed Jan 28, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 framework/db/ar/CActiveFinder.php
View
2 framework/db/ar/CActiveFinder.php
@@ -1398,7 +1398,7 @@ private function queryOneMany()
// generate and perform query
if(count($fks)===1) // single column FK
{
- $col=$table->columns[$fks[0]]->rawName;
+ $col=$tableAlias.'.'.$table->columns[$fks[0]]->rawName;
$sql="SELECT $col AS $c, {$relation->select} AS $s FROM {$table->rawName} ".$tableAlias.$join
.$where.'('.$builder->createInCondition($table,$fks[0],array_keys($records),$tableAlias.'.').')'
." GROUP BY $col".$group

0 comments on commit bbd2141

Please sign in to comment.
Something went wrong with that request. Please try again.