You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 21, 2019. It is now read-only.
class Test extends EMongoDocument {
public function embeddedDocuments() {
return array('test1' => 'Test1'),
}
}
class Test1 extends EMongoEmbeddedDocument {
public $test2;
public function behaviors() {
return array(
'test2Behavior => array(
'class'=>'ext.mongodb.extra.EEmbeddedArraysBehavior',
'arrayPropertyName'=>'test2', // name of property, that will be used as an array
'arrayDocClassName'=>'Test2' // class name of embedded documents in array
),
),
}
}
class Test2 extends EMongoEmbeddedDocument {
public $property1;
}
public $compensation;
.
.
public function behaviors() {
return array(
array(
'class' => 'ext.YiiMongoDbSuite.extra.EEmbeddedArraysBehavior',
'arrayPropertyName' => 'compensation', // name of property, that will be used as an array
'arrayDocClassName' => 'CompensationBasic' // class name of embedded documents in array
),
);
}
.
.
}
class CompensationBasic extends EMongoEmbeddedDocument {
public $allowances;
public $deductions;
.
.
.
public function behaviors() {
return array(
array(
'class' => 'ext.YiiMongoDbSuite.extra.EEmbeddedArraysBehavior',
'arrayPropertyName' => 'allowances', // name of property, that will be used as an array
'arrayDocClassName' => 'CompensationAllowances' // class name of embedded documents in array
),
array(
'class' => 'ext.YiiMongoDbSuite.extra.EEmbeddedArraysBehavior',
'arrayPropertyName' => 'deductions', // name of property, that will be used as an array
'arrayDocClassName' => 'CompensationDeductions' // class name of embedded documents in array
),
);
}
.
.
}
class CompensationAllowances extends EMongoEmbeddedDocument {
.
.
.
}
class CompensationDeductions extends EMongoEmbeddedDocument {
.
.
.
}
With the following configuration:
I cannot access:
actually I can do the following:
i.e. arrays are not being converted to objects.
The text was updated successfully, but these errors were encountered: