Skip to content
Back

database documents relationships

  • 0
  • 3
  • Self Hosted
  • Web
Alex Bourg
1 Nov, 2025, 15:56

after migrating from 1.7.4 to 1.8, database get document and list documents is getting results but with no relationship values,

the relationship attribute will get the $id of the other document as a string instead of an array, but won't contain the values. is this intentional or is it a bug?

TL;DR
Need to list each relationship in the query explicitly. Upgrading to appwrite 1.8 breaks existing projects, so use the 1.7.4 SDK. Forward-compatible if SDK is not changed. Use TablesDB for future-proofing.
1 Nov, 2025, 17:18

do I need to explicitly list each relationship in the Query?

13 Nov, 2025, 21:45

Hello <@559315728927424552> Were you able to solve this issue? I am currently having the same problem

13 Nov, 2025, 22:09

For anyone having similar issue in the future, adding this line works Query.select(["*", "businessAddress.*", "bankDetails.*", "emergencyContact.*"]),

14 Nov, 2025, 00:01

Hey <@828784993278230600> unfortunately appwrite 1.8 doesn't have proper backward compatibility, I had to dowgrade to 1.7.4 because this workaround works but it means we have to re-code all existing projects...

14 Nov, 2025, 02:48

Did you upgrade the SDK?

14 Nov, 2025, 04:19

Yes, it didn't get the relationships data, only $id

14 Nov, 2025, 04:25

I understand, that means it's not backward compatible. Existing projects break when migrating to 1.8

14 Nov, 2025, 04:27
  1. Relationships are experimental so the behavior may change
  2. If you didn't change the SDK, the behavior would have stayed the same. That's what makes it backwards compatible. Upgrading the SDK a major versions means there can be major changes
14 Nov, 2025, 13:20

alright that makes sense, so if we upgrade to appwrite 1.8, and want to keep it compatible, we need to use the 1.7.4 sdk. thanks for this clarification!

14 Nov, 2025, 21:45

This is just to give you time to upgrade to the new SDK

15 Nov, 2025, 00:10

Thanks Steven! I am recreating my main project now using the new SDK. is it correct to develop everything using TablesDB instead of the legacy Databases? and if yes, will this be future proof or will it change again?

15 Nov, 2025, 00:33

Yes, you should use TablesDB. We have no plans to change it

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