Yii Framework Forum: Saving Attributes Using The Mongoyii Extension - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Saving Attributes Using The Mongoyii Extension Rate Topic: -----

#1 User is offline   enginedave 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 05-March 11
  • Location:Northern Ireland

Posted 04 September 2013 - 05:40 PM

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?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users