mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Processes an individual parameter value with embeddables #6422
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 @amelendres on GitHub (Mar 10, 2020).
Bug Report
Summary
Queries with embeddable parameters has an error.
trying to access to a hardcoded undefined index 0.
message = "Notice: Undefined offset: 0"
line = {int} 730
file = "/app/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php"
severity = {int} 8
Exceptionstring = ""
code = {int} 0
trace:
file = "/app/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php"
line = {int} 424
function = "getSingleIdentifierValue"
class = "Doctrine\ORM\UnitOfWork"
type = "->"
Current behavior
Imposible to create a query with query builder using embeddable value objects.
How to reproduce
Notice: Undefined offset: 0Expected behavior
execute the query
@SenseException commented on GitHub (Mar 10, 2020):
Please add your DQL Query and involved entities + mappings that is causing this error.
@amelendres commented on GitHub (Mar 10, 2020):
DQL:
SELECT a FROM Appto\Booking\Domain\Availability\Availability a WHERE a.boatId.value = :boatId AND a.portId.value = :portId AND ((a.timePeriod.startDate BETWEEN :start AND :end) OR (a.timePeriod.endDate BETWEEN :start AND :end)) ORDER BY a.timePeriod.startDate ASC@blackandred commented on GitHub (Sep 10, 2020):
Same there.
@SenseException commented on GitHub (Sep 16, 2020):
@blackandred I have issues to reproduce this error with an no-prefix embeddable. In my tests I get the expected results. Can you please provide an example that can be run and that reproduces this error?
@blackandred commented on GitHub (Sep 17, 2020):
I changed something and it is no longer reproducible. I tried now to reproduce it, but no luck. Sorry, I know it would not help.
@SenseException commented on GitHub (Sep 23, 2020):
@blackandred Maybe this issue appears in some combination with a specific version in one of the dependencies. If you can reproduce that state you had, maybe you can get this erroneous behaviour back.
@rela589n commented on GitHub (Sep 25, 2020):
I have the same problem!
@rela589n commented on GitHub (Sep 25, 2020):
Customer:
Email:
Code that fails:
@rela589n commented on GitHub (Sep 25, 2020):
If I write
['email.email' => 'admin@email.com'], I get no errors.But wait, isn't there way to search by all fields of value object?
like: