need help for embedded document mongodb

i am working on mongodb using the extension yiimongodbsuite everything works fine with the extension but i am pretty much confused on how to store embedded documents to collection in mongodb database.

As following the documention of yiimongodbsuite i did the following(i used the examples)

1.generated crud for the model User with embeddedDocuments commented out

2.then uncommented the embeddedDocuments in user and added the model UserAddress

3.added a form fields for address fields in views _form file of user (like the one below)


<div class="row">

		<?php echo $form->labelEx($model->address,'city'); ?>

		<?php echo $form->textField($model->address,'city'); ?>

		<?php echo $form->error($model->address,'city'); ?>

	</div>

4.now i have a form field for city,house, apartment,zip code etc in the browser

5.the problem is that the values are not being added to collection in the database

i am getting the below collection to be stored in database


{

   "_id": ObjectId("4d7a32e86242e2b004000002"),

   "username": "cvcb",

   "email": "vbvc",

   "personal_number": "bvcbcx",

   "first_name": "bxcbxc",

   "last_name": "bbxcbvcbvcb",

   "client": "vbxvcbc",

   "company": "bcbvcbvc" 

}



rather than


{

   "_id": ObjectId("4d7a32e86242e2b004000002"),

   "username": "cvcb",

   "email": "vbvc",

   "personal_number": "bvcbcx",

   "first_name": "bxcbxc",

   "last_name": "bbxcbvcbvcb",

   "address":

   {

     "city":"chennai",

      ....

   }

   "client": "vbxvcbc",

   "company": "bcbvcbvc" 

}



can anyone help me out for this