You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
An object on a column only a derived type has cannot be declared while the type shares its table #85
area/constraintsExclusion constraints, row guards and other constraint-like objectsenhancementNew feature or requestpackage/coreAffects CodoMetis.EFCore.SchemaKit (the kernel)package/postgresqlAffects CodoMetis.EFCore.SchemaKit.PostgreSQL
Decided 2026-11-12 by the maintainer: option 2. A declaration on the base type gets a way to name a column of a derived type that shares the table, so that a declaration always sits on the type that owns the table and always means the whole table. Not built now: it needs a path that says which derived type a property belongs to, which is a decision about the stored form in the resolver's first epoch, so it is scheduled with #43. preview.1 ships with the case refused, and the migration guide says so (#73). Option 1 is out: it would put back a judgement about when a table-wide object is really one type's.
Follows from #82, where a declaration on a derived type that shares its table is refused.
What is missing
Stay and Hold share the table of Reservation, and Stay alone has GuestId. An object that reads GuestId cannot be declared at all:
on Reservation the lambda cannot name GuestId, and a path written by hand is refused by the resolver, which looks the property up on the declaring type.
5.x accepted the declaration on Stay. A model that has one cannot move over as it is.
To decide
Such an object is less of a trap than the one #82 refuses: the sibling types' rows hold NULL in the column, and an exclusion element or a unique key that is NULL conflicts with nothing. That is not true of a column the condition alone reads. Options:
Allow a declaration on a derived type when an element or key of it is a column only that type has. This is a rule about what the object's parts are, so it is the contributor's to state, not the kernel's.
A way to name a derived type's column from the base type's declaration.
area/constraintsExclusion constraints, row guards and other constraint-like objectsenhancementNew feature or requestpackage/coreAffects CodoMetis.EFCore.SchemaKit (the kernel)package/postgresqlAffects CodoMetis.EFCore.SchemaKit.PostgreSQL
Activity