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
- Auth not working
guys my appwrite auth isnt working? oauth works (Sign in with google n discord) i have 2 websites deployed where do i get help when i do sign in with email and ...
- Need Urgent help
Hi Appwrite Support Team, My cloud project has exceeded its database reads limit for the current billing cycle and is currently locked. I am unable to access t...
- Claim student package
how can i claim this ? i have student developer package for my github account