Skip to content

[8.0] Fix repeated seed-data updates for list properties - #4028

Merged
roji merged 2 commits into
hotfix/8.0.12from
roji-seeded-lists-backport-8-0
Oct 18, 2026
Merged

roji merged 2 commits into
hotfix/8.0.12from
roji-seeded-lists-backport-8-0

Conversation

@roji

@roji roji commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Backport of #4024 to hotfix/8.0.12, including the structural element-hashing correction from commit cd7d820f8efb20f7e14a469cb393f776afc51a4b.

Supply an element-wise collection key comparer built from the element mapping's key comparer. This prevents redundant seed-data updates for unchanged lists while preserving updates for changed lists and arrays, and keeps equality and hashing consistent for binary collection keys.

EF 8 does not provide ComposeConversion, so adapt the existing equality, hash-code, and snapshot expressions to the collection CLR type inline. The seed-data and binary-key regression coverage matches the source fix.

Validation: reproduced the unchanged-list failure and both binary-key hash failures before their fixes. All four seed-data cases, both binary-key cases, and affected mapping/converter tests now pass (214 passed, 6 pre-existing skips), as do both array/list roundtrip tests, using the release branch's existing xUnit/VSTest runner.

Fixes #3635

Backport #4024. Reuse the collection value comparer for key comparisons and adapt its expressions to the collection CLR type using the EF 8 comparer APIs.

Fixes #3635

(cherry picked from commit 8fd6510)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 85e067fd-39b0-4a09-8247-395a5d886a3f
@roji roji linked an issue Oct 18, 2026 that may be closed by this pull request
Backport the #4024 correction: build collection key comparers from element key comparers, preserving structural equality and hashing for binary array/list elements.

(cherry picked from commit cd7d820)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 85e067fd-39b0-4a09-8247-395a5d886a3f
@roji
roji merged commit efa0486 into hotfix/8.0.12 Oct 18, 2026
9 checks passed
@roji
roji deleted the roji-seeded-lists-backport-8-0 branch October 18, 2026 15:58
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.

Repeated UpdateData for List<string> property with HasData and migrations

1 participant