Created
March 10, 2012 22:17
-
-
Save kmiyashiro/2013589 to your computer and use it in GitHub Desktop.
Upsert nested array/objects possible?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have a schema that looks like this: | |
band: { | |
albums: [ | |
{ tweets: [ | |
{ tweet }, { tweet } | |
] } | |
] | |
} | |
I want to add the band (doc) if it doesn't exist. | |
I want to add the album if it doesn't exist on the band | |
I want to add the tweet to the album if it doesn't exist | |
Do I just do each of these serially or is there a way to upsert? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment