Behavior with aliases
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 97
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I'm thinking to enable the aliases on the fields. It would enable a cleaner attribute validation to avoid conflicts between builtin methods and the fields for example (as already done by Pydantic).
The current behavior I'm thinking of:
- If a field has an `alias` and no `key_name`, the resulting document key will be the alias
- It's still possible to customize the key_name with an alias already set by specifying the `key_name` kwarg
Do you think some more customization/options would be useful ?
Contributor guide
Research direction
No file or test is identified; start by locating the model field alias and key_name handling and reviewing how fields become MongoDB document keys. Done would require a decided alias/key_name behavior, documented edge cases around builtin-name conflicts, and tests covering the selected rules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb, python
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100