Partial update array - create / initialize a null array #3022
Unanswered
alexjamesbrown
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to add an item to an array using partial update - for an array that doesn't yet exist in the document?
Now that I've typed that out, it does sound like a silly question, but to illustrate the point, I've extended the
CosmosGettingStartedproject slightly, and added a property to theFamilyobject:public class Family
{
// omitted for brevity
public Address Address { get; set; }
Notice I've added `AddressList
What I want to do, is a partial update, something like this:
This fails - because AddressList doesn't exist:
If I init the AddressList in the ctor of family, this works as expected.
Beta Was this translation helpful? Give feedback.
All reactions