Back

relationship

  • 0
  • Self Hosted
  • Databases
Binyamin
1 Nov, 2023, 18:00

and try again

TL;DR
Summary: The user is having trouble creating multiple two-way relationships with the same collection in Appwrite. They are experiencing an error when attempting to create another relation with the same collection. They have tried different attribute names but are still getting the error. It is suggested to update Appwrite and ensure that the attribute names are different. Solution: Update Appwrite and use different attribute names for the relationships.
Binyamin
1 Nov, 2023, 18:00
Binyamin
1 Nov, 2023, 18:00

Make them different

rohan
1 Nov, 2023, 18:06

i just updated the appwrite

rohan
1 Nov, 2023, 18:06

now its working fine

rohan
1 Nov, 2023, 18:08

im still getting the error

Binyamin
1 Nov, 2023, 18:08

You've tried with 2 different names?

rohan
1 Nov, 2023, 18:08

what im doing is having same relation with different attribute names.. is this why its failing?

rohan
1 Nov, 2023, 18:10

i can confirm its the same issue

rohan
1 Nov, 2023, 18:13

appwrite-worker-databases>Logs

TypeScript
[Job] (654294c7df0245.50787320) successfully run.
[Job] Received Job (6542950fdf5980.82210554).
Collection _37_26 already exists
[Job] (6542950fdf5980.82210554) successfully run.
rohan
1 Nov, 2023, 18:23

same problem in appwrite cloud also

if we try to create another relation with the same collection.. it fails

Binyamin
1 Nov, 2023, 18:24

What you've entered this time

rohan
1 Nov, 2023, 18:26

it can be anything... it just fails when we create another relation with the same collection

rohan
1 Nov, 2023, 18:27
rohan
1 Nov, 2023, 18:27
Binyamin
1 Nov, 2023, 18:28

Intereseting, Let's see what <:appwrite:1156975611466764298> Steven would say

rohan
1 Nov, 2023, 18:45
rohan
3 Nov, 2023, 19:31

@Steven can you help me with this? Where to set the variables https://github.com/appwrite/appwrite/issues/6281#issuecomment-1763763198

rohan
3 Nov, 2023, 19:32

I want to create multiple two way relationships with same collections

Drake
3 Nov, 2023, 21:51

you're doing many to many?

rohan
3 Nov, 2023, 21:52

Yes

rohan
3 Nov, 2023, 21:52

Many to many… two way relationship

Drake
3 Nov, 2023, 21:52

this sin't the right issue then. there's another issue for many to many. in short, you can't. there's no workaround

rohan
3 Nov, 2023, 21:54

Ohh what’s the alternative then? Create array of strings and store the ids?

Drake
3 Nov, 2023, 22:25

i would create a collection with 2 string attributes

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