Open
Description
Library name and version
- Kros.KORM 6.2.0
Description
KORM fails to parse correct condition for NULL comparison.
Steps To Reproduce
Example:
var test = _database.Query<MovementsOverviewSearchResult>()
.Where(x => x.PartnerName != null);
Expected behavior
LINQ query above should be parsed
SELECT ... FROM ... Where (PartnerName IS NOT NULL)
Actual behavior
KORM parses the query as
SELECT ... FROM ... Where (PartnerName <> NULL)
Comparing NULL with anything using operators =, !=, <> ALWAYS produces FALSE
. Even NULL = NULL
is FALSE
. Therefore, IS
and IS NOT
keywords should be parsed instead when comparing with NULL.