[英]Firestore many to many relationships - How to update data?
Like a note app, you can set tags to a note.就像笔记应用程序一样,您可以为笔记设置标签。 Also, you can search notes with tag.
此外,您可以使用标签搜索笔记。 Here is the firestore structure:
这是firestore的结构:
notes(collection)
note_1(doc)
content: 'some words...'
tags: ['apple', 'banana']
tags(collection)
tag_1(doc)
name: 'apple'
tag_2(doc)
name: 'banana'
If I change tag_1.name to 'new_apple', how shold I update note_1.tags?如果我将 tag_1.name 更改为“new_apple”,我应该如何更新 note_1.tags?
You're going to have to:你将不得不:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.