#relationship
65 messages · Page 1 of 1 (latest)
- Two way
- Many to many
As Movie can have multiple cast members
And each of the cast members can have be in multiple movies
Can you share a screenshot?
You should make it by id in that collection
In general you'll need to have a pivot table (collection) in between'
i didnt understand
One second let me check something
Just did it
and it worked
Maybe you had changed the attributes key values?
This is cloud or self-hosted?
self hosted
What are the logs of
docker logs appwrite
docker logs appwrite-worker-databases
What version of Appwrite you've?
[Job] Received Job (65428f8e117732.23925076).
Attribute not found
[Job] (65428f8e117732.23925076) successfully run.
its 1.4.6
i just deleted the collection... i will create it from scratch now
can you try changing the attribute key to something else?
its giving error on change of attribute key
Worked
for me its not working
What are the logs here?
[Error] Timestamp: 2023-11-01T17:54:09+00:00
[Error] Method: DELETE
[Error] URL: /v1/databases/:databaseId/collections/:collectionId/attributes/:key
[Error] Type: Appwrite\Extend\Exception
[Error] Message: Attribute with the requested ID could not be found.
[Error] File: /usr/src/code/app/controllers/api/databases.php
[Error] Line: 2339
[Error] Timestamp: 2023-11-01T17:54:09+00:00
[Error] Method: DELETE
[Error] URL: /v1/databases/:databaseId/collections/:collectionId/attributes/:key
[Error] Type: Appwrite\Extend\Exception
[Error] Message: Attribute with the requested ID could not be found.
[Error] File: /usr/src/code/app/controllers/api/databases.php
[Error] Line: 2339
You tried to delete now?
Can you try on a new collection and check the logs right after?
this is my cast collection
this is my movie relation
this is the error
[Error] Timestamp: 2023-11-01T17:55:37+00:00
[Error] Method: GET
[Error] URL: /v1/databases/:databaseId/collections/:collectionId
[Error] Type: Appwrite\Extend\Exception
[Error] Message: Collection with the requested ID could not be found.
[Error] File: /usr/src/code/app/controllers/api/databases.php
[Error] Line: 883
Okay gotcha
make sure the values are not the same
and try again
Make them different
You've tried with 2 different names?
what im doing is having same relation with different attribute names.. is this why its failing?
i can confirm its the same issue
appwrite-worker-databases>Logs
[Job] (654294c7df0245.50787320) successfully run.
[Job] Received Job (6542950fdf5980.82210554).
Collection _37_26 already exists
[Job] (6542950fdf5980.82210554) successfully run.
same problem in appwrite cloud also
if we try to create another relation with the same collection.. it fails
What you've entered this time
it can be anything... it just fails when we create another relation with the same collection
Intereseting, Let's see what
Steven would say
there is already an issue https://github.com/appwrite/appwrite/issues/6281
@bold knot can you help me with this? Where to set the variables
https://github.com/appwrite/appwrite/issues/6281#issuecomment-1763763198
I want to create multiple two way relationships with same collections
you're doing many to many?
Yes
Many to many… two way relationship
this sin't the right issue then. there's another issue for many to many. in short, you can't. there's no workaround
Ohh what’s the alternative then? Create array of strings and store the ids?