Skip to content

🐛 Bug Report: incorrect error message when trying to create a document with oneway relationship the wrong way round #8345

Closed

Description

@LDY681

👟 Reproduction steps

Relationship between currency and user is oneway and should be "currency->user".
When I tried to create a user document with the other way round:
databases.createDocument( ...collectionUser, "1", { userID: "1", name: "han", type: "organization", currency: { currencyID: "han", amount: 100000, } }, allPermissions )

the error message I got instead is:
"AppwriteException [Error]: Invalid relationship value. Must be either a document ID or a document, array given.", which is very confusing.

👍 Expected behavior

An error message should say relationship attribute doesn't exist or something like that.

👎 Actual Behavior

"AppwriteException [Error]: Invalid relationship value. Must be either a document ID or a document, array given."

🎲 Appwrite version

Version 1.5.x

💻 Operating system

Windows

🧱 Your Environment

No response

👀 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?

Activity

  1. added
    bug
    on Jul 1, 2024
  2. added
    api / realtime
    on Oct 25, 2024
  3. HarshMN2345 commented on Sep 17, 2026

    @HarshMN2345
    Member

    this is fixed now , closing it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api / realtimebug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions