patching a collection to add a field

219 views Asked by At

I'm wanting to patch a RavenDB to add a field to a collection but am just getting errors using the suggested syntax. (I'm probably not understanding what I'm supposed to use)

I've tried the following in the patch window but get error: ' "Message": "Deserializing Json object with empty string as property name is not supported." '

store
    .DatabaseCommands
    .Patch(
        new ScriptedPatchRequest
        {
            Script = "_.extend(this, { 'GroupPlayString': 'Group Play'});"
        });
1

There are 1 answers

1
Ayende Rahien On BEST ANSWER

Use:

        Script = "this.GroupPlayString = 'Group Play'"