-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isNull criteria doesn't work #7717
Comments
@BenWaNH would you be able to write a test case that reproduces this issue? See https://github.com/doctrine/doctrine2/tree/master/tests/Doctrine/Tests/ORM/Functional/Ticket for examples. |
Yes, I will write it next week. I have to stay my time for this week and I will use the filter in the meantime. |
@thicolares This issue is valid for ManyToManyPersister and SqlValueVisitor https://github.com/doctrine/orm/blob/master/lib/Doctrine/ORM/Persisters/SqlValueVisitor.php#L32-L36 |
I can confirm that this issue exists for ManyToMany relationships but not for ManyToOne relationships.
Doing a Doing a However, if So the issue is only present when calling |
For anyone else who stumbles across this, I've been manually filtering these as a workaround: - $this->templateTypes->matching(Criteria::create()->andWhere(Criteria::expr()->isNull('archivedAt')));
+ $this->templateTypes->filter(fn (TemplatType $type) => null === $type->getArchivedAt()); |
* Add test case for #7717 * Do not hide null equality checks in `SqlValueVisitor::walkComparison` * Annotate `GH7717Parent::$children` type
Hi,
i've an issue with isNull method from Expression class
this is an example i use in my entity :
And this is the result SQL from log :
No trace about IS NULL
And If i try to replace my validityStart variable by another whose doesn't exist, no error returned
But if i replace isNull method by eq method an error is trigger ... It seems to skip my expression when isNull...
Thanks for reading
BenWa
The text was updated successfully, but these errors were encountered: