mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Criteria behaviour is not consistent across association types #7127
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 @davidkmenta on GitHub (Apr 5, 2023).
Bug Report
Summary
Criteria behaviour is not consistent across association types.
Current behavior
When using criteria with
ManyToManycollection, Doctrine can't properly determine column types and uses different name strategy than when usingOneToManyassociation.How to reproduce
I've got two separate collections of the same entity:
and
This matching behaves as expected:
But this one ends with two errors:
It starts to work if I change the
created_at(snake_case) column name tocreatedAt(camelCase) and (obviously) the enum to string.Expected behavior
Behaviour of criteria should be consistent across all types of associations.
@mpdude commented on GitHub (May 31, 2023):
Could you please provide a full (functional) test case to demonstrate the problem, ideally as a PR?
Have a look at
tests/Doctrine/Tests/ORM/Functional/Ticketfor examples.