mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
@ManyToMany relation matching criteria ignores isNull(column) #4958
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RusAlex on GitHub (Jan 4, 2016).
I have an entity class where ManyMany relation described.
Then Im trying to do something like
IsNull condition is ignored in SqlValueVisitor.php
https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Persisters/SqlValueVisitor.php#L57
And no any IS NULL in final SQL statement.
@RusAlex commented on GitHub (Jan 4, 2016):
But documentation says , that isNull(x) must work:
http://doctrine-orm.readthedocs.org/projects/doctrine-orm/en/latest/reference/working-with-associations.html#filtering-collections
@waltertamboer commented on GitHub (Apr 11, 2016):
I can confirm that this is happening. I'm also experiencing this issue.
@oprokidnev commented on GitHub (Oct 10, 2019):
Still happening in 2k19.
In my case managed to solve by multiple collection transformation.
Problem is with
\Doctrine\ORM\Persisters\Collection\ManyToManyPersister::expandCriteriaParametersIt uses
SqlValueVisitorthat does not understand Comparison::EQ expression with null values.@ThomasLabstep commented on GitHub (Dec 17, 2019):
Still an issue.
ManyToMany + isNull Criteria is 100% not working.
Thx for the pointer to SqlValueVisitor.
I guess we need a little PR to add the use case to support isNull?
@astronati commented on GitHub (Apr 12, 2023):
@beberlei news about this issue? @MatTheCat
@MatTheCat commented on GitHub (Apr 12, 2023):
Well #10587 is open so maintainers will look at it when they’ll got time.