Rename a collection
Solution
Use the Update
function:
ObjectV(ref: RefV(id = "dilapidated_huts", collection = RefV(id = "collections")),ts: LongV(1622573797800000),history_days: LongV(30),name: StringV(dilapidated_huts))
map[history_days:30 name:dilapidated_huts ref:{dilapidated_huts 0xc000109920 0xc000109920 <nil>} ts:1622573818060000]
{ref: ref(id = "dilapidated_huts", collection = ref(id = "collections")), ts: 1622573868770000, history_days: 30, name: "dilapidated_huts"}
{
ref: Collection("dilapidated_huts"),
ts: 1622573895370000,
history_days: 30,
name: 'dilapidated_huts'
}
{'ref': Ref(id=dilapidated_huts, collection=Ref(id=collections)), 'ts': 1622573900340000, 'history_days': 30, 'name': 'dilapidated_huts'}
{
ref: Collection("dilapidated_huts"),
ts: 1624310573640000,
history_days: 30,
name: 'dilapidated_huts'
}
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!