-
Couldn't load subscription status.
- Fork 4.8k
Open
Labels
bugSomething isn't workingSomething isn't workingfeature / relationshipsFixes and upgrades for database relationshipsFixes and upgrades for database relationships
Description
👟 Reproduction steps
Setup
- Create two collections:
Assembly&Part(or whatever you like) - Create a
two-wayparent-child relationship between the collections. InsideAssembly:
i. Attribute Key:parts
ii. Attribute Key (related collection):assembly
iii. Relation: one-to-many
iv. Ensure to set the "on delete" behaviour to "Set document id to NULL in all related documents" - Write some code using the web SDK to subscribe to the
documentschannel for theAssemblycollection only (databases.*.collections.assembly.documents)
Testing
- Use
createDocumentin the SDK to create anAssembly - Use
updateDocumentin the SDK on theAssemblycreated above to add a newPartdocument, which creates the association for you - Observe that the promise for the
Assemblyis called (as expected) when the association was created - Observe in the Appwrite UI that the documents exist and have the data provided
- Now, use
deleteDocumentin the SDK on thePartabove, to remove the part and the association fromAssembly - Observe that the promise for the
Assemblyis not called - Observe in the Appwrite UI that the
Partno longer exists and the association inAssemblyis gone
👍 Expected behavior
✅ Real-time should send a payload update for Assembly when the association is created
✅ Real-time should send a payload update for Assembly when the association is deleted
👎 Actual Behavior
✅ Real-time should send a payload update for Assembly when the association is created
❌ Real-time should send a payload update for Assembly when the association is deleted
🎲 Appwrite version
Version 1.4.x
💻 Operating system
Linux
🧱 Your Environment
Appwrite is self-hosted with docker-compose in a virual machine on Ubuntu 22.04.
Appwrite Version: 1.4.1
Appwrite SDK: web
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
pbadr, malikdoksoz, kaykhahima, ishmeet5ingh and friedrich-melchert
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfeature / relationshipsFixes and upgrades for database relationshipsFixes and upgrades for database relationships