Skip to content

Conversation

kenbailey
Copy link
Contributor

@roji, the previous fix #5278 appears to only have been applied to the generic MapEnum method. I'm looking for same behavior when using the non-generic MapEnum method.

Also, I'm looking at switching to NpgsqlDataSourceBuilder as GlobalTypeMapper is obsolete. Does NpgsqlDataSourceBuilder support the EFCore.PG enum fix?

Previous fix appears to only have been applied to the
generic MapEnum method. Looking for same behavior when
using the non generic MapEnum method.
@kenbailey kenbailey requested review from roji and vonzshik as code owners March 15, 2024 00:01
Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

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

Right, the non-generic enum mapping APIs were added in #4852, after the enum hackiness was introduced (in #5278), and didn't align with that. So this makes sense to me.

Also, I'm looking at switching to NpgsqlDataSourceBuilder as GlobalTypeMapper is obsolete. Does NpgsqlDataSourceBuilder support the EFCore.PG enum fix?

I did do some work to make EFCore.PG be compatible with NpgsqlDataSource+enums, but looking at the code, it seems like this wasn't completed 😅 One of my high priorities for 9.0 is to clean up this mess, and introduce a non-hacky way to manage enums across the Npgsql/EFCore.PG stack. I suggest sticking with the global type mapper for now, until that happens.

@roji roji merged commit fbbb282 into npgsql:main Mar 15, 2024
@roji roji added this to the 8.0.3 milestone Mar 15, 2024
roji pushed a commit that referenced this pull request Mar 15, 2024
Previous fix appears to only have been applied to the
generic MapEnum method. Looking for same behavior when
using the non generic MapEnum method.

(cherry picked from commit fbbb282)
@roji
Copy link
Member

roji commented Mar 15, 2024

Backported to 8.0.3 via ce51c27

@kenbailey
Copy link
Contributor Author

Excellent, thanks @roji!

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