mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Cannot filter query by embedded columns #6603
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 @rkonopski on GitHub (Jan 14, 2021).
Hi, I cannot filter query by embedded columns. Any other columns than embedded type are working well.
Interestingly that embedded object is correctly saved in database. I can save it, but I cannot filter. I've tried with many combinations:
r.activation.code,r.activation_code,r.activation_code_code,r.activation_code.code. Moreover even PhpStorm doesn't show any hint about these embedded columns.Entity:
Embedded object:
Query:
Query throwing an error:
Database columns:
@rkonopski commented on GitHub (Jan 15, 2021):
I've found that just mapping was wrong. In
\Doctrine\ORM\Query\Parser::processDeferredPathExpressionsmethod we can see valid mappings:$class->fieldMappings