2

我正在尝试通过向每个实体添加一个额外的字段来更新整个集合。这不能解决问题:

from things 
as t
update 
{
    put( id(t), "NewField");
}

有人可以帮忙解决语法吗?

谢谢 !

4

1 回答 1

4

做就是了:

from things as t
update {
    t.nameOfNewField = "valueOfNewField"
}

看:

https://ravendb.net/learn/inside-ravenb-book/reader/4.0/2-zero-to-ravenb#patching-documents

于 2020-02-26T16:38:44.143 回答