Skip to content

Conversation

ryangalamb
Copy link

Fixes #1278

@ryangalamb ryangalamb changed the title Support merging sqlmodel FieldInfos in Annotated [WIP] Support merging sqlmodel FieldInfos in Annotated Jan 28, 2025
field_infos.append(default_field_info)

# HACK: Quick and dirty way of merging into a new sqlmodel.FieldInfo object.
with mock.patch("pydantic.fields.FieldInfo", FieldInfo):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This call to mock.patch is no longer necessary. I'll implement the merging logic in sqlmodel before marking this PR as ready.

(I wanted to get feedback on the overall approach before taking the time to re-implement the pydantic logic.)

@svlandeg svlandeg added the feature New feature or request label Feb 20, 2025
@svlandeg svlandeg changed the title [WIP] Support merging sqlmodel FieldInfos in Annotated ✨ Support merging FieldInfo values from multiple Pydantic Field objects Feb 20, 2025
@svlandeg svlandeg changed the title ✨ Support merging FieldInfo values from multiple Pydantic Field objects ✨ Support merging FieldInfo values from multiple Field objects Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants