Back

[SOLVED] Having difficulty with relationship with User

  • 1
  • Web
Haysquare
12 Aug, 2023, 20:57

Hello there, I created a user which is under Auth on my appwrite dashboard, I have another collection that I would like to have manytomany to users but It was bringing User out under the list to choose from but was showing other collections, Please how can I achieve this.

TL;DR
The user was having difficulty with creating a relationship between a user and another collection in the appwrite dashboard. They wanted to achieve a many-to-many relationship, but the user was not appearing in the list of options to choose from. The solution provided was to create an appwrite function that stores user details in a separate collection and then relate to that collection for any desired relationships. However, it was mentioned that currently, it is not possible to make a relationship directly to the auth service.
Drake
13 Aug, 2023, 04:11

At the moment you can't make a relationship to the auth service.

I typically create a collection for public user data and relate to that

Haysquare
13 Aug, 2023, 14:18

How were you able to connect that with the logged in users

safwan
13 Aug, 2023, 14:27

You can create an appwrite function that runs when a new account is created. This function can then store the user details in a collection.

You can use this collection for any relationships you want

Haysquare
13 Aug, 2023, 17:24

Alright thank you

Drake
13 Aug, 2023, 20:03

[SOLVED] Having difficulty with relationship with User

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more