I found following errors.
In blog demo example database, it occurs when using limit and HAS_MANY join.
class TestController extends Controller
{
public function actionIndex()
{
$criteria = new CDbCriteria(
array( 'with' => array('comments') )
);
$criteria->compare('comments.author', 'Tester', false);
$criteria->limit = 10; // It works if delete this line
$result = Post::model()->findAll($criteria);
print_r($result);
}
}
Error message:
CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘comments.author’ in ‘where clause’
operating system: Mac OS X snow leopard
Web server: Apache 2.2.16
browser type: Google Chrome
Yii version: Yii 1.1.4.r2429
Please any help.