yiimongodbsuit with embedded, eval

Hi

Can you help me to understand how can I describe the model and get "multilevel" data ?

For example. I have collection with document:

{

"name":"russia",

"props":

{

"rate":"1000"

}

}

And model

class MyCountry extends EMongoDocument

{

public $name;





...





public function embeddedDocuments()


{


	return array(


		'props' => 'MylocationProps',


	);


}

}

Than in controller…

$contries = MyCountry::model()->findAll();

And in View I want to parse this data and create Javascript object{}

So I tried

alert(’<?=json_encode($contries)?>’);

And I don’t see key ‘props’ and of course inner values (only key ‘name’).

It has now sence to eval this data from now and create javascript object.

Where I was wrong ?