If i have a Person collection that has many addresses, how can I insert multiple addresses that belong to a person? I know how to do it if it were a one to one relationship where I would simply do something like:
db.persons.update({_id: '12345'}, {$set: {'address': '12345 fake st'}})
However, that won't work for a one to many relationship since the person's address would get replaced every time someone adds an address to that person. Can someone help? Thank you in advance.