I have a custom sql query which returns a number of AR objects depending on some input parameters. This query is complex enough to avoid using AR methods so I have raw SQL query. To speed up repetitive queries, I'd like to use SQL prepared statements, but these two approaches do not merge.
If I use CDbCommand and CDbDataReader then it won't return AR objects automatically. And if I use findBySql method it will issue new query every time I call it and it doesn't accept some other CDbCommand object created earlier.
Is there any way to use these two together?