Permalink
Browse files

Fix table alias in ar->exists method

  • Loading branch information...
1 parent 826be39 commit 729a333d84b354007f89a0ce531136d229d17017 @s-larionov s-larionov committed Feb 4, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 framework/db/ar/CActiveRecord.php
@@ -1613,7 +1613,7 @@ public function exists($condition='',$params=array())
$this->applyScopes($criteria);
if(empty($criteria->with))
- return $builder->createFindCommand($table,$criteria)->queryRow()!==false;
+ return $builder->createFindCommand($table,$criteria,$this->getTableAlias(false, false))->queryRow()!==false;
else
{
$criteria->select='*';

0 comments on commit 729a333

Please sign in to comment.