Skip to content

Conversation

@AlexPetul
Copy link
Contributor

Description

Simply skip setting up computed fields if the factory is configured to use persistence. Otherwise we treat this field as usual.

Closes #795

@AlexPetul AlexPetul marked this pull request as ready for review November 28, 2025 09:30
@AlexPetul AlexPetul requested a review from adhtruong as a code owner November 28, 2025 09:30
@github-actions
Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/polyfactory-docs-preview/799

@AlexPetul
Copy link
Contributor Author

In addition to issue #754, I don’t think we need a flag to control whether computed fields should be set.

If create_sync or create_async is used, enabling that flag would not make sense — it will lead to errors.
If the build method is used, then the value is generated by the factory anyway, so the flag is unnecessary.

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.

Bug: using Computed column in SQLAlchemy causes an exception

1 participant