I’ve not look deep into the AR component but still wanna ask if anyone know how to fetch row from AR query in the same way of fetching from DataReader.
For example:
$articles = Article::model()->findAll(); //I have an array of Article object
If I need to perform some modification to each object then I have to make a loop and it slows down performance. I am thinking about
$resource = Article::model()->findAll(param1, param2,…,return_raw_resource)
while(($article = $resource->read()) != false){
//modify $article's attributes
//add to an array
}
Thanks