|Re: [mongodb-user] Updating the elements in an array||Sammaye||10/12/12 8:10 AM|
Those two documents are the same.
However I am guessing you wish to push a new subdocument to the questions field. You can use $push for this: http://www.mongodb.org/display/DOCS/Updating#Updating-%24push
On 12 October 2012 15:55, RK <ero...@gmail.com> wrote:
|Re: [mongodb-user] Updating the elements in an array||Jeremy Mikola||10/12/12 1:38 PM|
Since we're dealing with visits you may want to only add an object to the array if it's not already present. In that case, the $addToSet operator might be desirable.