Saving Attributes Using The Mongoyii Extension

Sorry if this is a very basic question but…

Lets say I have a form with 4 fields - date, name, desc, and number. In the model file I specify using the rules() function that date, name, and desc are required. The number field is optional for the user to complete. When the user posts the form the three required fields populate the model object and are written to the mongodb. The problem is that the optional field number never gets written to the database. The optional field will save to mysql why does the same behaviour not occur in MongoDB?

any suggestions as to what I’m doing wrong?