ravendbravendb-studio

patching a collection to add a field


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'});"
        });

Solution

  • Use:

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