From other threads here I read that Yii Active Record uses Parameter Binding and Prepared Statements whereever possible. Is there some documentation on that (other than the sourcecode ).
I have trouble writing database independend code. I used Yii DAO and it seems to work, but I would rather use Active Record in that part of code. Another problem I ran into: getting the Primary Key with AR is much more easy and already implemented in a database independend way. I didn’t see a way to use Yii DAO and get the id of the last record, without doing something like
Not 100% sure, but a quick look shows, that CDbCommandBuilder::bindValue() (which is used by AR) uses CDbConnection::getPdoType() to find the correct PDO type from a PHP type. So you’re probably out of luck to set your custom type for AR.