Refactor active record meta data to be static field #2269

Merged
merged 5 commits into from Mar 30, 2013

Projects

None yet

4 participants

@klimov-paul
Member

Active Record meta data has been refactored to be static field.
Note about overriding "CActiveRecord::__construct()" has been added.

Relates to #2251

Migrated from #2265

@cebe cebe commented on the diff Mar 28, 2013
framework/db/ar/CActiveRecord.php
@@ -2297,8 +2296,6 @@ class CActiveRecordMetaData
*/
public $attributeDefaults=array();
- private $_model;
@cebe
cebe Mar 28, 2013 Yii Software LLC member

Need to change this to $_modelClass not delete it.
It is needed in exception thrown by addRelation in line 2356

@klimov-paul
klimov-paul Mar 28, 2013 Yii Software LLC member

Fixed.

@klimov-paul klimov-paul Field "CActiveRecordMetaData::$_modelClassName" has been added to tra…
…ck active record class and compose verbose exception messages.
557d30f
@klimov-paul
Member

Is there any objection about this one?

@samdark
Member
samdark commented Mar 29, 2013

Looks good to me. Don't see any side effects.

@yiisoft/core-developers opinios?

@qiangxue
Member

Looks fine to me.

@klimov-paul klimov-paul merged commit 42b525e into yiisoft:master Mar 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment