Skip to content
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

Support INCLUDE for primary keys #3311

Open
springy76 opened this issue Oct 10, 2024 · 1 comment
Open

Support INCLUDE for primary keys #3311

springy76 opened this issue Oct 10, 2024 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@springy76
Copy link

Just the same as #697 implemented years ago, but for KeyBuilder instead of IndexBuilder
(see https://www.postgresql.org/docs/current/sql-createtable.html#SQL-CREATETABLE-PARMS-PRIMARY-KEY )

Usage would be:

entityTypeBuilder.HasKey(e => new { e.A, e.B }).IncludeProperties(e => new { e.C });

pretty just the same as existing:

entityTypeBuilder.HasIndex(e => new { e.A, e.B }).IsUnique().IncludeProperties(e => new { e.C });
@springy76 springy76 changed the title Support INCLUDE for primary keys Support INCLUDE for primary keys Oct 11, 2024
@roji
Copy link
Member

roji commented Oct 11, 2024

Good catch, thanks.

@roji roji added this to the Backlog milestone Oct 11, 2024
@roji roji added the enhancement New feature or request label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants