Differ DB field names from Model field names

Hey everybody!

I am trying to use Yii on an old DB which has a website based on.

The field names on that DB are ugly and sometimes do not reflect anything. Therefore, I want to set different field names on the Model class to make the work easier.

How can I set differ Model field names from the DB names?



I suggest you to change database field name. I dont know how can set different name, but I know that mantain different name from model and effective database can be cause of mistakes.