Browse Source

ActiveRecord::tableName() hardcoded prefix fix

tags/2.0.0-beta
Alexander Kochetov 11 years ago
parent
commit
dda9fec95e
  1. 2
      framework/yii/db/ActiveRecord.php

2
framework/yii/db/ActiveRecord.php

@ -183,7 +183,7 @@ class ActiveRecord extends BaseActiveRecord
*/ */
public static function tableName() public static function tableName()
{ {
return 'tbl_' . Inflector::camel2id(StringHelper::basename(get_called_class()), '_'); return static::getDb()->tablePrefix . Inflector::camel2id(StringHelper::basename(get_called_class()), '_');
} }
/** /**

Loading…
Cancel
Save