Fix reverse links for existing nested documents - #972
HarshMN2345 wants to merge 3 commits into
Conversation
|
Warning Review limit reachedNext included review available in 30 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Creating a parent with an existing child supplied as a nested
Documentcould drop the reverse relationship, even though supplying the same child ID as a string worked. Preserve only the reverse link generated by the enclosing create while continuing to process the child’s scalar fields and other nested relationships. Keep that link in permission change detection at the relationship depth limit and clear its temporary context when the write finishes or fails.Regression coverage checks five relationship configurations, returned and persisted links and nested changes, denied reads/updates, one-to-one duplicate rollback, permission enforcement at maximum depth, and recovery after a rejected write. All nine targeted runs pass across SQLite normal, shared-table, and Mirror modes (177 assertions); the three regressions fail against unchanged upstream. Syntax, Pint, and diff checks pass. Targeted PHPStan reports the same seven existing diagnostics as upstream, with no new diagnostics. GitHub CI passes on this head: all 16 adapter suites, unit tests, Pint, and CodeQL. The PostgreSQL, MongoDB, shared-table MariaDB, SQLite, and Mirror logs confirm the new regression methods executed.
Appwrite must adopt a released package version to receive this change.