question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NpgsqlSnakeCaseNameTranslator breaking change

See original GitHub issue

Steps 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:closed
  • Created 4 years ago
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
rojicommented, May 14, 2020

@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.

0reactions
ygoecommented, May 14, 2020

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found