$criteria->limit, not working...

My code looks like this




			$criteria = new CDbCriteria;

			$criteria->with = array(

				'client',

				'tags'=>array('with'=>array('tagValue'))

				);

			$criteria->condition = 'tagValue.value LIKE :v OR client.name LIKE :v';

			$criteria->params = array(':v'=>'%'.$searchWord.'%', ':b'=>$orderBy);

			$criteria->order = "published ASC";

			//$criteria->limit = 5;

			

			$works = Work::model()->findAll($criteria);



Whenever I uncomment criteria->limit = 5, I got error message:

CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘tagValue.value’ in ‘where clause’

But without limit the query seems to be work correctly. Is there any idea what could be wrong in my query?

Thanks in advance!

Try adding together = true to criteria.