ADR-0025: EF finder value equality¶
Status: accepted. Hosted run 38139246843 at 6229339 passes the eight focused unit cases, both new live integration cases and all 46 specification checks (including the four original failing GUID finder verifications).
The expanded original EF update tests reached FindAsync for GUID keys and exposed a missing translation. EF Core 10.0.12 Internal/EntityFinder.cs calls Extensions/Internal/ExpressionExtensions.BuildPredicate, which generates static object.Equals(EF.Property<object>(entity, propertyName), value) for GUIDs. EF funcletization extracts the key from its ValueBuffer. The provider previously accepted binary equality only.
Translate the exact static two-argument object.Equals method with one directly mapped scalar and one EF parameter or constant. Use the existing parameter binding, model conversion and null-compensated Cypher equality. Limit supported CLR equality to Guid, string, int, long, bool and enums; floating-point NaN equality, arrays, arbitrary methods and property-to-property object equality remain explicitly unsupported. Removing boxing is confined to this value-equality call and does not enable boxed reference ==.
An object-typed parameter must contain the exact mapped CLR type or null. Cross-type object comparisons reject before transport instead of coercing values through a converter. Error messages do not include the values. This increment does not introduce client predicate execution, replace EntityFinder or capture a runtime key in a compiled plan.
Verification includes the original pinned EF predicate builder for GUID, integer and string keys; actual FindAsync reaching a rejecting unit-test driver; unsafe-expression and runtime-type rejection; and live changing-key, missing-key, tracking, fresh-context and compilation-cache behavior. All eleven original upstream update method bodies remain unchanged. The implementation ledger retains actual acceptance and earlier failures; passing this slice is not full EF conformance.