mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Move the collection mapping query from inside the Metadata decorator to the getDatabasesDB resource factory. This avoids decorator-level database queries that can fail in various contexts and cause cascading issues. The mapping is loaded once when getDatabasesDB creates the database instance, and the results are passed to the Metadata decorator via setCollectionId(). The decorator itself is now stateless with respect to database queries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>