Hello, in the controller initialization for a lot of actions it sets the model via:
$model=new ABC('search');
$model->unsetAttributes(); // clear any default values
if(isset($_GET['ABC']))
$model->attributes=$_GET['ABC'];
How would I go about initializing a model like this, but with certain conditions? For example, I want exactly what the above code returns, but only for rows with id < 100, for example. I tried using ABC::model()->Stories >findAll($criteria), and that returns the rows that I want, but not in the same form as the above code returns. Ultimately I want to plug in a custom $model into a CGridView. The above works, but the ->findAll gives me errors when I plug it into CGridView. Any help is appreciated. Thanks.