
When I create a two way relationship and select for example one to many ( eg. one survey -> many questions), in the related collection it is created also as one to many (one question -> many surveys).. is this as expected ?

If it's two way then both collections will have a relationship to each other

I think if you did a one to many, the other collection would actually be a many to one, unlike what you have above.

I would have expected that but it looks like this

huh, yea, I can see that in my own project too. Wonder if that's just a typo mistake? I believe it works as you would expect. At least that's my experience.

Thank you, maybe that's the case, and it' just a typo

In this case, would it be possible to create a "child" document in the questions collection and automatically update an existing "parent" document in the surveys collection ? The documentation only shows the other way around

If it's two way I think you can do
databases.createDocument('[DATABASE_ID]', 'Survey', '[DOCUMENT_ID]', {
questions: [...questions]
});
OR
databases.createDocument('[DATABASE_ID]', 'Question', '[DOCUMENT_ID]', {
survey: survey
});
Recommended threads
- New Provider isn't working | Invalid OAu...
Hallo, I set up a new provider in Appwrite. I followed all the documentation, I set up everything, I successfully ran both Appwrite console and backend, and I f...
- github copilot for xcode MCP AppWrite
I am trying to connect github copilot for xcode to appwrite mcp server. I keep getting a • MCP error -32000: Connection closed. I tried to verify my info, so...
- Appwrite Sites: Error At Deployment
Hello, I am using Appwrite 1.7.4 on a self-hosted instance and am experiencing an issue with Appwrite Site's manual deployment. ```powershell [12:44:43] [open-...
