execute() not updating all the time

I’ve noticed that when using CDbCommand->execute() to perform UPDATE query Yii does not really update anything if the updated data will not change after being updated. For instance, I have a field with data = 9. I randomly add a number to that field. If add up 0[zero] execute would not update the field and the execute() function will return 0 which is an issue as I cannot validate if update has been performed successfully. I velidate it by


$rowCount=$diff->execute();

if($rowCount<'1')

....throw error

Can you please advise if this is the expected behaviour of the execute() function or I am missing something :(

regards,

bettor

RESOLVED

How? Was it really Yii problem?