Migration to 1.1.3 issue

Hello eveyone.

Recently I updated framework to last version 1.1.3 and find out that some of things in my application are ot working now.

I have the CActiveRecord model and I extend it with my custom public fields, which I do not need to store in DB, but they are needed as fields in returned object;

After update to 1.1.3 version, for example, method findAllByPk returns array of models which have only collumn names as fields and have no public properties.

Does somebody have the same issue?

Thanks.

Could you provide a reduced test case?

Hi, I figured out that problem is in CJSON::encode($data);

Model Video.php




class Video extends CActiveRecord

{

	public $my_property = 'some value';

	


	public static function model($className=__CLASS__)

	{

		return parent::model($className);

	}


	public function tableName()

	{

		return 'videos';

	}

}

Then in my controller’s method:




$data = Video::model()->findAllByPk(array(1,2));

echo CJSON::encode($data);



Result now is


[{"id":"1","video_codec":"","audio_codec":"","download_file_id":"39","view_file_id":"0","title":"","duration":"0.00","frame_count":"0","frame_width":"0","frame_height":"0","video_bitrate":"0","audio_bitrate":"0","audio_sample_rate":"0","views":"0"},{"id":"2","video_codec":"","audio_codec":"","download_file_id":"0","view_file_id":"0","title":"","duration":"0.00","frame_count":"0","frame_width":"0","frame_height":"0","video_bitrate":"0","audio_bitrate":"0","audio_sample_rate":"0","views":"0"}]

So no public property my_property, only table fields, but it was here in 1.1.2

http://code.google.com/p/yii/issues/detail?id=1385

Thank you!