
Hi, I'm implementing appwrite with an offline first package. But I'm having problems with relationships because I need to get the id of the child document to create the local copy with the same id. The easiest thing would be to create another id attribute but I want to avoid this for two having two id fields. Is there a way to create the child document with a custom id?

title: 'Spiderman',
year: 2002,
reviews: [
{
$id: **CUSTOM ID**
author: 'Bob',
text: 'Great movie!',
$permissions: [
Permission.read(Role.any())
]
},
]
}```

You'll need to generate the ID locally. Maybe you can use this code?

Hi, thanks, I needed that too. As for what generated an automatic id, it was my mistake that I was ignoring the upload of the $id attribute 😅 but hey, the generation of the id locally also needed

[SOLVED] Relationship - Custom id for child document
Recommended threads
- 2 Columns still processing since yesterd...
Hey o/ Yesterday (around <t:1758045600:f>), I created a database and added several columns to it. After about 15 minutes, most of the "processing" tags disappe...
- 503 Timeout when Updating or Upserting D...
Hey I’m running into an issue when trying to update or upsert a row in Appwrite. The request hangs for a while and then throws this error: ``` AppwriteException...
- Row with the requested ID already exists...
I’m hitting a blocking issue creating rows in Appwrite (both from the console and my React Native app). After successfully inserting the first row, every subseq...
