Add support of table prefixes to CActiveRecord::tableName() & how about under_score instead of CamelCase

I suggest to replace

public function tableName()


return get_class($this);



return ‘{{’.get_class($this).’}}’;

For support of table prefixes.

And even make something like camelCaseToUnderscore(get_class($this))

(I dont shure that it’s good idea, but under_score is used more often than CamelCase in naming DB tables)