Skip to content

Document: vector properties not loaded by default in EF Core 11#5286

Draft
Copilot wants to merge 4 commits intopreview-3from
copilot/document-efcore-pull-37857
Draft

Document: vector properties not loaded by default in EF Core 11#5286
Copilot wants to merge 4 commits intopreview-3from
copilot/document-efcore-pull-37857

Conversation

Copy link
Contributor

Copilot AI commented Mar 7, 2026

EF Core 11 introduces partial property loading: SqlVector<T> properties are excluded from SELECT by default, since vectors are large and rarely need to be read back after ingestion.

vector-search.md

  • Added a [!NOTE] noting that prior to EF Core 11, vector properties were always loaded like any other property
  • Updated SQL snippets in VECTOR_SEARCH() and hybrid search examples to reflect vector column no longer appearing in SELECT

whatsnew.md

  • Added brief "Vector properties not loaded by default" entry under the SQL Server section with a minimal code example showing that vector columns are excluded from entity projections but can still be used in filters and orderings

breaking-changes.md

  • Added a low-impact breaking change entry for SqlVector<T> properties no longer being loaded by default (tracking issue #37279)
  • Mitigations section notes that an opt-in mechanism will be introduced later in the EF Core 11 release, and documents explicit projection as a workaround in the meantime

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Document dotnet/efcore#37279

Co-authored-by: roji <1862641+roji@users.noreply.github.com>
Copilot AI changed the title [WIP] Document changes in EF Core pull request 37857 Document: vector properties not loaded by default in EF Core 11 Mar 7, 2026
Copilot finished work on behalf of roji March 7, 2026 08:44

Once you have embeddings saved to your database, you're ready to perform vector similarity search over them.

## Vector properties not loaded by default
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot remove this section - we do not need a lengthy text just to tell users properties aren't getting loaded (if this had been part of the initial implementation - which it ideally should have been - we wouldn't have documented this at all). Add a simple [!NOTE] somewhere on this page that says that prior to EF 11, vector properties are always loaded back.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in f97a24b — replaced the entire section with a single [!NOTE] that states vector properties are not loaded by default starting in EF Core 11, and that prior to EF 11 they were always loaded.


The underlying mechanism is the `IsAutoLoaded` metadata flag. EF sets this to `false` for vector properties by convention, but it can also be configured for any other non-key property.

For more information, see [Vector properties not loaded by default](xref:core/providers/sql-server/vector-search#vector-properties-not-loaded-by-default).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot remove the "for more information"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed in f97a24b.


Vector properties can still be used in `WHERE` and `ORDER BY` clauses—including with `VectorDistance()` and `VectorSearch()`—and EF will correctly include them in the SQL, just not in the entity projection. The change tracker marks non-loaded properties with `IsLoaded = false`.

The underlying mechanism is the `IsAutoLoaded` metadata flag. EF sets this to `false` for vector properties by convention, but it can also be configured for any other non-key property.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove explanation of this internal metadata detail, as well as the change tracker details just above. Leave only user-facing details, no implementation details.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed both in f97a24b.

Co-authored-by: roji <1862641+roji@users.noreply.github.com>
Copilot finished work on behalf of roji March 7, 2026 08:52
Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a low-impact breaking change note. For now, leave the "mitigation" section as TODO - we'll be introducing a mechanism to opt into loading vector properties later in the release.

Co-authored-by: roji <1862641+roji@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 7, 2026

Add a low-impact breaking change note. For now, leave the "mitigation" section as TODO - we'll be introducing a mechanism to opt into loading vector properties later in the release.

Done in dc55ed9 — added a low-impact breaking change entry in breaking-changes.md for SqlVector<T> properties no longer being loaded by default (tracking issue #37279). The Mitigations section includes a [!NOTE] placeholder explaining that an opt-in mechanism will be introduced later in the EF Core 11 release, along with an explicit-projection workaround in the meantime.

Copilot finished work on behalf of roji March 7, 2026 09:22
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.

2 participants