How To Correct A Cexception Caused Due To Case Sensitive Column Name

I’m new to Yii framework. My application designed with Yii 1.0 works fine in local system. When I migrated the same in production, I got

CException: Property not defined


The problem was :

Date field in a table was case sensitive. In my local system, Date was


, but in production Date was


. This caused an exception.

To correct this exception, I used get and set methods as shown below -

public function getdate()


    return $this->date;


public function setdate($date)


    $this->date = $date;


But I’m not sure if I can use this to correct the exception. Is it the right way to correct such exceptions. Please help as I’m the only one working on this in my office and no guide.

One solution is to configure the database to not be sensitive to case:…ensitivity.htmlAnother is to change case in database, or in code.