appwrite: 🐛 Bug Report: Multiple many to one relations in a database fail

👟 Reproduction steps

Create two Database collections and set a many to one or relation for a field from collection a to b. Now repeat the step for a second field. The second relation can not be created.

Tried this for many to one and many to many.

Originally raised and discussed this issue on Discord and was asked to file a bug report: https://discord.com/channels/564160730845151244/1152869638431068220

in depth sample: I have a collection Ports holding a list of available ports to travel to and from. I also have a collection Reservations where the user stores a travel plan. I need to reference Ports-Document two times in each Reservation, first for departure and than for destination. this seems to not be possible with the current relation management.

👍 Expected behavior

Allow multiple references from one collection to another.

👎 Actual Behavior

The Reference is only set up once, more fields fail at creation.

🎲 Appwrite version

Version 1.4.x

💻 Operating system

Linux

🧱 Your Environment

Tried in 1.4.2 and 1.4.3 plain install according docs docker run... on Ubuntu 22.04

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn’t find similar issue

🏢 Have you read the Code of Conduct?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 9
  • Comments: 16 (10 by maintainers)

Most upvoted comments

@hinnerkweiler @moshOntong-IT Until we finish working on this issue, as a work-around you can set twoWay = true and then you will have the option to set the twoWayKey with a unique name 👍

yes @moshOntong-IT we are working on a fix for this issue 👍