You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to #264 but triggered with a join on two tables.
Description
Say you have entities A, B, and A has a OneToMany relation with B. I wanted to avoid multiple db lookups so I have added fetch: 'EAGER' on A's OneToMany attribute.
Steps to reproduce
Create 2 entities with binary uuid IDs and link them with a OneToMany relation with fetch: 'EAGER'
Expected behavior
Looking up A and all its B's would be done in one query.
Screenshots or output
Actual behavior: crash on vendor/doctrine/orm/src/Persisters/Entity/BasicEntityPerister.php:1911:
UnhandledMatchError
HTTP 500 Internal Server Error
Unhandled match case 16
there are 7 queries on my page vs 9 before, showing that eagerly fetching (e.g. joining tables on the 1st query) optimizes db access and increase performance
The text was updated successfully, but these errors were encountered:
Similar to #264 but triggered with a join on two tables.
Description
Say you have entities A, B, and A has a
OneToMany
relation with B. I wanted to avoid multiple db lookups so I have addedfetch: 'EAGER'
on A'sOneToMany
attribute.Steps to reproduce
Create 2 entities with binary uuid IDs and link them with a
OneToMany
relation withfetch: 'EAGER'
Expected behavior
Looking up A and all its B's would be done in one query.
Screenshots or output
Actual behavior: crash on
vendor/doctrine/orm/src/Persisters/Entity/BasicEntityPerister.php:1911
:In our case
$type
is 16, which isParameterType::BINARY
.Environment details
Additional context
Changing the function above with this:
solves both problems:
The text was updated successfully, but these errors were encountered: