| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…ation preservation Cover three scenarios: 1. Relationship annotations visible in __init_subclass__ hooks 2. Relationship fields excluded from Pydantic model_fields 3. End-to-end relationship functionality still works after the fix Fixes fastapi#530
| Back | FazBrowse Home | New Git URL |
Fixes #530. This PR ensures that Relationship annotations are preserved in annotations during the class creation phase, allowing init_subclass and other initialization hooks to inspect them.
The fix preserves all original annotations in the metadata passed to the base metaclass, and then cleans up any Pydantic fields automatically created for relationships to avoid validation overhead.