Skip to content

Arithmetic operations adding casts to SQLite that cause incorrect results #2792

Closed
@PleasantD

Description

@PleasantD

Affects v5.3.0+

How to Reproduce
var result = session.Query<Entity>().Where(e => e.DecimalValue != null && (offset + e.DecimalValue) == test).ToList();
var result = session.Query<Entity>().Where(e => e.IntValue != null && (offset + (decimal?)e.IntValue) == test).ToList();

Where offset and test are decimal or decimal? types.

Expected Result
result contains a list of entities where the equality condition matches.
This works fine for PostgreSQL and MS SQL Server.

Actual Result
SQLite gives no errors and always produces 0 results.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions