Skip to content

Type mappings not properly inferred in complex type equality #36837

@roji

Description

@roji

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.

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions