Skip to content

Nullable boolean in MySQL condition always yielding false/true #1309

@shoe-diamente

Description

@shoe-diamente

Steps to reproduce

  • Have an optional boolean column for a table
  • Write false == x.OptionalBoolean.HasValue on the C# side

The issue

I would expect that to be translated to:

false = (optional_boolean IS NOT NULL)

instead it's translated to:

false = optional_boolean IS NOT NULL

which is interpreted as:

(false = optional_boolean) IS NOT NULL

which always yields true.

Further technical details

MySQL version: 8.0
Operating system: macOS 10.13.6
Pomelo.EntityFrameworkCore.MySql version: 3.1.1
Framework version: netcoreapp3.1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions