Skip to content

INTPYTHON-602 Fix loading of embedded model fields that use database converters #295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

timgraham
Copy link
Collaborator

@timgraham timgraham commented Apr 27, 2025

No description provided.

@timgraham timgraham marked this pull request as ready for review May 4, 2025 23:42
@timgraham timgraham requested a review from WaVEV May 4, 2025 23:42
return None
# Apply database converters to each field of the embedded model.
for field in self.embedded_model._meta.fields:
expression = Col("", field)
Copy link
Collaborator

Choose a reason for hiding this comment

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

🤔 I think an Expression(output_field=field) is a better approach, it is more minimalistic.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've amended this PR since the from_db_value() approach doesn't work for nested models.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants