- Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed
Description
When a query compares two complex types for equality, we generate equality checks for all of their simple properties (mapped to columns), recursively. However, when comparing to a parameter or inline representation (not a column), the properties on the parameter/constant complex type get the default type mapping, instead of getting inferred from the other side of the comparison as usual. This means that comparing a property with a non-default type mapping - e.g. a DateTime mapped to SQL Server datetime instead of the default datetime2 - the default representation would be generated (datetime2) and the comparison would fail.
This bug was discovered while porting the PostgreSQL provider to use the latest 10.0, and is quite blocking.