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?
do I need to explicitly list each relationship in the Query?
Hello <@559315728927424552> Were you able to solve this issue? I am currently having the same problem
For anyone having similar issue in the future, adding this line works
Query.select(["*", "businessAddress.*", "bankDetails.*", "emergencyContact.*"]),
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...
Did you upgrade the SDK?
Yes, it didn't get the relationships data, only $id
Yes, that is the expected behavior in the 1.8 SDK. See https://appwrite.io/blog/post/announcing-opt-in-relationship-loading and https://appwrite.io/docs/products/databases/relationships#performance-loading
I understand, that means it's not backward compatible. Existing projects break when migrating to 1.8
- Relationships are experimental so the behavior may change
- 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
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!
This is just to give you time to upgrade to the new SDK
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?
Yes, you should use TablesDB. We have no plans to change it
Recommended threads
- MongoDb Database Breaks integer[] & bigi...
I've got a table with the below column created. When I try to insert the value `[-3408048000]` into it, the dart sdk cloud function call is successful (no error...
- Error can not create `tablesdb` event wi...
When i'm trying to add an event with `tablesdb` i get an error message My event value: `tablesdb.mtg-decklist-dev.tables.queue_parsing.rows.*.create` Same err...
- Delete on cascade from Cloud Function
I'm writing a Python function that deletes a user's main row from a table in my database. This row has relationships with other tables that use cascade deletion...