DAO inside CActiveRecord classes


i have a class that extends a CActiveRecord

there are any problem using my own function with DAO inside?

i mean, when i do new Class it will perform any db querys by default?


Have you found a solution to your problem,

I would also like to know if there are any problems using my own function with DAO inside the CActiveRecord class?

Why should there be a problem? ActiveRecord uses DAO which is built on top of PDO so I don’t see a problem. It could be a bit more complicated if you want to override a CActiveRecord method but if you are adding new ones it should be straight forward. The only thing you should remember is that you’ll have to use CActiveRecord’s populateRecord/populateRecords methods to instantiate models and fill them with the results of your DAO queries if you need that.