Skip to content

Fix postgres enums mappings #4945

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

denis-tsv
Copy link
Contributor

@denis-tsv denis-tsv commented May 10, 2025

Fix for #4940

@denis-tsv denis-tsv changed the title 4940 fix postgres enums mappings Fix postgres enums mappings May 10, 2025
Copy link

Commenter does not have sufficient privileges for PR 4945 in repo linq2db/linq2db

@MaceWindu
Copy link
Contributor

/azp run test-all

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@linq2dbot
Copy link

Test baselines changed by this PR. Don't forget to merge/close baselines PR after this pr merged/closed.

@sdanyliv
Copy link
Member

Please introduce unit test for regression handling.

@MaceWindu
Copy link
Contributor

/azp run test-all

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

viceroypenguin
viceroypenguin previously approved these changes May 12, 2025
@MaceWindu
Copy link
Contributor

/azp run test-all

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@denis-tsv
Copy link
Contributor Author

PostgreSQL tests failed because of #4917
I fixed and checked tests at the local environment

@MaceWindu
Copy link
Contributor

/azp run test-all

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@viceroypenguin
Copy link
Contributor

viceroypenguin commented May 13, 2025

Upon consideration, I'm concerned about breaking changes, for consumers who have been using l2db.efc already with enums. What is the current behavior for them? Does it break, or just convert to integer?

I see, it does break for current consumers; I'm good with it then.

@denis-tsv
Copy link
Contributor Author

denis-tsv commented May 13, 2025

This pull request doesn't affect enums mapped to integer values at database. Enums mapped to integers will have IntTypeMapping type, so pull request does't affect them.
Mapping changed only for enums mapped to PostgreSQL enums which has NpgsqlEnumTypeMapping. By default linq2db generated invalid sql or used invalid DataType before this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy