mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #11895] Fix IN/NOT IN expression handling and support enums when matching on to-many-collections
#13320
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?
Original Pull Request: https://github.com/doctrine/orm/pull/11895
State: closed
Merged: Yes
This fixes that using a
Criteriawith anINorNINexpression on a many-to-many collection currently leads to an SQL error (#6173). TheManyToManypersister needs to know about the slightly different SQL syntax for[NOT] IN ().In the case of
[NOT] INexpressions, the value will be an array, which also required me to change (fix?) the parameter type handling. I have pulled the necessary code from theBasicEntityPersisterand placed it as static helper methods inPersisterHelper.This is somewhat inspired by #11516, which aims at fixing #11481: By re-using the parameter type handling code, it also fixes using backed enums in
EQ,INandNINexpressions withinCriteriawhenmatching()on one-to-many and many-to-many collections.Fixes #6173, fixes #11031, fixes #11481, closes #11516.