For example, if {code...} is generated by YII according to AR, the class name should also be current_version_id. how can we change the name of the generated class to currentVersionId? The matter is urgent, please answer YII .. For example:
CREATE TABLE 'tbl_myr_version' ( 'current_version_id');
If YII is generated based on AR, the class name should also becurrent_version_id,
, How to change the name of the generated class to currentVersionId?
The matter is urgent, please answer YII ..
Reply content:
For example:
CREATE TABLE 'tbl_myr_version' ( 'current_version_id');
If YII is generated based on AR, the class name should also becurrent_version_id,
, How to change the name of the generated class to currentVersionId?
The matter is urgent, please answer YII ..
This can be entered by yourself when the Model is generated in gii.
If you do not need gii, you can create a file name in the models directory.CurrentVersionId.php
And then write the code.
Class CurrentVersionId extends CActiveRecord {public static function model ($ className =__ CLASS _) {return parent: model ($ className);} public function tableName () {// to use the prefix tbl _, return '{myr_version}' using these two curly brackets }}';}}
Yii will automatically load.