Where is the map file between the database schema and the Yii class of the CActiveRecord class?
I am using gii to create CActiveRecord classes when building a website with Yii. The contents of the database can then be visited through an object of the appropriate class. Here is my question: where is the map file between the database schema and the Yii CActiveRecord class? I checked all the files in the web project and found no such file.
+3
source to share
1 answer
I believe CActiveRecord is actually querying the system schema tables in the database, rather than storing a file with the schema discovered by gii. This is why you can simply add a new column to the table and then reference it in your model views without updating the model (unless you want to set an attribute label for it).
+2
source to share