Rank 2: Process
I have a Post collection with reference to User collection using userId. When I get all post, is there a way to automatically get user's details as well for each post? Im using Client SDK and Cloud.
Votes
0
Replies
10
Participants
Unknown
Messages
11
Rank 2: Process
I have a Post collection with reference to User collection using userId. When I get all post, is there a way to automatically get user's details as well for each post? Im using Client SDK and Cloud.
Not for now (it's not available in the self-hosted version as well)
For this use case it will be a bit complex
Rank 2: Process
Hey @Binyamin , if I install server SDK and set the relationship programmatically. Will it work for my use case?
Rank 2: Process
Im about to try this. But As I read your reply, would like to double check. https://appwrite.io/docs/databases-relationships#create-in-code
Relationship won't work as you're working with the cloud
Rank 2: Process
I see... I need self-hosted for it to work?
What combination of AppWrite tools or setup would you suggest so I can create a complex App with AppWrite?
Do you have links to some repo that implements complex CRUD using React/Next? Would really appreciate it. 🙏
Rank 2: Process
Some features Im looking to try to implement with Appwrite:
You can do something like this.
Create another users collection, in add all of your user details, create a function that will get trigger each time new user is created or edited, then you can update that users collection with ease.
In the posts collection add user_id relationship field of many to one to the users collection.
For user groups the best would be to use Appwrite teams
Rank 2: Process
I see gotcha! Thanks @Binyamin 🙏
Rank 2: Process
Hey @Binyamin if I go this path - "make a sequential request to get user details", will I hit request limit? I encounter request limit last time. Im not sure if this type of request is not counted on that.
You'll probably hit it yes.
To avoid that you'll have to use function