在RethinkDB中的功能中更新对象

Example data in table rooms:

{
    "id": "8ae9865-b602-41f7-8637-9fd5517095d9",
    "members": {
        "12345": {
            "Id": 12345,
            "Name": "User1",
            "LastUpdated": timestamp
        }
    }
}

My query:

        result, err := r.DB(rethinkdbDatabase).Table("rooms").Filter(
            r.Row.Field("members").HasFields(playerIdStr)).Nth(0).Default(nil).Do(func(room r.Term) interface{} {
            return r.Branch(
                    room.Ne(nil),
                    room.Update(map[string]interface{}{
                            "LastUpdate": r.Now(),
                    }),
                    r.DB(rethinkdbDatabase).Table("rooms").Insert(map[string]interface{}{
                            "id": r.UUID(),
                            "members": map[string]interface{}{
                                    playerIdStr: map[string]interface{}{
                                            "LastUpdate": r.Now(),
                                            "Name":       request.Player.Name,
                                            "Id":         request.Player.Id,
                                    },
                            },
                    }, r.InsertOpts{
                            Durability: "hard",
                    }),
            )
    }).Run(rethinkdbClient)

It gives the following error:

gorethink: Expected type SELECTION but found DATUM:
{
    "id":   "08ae9865-b602-41f7-8637-9fd5517095d9",
    "members":      {
    "7360165":      {
    "Id":   7360165,
    "LastUpdate":   {
    "$reql_type$":  "TIME",
    "epoch_time":   1486826898.51,
    "timezone":     "+00:00"
    },
    "Name": "Player1"
    }
    }
} in:
r.Do(func(var_10 r.Term) r.Term { return r.Branch(var_10.Ne(<nil>), var_10.Update({LastUpdate=r.Now()}), r.DB("drill_dev").Table("rooms").Insert({id=r.UUID(), members={7360165={LastUpdate=r.Now(), Name="Player1", Id=7360165}}}, durability="hard")) }, r.DB("drill_dev").Table("rooms").Filter(func(var_9 r.Term) r.Term { return r.Row.Field("members").HasFields("7360165") }).Nth(0).Default(<nil>))

To my understanding, the issue appears to be, that the room variable is of type OBJECT which is not compatible with the update function, therefore the call room.Update({...}) does not work. How can I update the "LastUpdated" field in the nested document without having to filter the table again, using the room variable?

Because the document room has an id, you can select the document by id (instead of filtering the whole table a second time) and update it that way.