Skip to content

Ensure FK properties have nullable-appropriate value comparers#27654

Merged
ajcvickers merged 1 commit intomainfrom
YouAppearedIn0SearchesThisWeek0311
Mar 17, 2022
Merged

Ensure FK properties have nullable-appropriate value comparers#27654
ajcvickers merged 1 commit intomainfrom
YouAppearedIn0SearchesThisWeek0311

Conversation

@ajcvickers
Copy link
Contributor

Part of #11597

This change takes the ValueComparer defined for the principal key and uses it for the foreign key, but also accommodating for nulls appropriately. As part of this, we started getting some more complex expressions in value comparers used in the in-memory database. These expressions became part of the query, which then meant they needed to be translated. Therefore, this logic has been changed to call the value comparer as a method when using the in-memory database, and this method is then detected. This incidentally fixes #27495, which was also a case of a value comparer expression that could not be translated, and any other case where a value comparer could not be translated in in-memory queries.

Part of #11597

This change takes the ValueComparer defined for the principal key and uses it for the foreign key, but also accommodating for nulls appropriately. As part of this, we started getting some more complex expressions in value comparers used in the in-memory database. These expressions became part of the query, which then meant they needed to be translated. Therefore, this logic has been changed to call the value comparer as a method when using the in-memory database, and this method is then detected. This incidentally fixes #27495, which was also a case of a value comparer expression that could not be translated, and any other case where a value comparer could not be translated in in-memory queries.
@ajcvickers ajcvickers requested a review from a team March 16, 2022 14:29
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.

Complex value comparer expressions can not be translated by the in-memory query pipeline

2 participants