Skip to content
Back

Problem with saving to database with ID not unique with uniquely generated ID.

  • 0
  • Databases
Stefatorus
8 Apr, 2025, 20:41

Attached code.

I've attached debug logs too.The ID doesn't exist in the DB.

TL;DR
Developers are having trouble saving to the database due to a non-unique ID, even though IDs are being generated uniquely. Suggestions were made to temporarily remove relationships and debug the issue. The issue has been ongoing despite updates and manual creation of nested objects followed by creating the company using the ID. It's possible that relationships might be causing the problem.
Kenny
8 Apr, 2025, 20:47

Could this be an issue with your relationships maybe? If you remove those from the data object what happens?

Stefatorus
8 Apr, 2025, 20:47

I think that is likely the case, yes

Stefatorus
8 Apr, 2025, 20:48

But i'm not sure why

Stefatorus
8 Apr, 2025, 20:48

The way I save is by manually creating the nested objects then creating the company using the ID

Stefatorus
8 Apr, 2025, 20:48

i'm on an older appwrite, but I had this issue for a while now

Stefatorus
8 Apr, 2025, 20:48

and i've pdated with no sucess

Kenny
8 Apr, 2025, 20:49

Could you remove relationships and add back 1 by 1 to see which one is the offender?

Kenny
8 Apr, 2025, 20:50

I know relationships are in beta and not fully there, which could also be the issue.

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