Rank 3: Container
how will i make relationship between collections in appwrite cloud?
Votes
1
Replies
21
Participants
Unknown
Messages
22
Rank 3: Container
how will i make relationship between collections in appwrite cloud?
Have a read through this: https://appwrite.io/docs/databases-relationships
Rank 3: Container
according to this , i need Relationship
Rank 3: Container
but there is no attribute named relationship in appwrite cloud
Rank 3: Container
I am creating educational app , in that i am creating Quiz , i want to give may to many field questions in quiz , so that its easier to get and update questions in any quiz .
Rank 3: Container
How will i achieve this ?
Oh I didn't notice you wanted it in cloud. Relationships were introduced in 1.3.x and Cloud is on 1.1.2 so the Relationships feature isn't available on it.
That being said, you could manually setup relationships by creating an attribute that keeps track of the related document's ID.
Rank 3: Container
like i will store quiz id in every question ? and fetch according to that?
depends on what you want to do, but yes
Rank 3: Container
i am currently migrating from appwrite self hosting to cloud
Rank 3: Container
in my self hosting i was using relationship and it works absolutely fine
that's probably because your self-hosted version is on 1.3.x
Rank 3: Container
yes 1.3
Rank 3: Container
so for now , what should i do?
well as I said, if you want to create relationships on cloud, you'll have to manually reference document IDs
Rank 3: Container
which will be good option for manual reference document id , storing all question id in an array named questions in every quiz , or storing quiz id in every question , so that i can easily get every question for each quiz easily?
i guess storing the ids of all questions in an array will be better.
Rank 3: Container
and we will paas this array in query in questions to gvet all the data
yep
Rank 3: Container
is it good idea , because in my every quiz almost 200 question will be there , so passing a query with 200 elements araay is good idea or not?
sure why not?
[CLOSED] Relationships in Appwrite Cloud