I would like to create a comments section and store the comments as follows:
[
{
"name" = '',
"comment" = '',
"created" = Date.now()
}
]
and later would like to get the data as comments[0]?.name. I would like to store this as an array in the appwrite document. Is this possible?
Are you on Appwrite Cloud?
I highly recommend creating a collection of comments.
yes
Ok... but how am I supposed to link that to the documents?
like
each ducmunet in the posts will also have a document in the comments
but how am I supposed to like the,?
like in supabase
In Appwrite 1.3, we added built-in support for relationships. Unfortunately, Appwrite cloud is currently on version 1.1.2.
For now, you can have an array of strings in posts and put the document IDs of the related comments.
Or you can put the ID of the post in the comment and then you can fetch all the comments for that post.
okay
Recommended threads
- proccessing problems
A database schema operation is stuck in my Frankfurt project. In the matryq database, the workspaceId attribute of the coaching_activity_entries collection rema...
- User column is processing
I am still encountering the processing tag after creating a column in my database. and its not a network or refresh issue, i have refreshed over and over, shutd...
- MariaDB refuses to connect to appwrite
Earlier, I tried updating my Appwrite version from 18.1.x to the latest release because my Flutter package required it to function properly. I used the official...