NpgsqlSnakeCaseNameTranslator breaking change
See original GitHub issueSteps to reproduce
In version 4.0.9, the NpgsqlSnakeCaseNameTranslator.TranslateMemberName
method would translate the name En13757Index
as en13757_index
, as one would expect.
In version 4.1.1, the result is en13757index
. This leads to column not found in the queries.
This breaking change is not listed in the release notes.
Should this change be reverted before I upgrade to the newer version, or should I change my database schema to use the new (wrong?) column name?
Further technical details
Npgsql version: 4.1.1 PostgreSQL version: 12 Operating system: Windows 10
Using Entity Framework Core 2, but this class is probably not related to EF. If it is, please move this issue to the EF repo.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (9 by maintainers)
Top Results From Across the Web
Npgsql integration with Entity Framework Code First
2) In the Apply - change how the Table names are generated via ... var mapper = new NpgsqlSnakeCaseNameTranslator(); foreach (var table in ......
Read more >Breaking changes included in EF Core 3.x
Complete list of breaking changes introduced in Entity Framework Core 3.x.
Read more >Npgsql 4.0 Release Notes
Npgsql 4.0 is out and available at nuget.org. This is a major version with significant changes, upgrade with care, consult the breaking changes...
Read more >Class JsonHandler | Npgsql Documentation
However, although it is public, it should be considered somewhat unstable, and may change in breaking ways, including in non-major releases.
Read more >Migrate SQL Server Database to PostgreSQL using EF ...
We had to find a way to avoid breaking changes of the application ... mapper = new NpgsqlSnakeCaseNameTranslator();foreach (var table in ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ygoe thanks for your understanding - the name translator API is indeed meant for you to create your own implementations as you see fit. The version of NpgsqlSnakeCaseNameTranslator which was used in 4.0.10 is here.
Okay, that makes this feature unusable for me. Fortunately I can just replace it. I’ll have to copy out the old code into my application to get reasonable results. While I’m searching it, does somebody have a link to it at hand?