Skip to content

Tests: nothing pins #88's IS NOT NULL filter on a property-level declaration #155

Closed

Description

@CaffeinatedCoder

Found in the 5.5.0 pre-tag review (#36) by seeding defects into 934ec55. The code is right today, but nothing pins it.

Seed: in ResolvePropertyLevelIndex (src/EFCore.ComplexIndexes/CustomMigrationsModelDiffer.cs:1474), replace ?? ImplicitFilter(entityType, storeObject, …) with ?? null.

Result: the unit suite still passes, 569/569.

That seed brings #88's silent bug back for every property-level declaration on SQL Server: a unique index over a nullable column, created without WHERE … IS NOT NULL. Today c.Property(r => r.Vin).HasComplexIndex(isUnique: true) on an optional complex property correctly renders CREATE UNIQUE INDEX … ([Registration_Vin]) WHERE [Registration_Vin] IS NOT NULL. #88's tests cover the entity-level path only.

Test to add: the property-level declaration above, with the SQL Server differ and generator; assert the filter. Add a non-nullable control without one. Prove it by re-applying the seed.

Activity

  1. added this to the 5.5.0 milestone on Oct 20, 2026
  2. added
    tests
    package/core
    package/sqlserver
    area/indexes
    on Oct 20, 2026
  3. added a commit that references this issue on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/indexespackage/corepackage/sqlservertests

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions