Skip to content

A where statement with = [potentially null value] should not be possible #641

Open
@Bart-Westenenk

Description

@Bart-Westenenk

The following query builder where clause will always evaluate to true, as in SQL col = null is always evaluated to true

$querybuilder
  ->select('f')
  ->from('foo', 'f')
  ->where('f.bar = :bar')
  ->setParameter('bar', null)

However, this may be unexpected as the developer may expect it also filters the null values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions