Skip to content

Prepare Pgvector.EntityFrameworkCore 11.0.0 and disable vector auto-loading by default - #64

Open
roji wants to merge 2 commits into
pgvector:masterfrom
roji:roji-pgvector-ef-11-convention
Open

roji wants to merge 2 commits into
pgvector:masterfrom
roji:roji-pgvector-ef-11-convention

Conversation

@roji

@roji roji commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

@ankane check out #63 first; this is stacked on top, targets net11.0 and EF 11, and implements #59 (stop auto-loading vector columns).

Closes #59

Dependency and diff scope

Depends on #63 (Pgvector.EntityFrameworkCore 10.0.0). This PR intentionally targets upstream master and includes both the inherited EF 10 layer and the EF 11 delta. The branch retains #63's commit as its parent; native GitHub stack registration is unavailable for these fork heads.

The inherited layer updates the EF integration to 10.0.0, net10.0, and EFCore.PG 10.0.3. The EF 11 delta is commit fb05a0e.

EF 11 changes

  • Set Pgvector.EntityFrameworkCore to version 11.0.0, targeting net11.0 only, with Npgsql.EntityFrameworkCore.PostgreSQL 11.0.0-rc.1.1 (the latest available 11.x release).
  • Register an IConventionSetPlugin using EF 11's AutoLoadConvention to exclude Vector, HalfVector, and SparseVector properties from automatic entity loading by default. Explicit model configuration takes precedence; BitArray behavior is unchanged.
  • Move the package's design-time registration targets to build/net11.0, update the SDK/CI configuration, and document the new default, explicit projections, and model-level opt-in via Metadata.IsAutoLoaded = true.
  • Add regression coverage for generated SQL, tracked/untracked materialization, vector filtering/ordering and distance queries, explicit projections, preservation of unloaded vectors during unrelated updates, and explicit auto-loading overrides.

Lower-level Pgvector and Pgvector.Dapper versions, target frameworks, and dependency policies are unchanged. Per-query auto-loading opt-in is out of scope.

Validation

  • All 18 focused EF tests and all 30 C# tests passed against local PostgreSQL 18.4 using .NET SDK 11.0.100-rc.2.26504.105.
  • Packed-package inspection confirmed only lib/net11.0 and build/net11.0 assets. An isolated package consumer verified the convention, generated design-time services reference, and design-time mapping/code-generation registration.
  • Packing emits the expected NU5104 warning because the requested stable package version 11.0.0 depends on a prerelease provider. No packages were published.

Related to #59.

roji and others added 2 commits October 16, 2026 15:50
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6523471f-aaf2-4f26-87b0-d9889079c81c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ae01fae1-3e57-4d55-ad2c-f746a2d1084d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add convention plugin to configure vector properties as not auto-loaded

1 participant