Add value mapping for native enums#452
Conversation
|
@agronholm please have a look at this small fix |
agronholm
left a comment
There was a problem hiding this comment.
Just wondering if it makes sense to add a test against the actual issue.
I'm not sure how you'd go about testing it with an actual database to the playing field. While I do think it's worth adding real E2E tests for this library , I feel it's an effort worthy of its own PR |
Using an SQLite database to add a record involving an enum would suffice I think. |
So that's a real database, nonetheless. Setting any database is not an issue. Building E2E test infrastructure is a bit of a bigger task I'd like to properly design at some point. We'll get there |
Changes
Fixes #450
Add
values_callableto allow for enum values to be inserted properlyChecklist
If this is a user-facing code change, like a bugfix or a new feature, please ensure that
you've fulfilled the following conditions (where applicable):
tests/) which would fail without your patchCHANGES.rst).If this is a trivial change, like a typo fix or a code reformatting, then you can ignore
these instructions.
Updating the changelog
If there are no entries after the last release, use
**UNRELEASED**as the version.If, say, your patch fixes issue #123, the entry should look like this:
If there's no issue linked, just link to your pull request instead by updating the
changelog after you've created the PR.