Invalid relationship value. Must be either a document ID or a document, array given.
- 0
- Self Hosted
- Functions
- Databases
- Flutter
![](https://cdn.discordapp.com/avatars/580821350143492117/ee46d87816443e25b5f3d89ec794835d.webp)
Since updating to 1.5.6 and 1.5.7 I'm getting this error: Invalid relationship value. Must be either a document ID or a document, array given. I've downgraded back to 1.5.5, where it's working again.
It's a simple dart function which creates a new document with a relationship:
final docId = ID.unique();
await databases.createDocument(
databaseId: 'exampleDbId',
collectionId: 'exampleCollectionId',
documentId: docId,
data: {
'title': 'Example',
'nestedDocs': [
{
"\$id": docId,
"array": [],
},
]
},
);
Stacktrace:
Error: Invalid relationship value. Must be either a document ID or a document, array given.
#0 ClientMixin.prepareResponse (package:dart_appwrite/src/client_mixin.dart:73)
#1 ClientIO.call (package:dart_appwrite/src/client_io.dart:249)
<asynchronous suspension>
#2 Databases.createDocument (package:dart_appwrite/services/databases.dart:1060)
appwrite: ^12.0.3 dart_appwrite: ^11.0.2
Recommended threads
- Bandwidth increasing doubts
Hello , I don't want to disturb you , I just want to get my answers , My question is , I am not using any functions or storage , just using db and users auth ,...
- Query issue when getting the document fr...
I get an error when i try to get document from the database and use query to select only 1 column. **Error:** `java.lang.NullPointerException: null cannot be c...
- How to alter attributes in collections
Hi there, unluckily I made avatar as string. I should have make it URL. I forgot. Now my URLs for avatar coming more than 156 char. For hot fix, I need to use l...
![](/images/bgs/pre-footer.png)