In some cases it seems Doctrine is not able to correctly load entities that have a UUID foreign key set up.
Current behavior
I load an object that contains a relation to another object, with FK UUID. Upon inspection, I can verify that only 3 of 4 elements are loaded (by checking the content of the relation children). However, all UUIDs are correctly instanciated.
Here you can see that Doctrine is able to load the UUIDs correctly:
Here you can see that its unable to report the properties values correctly:
Here you can see that the ID is query-able via MySQL Workbench:
Now comes the interesting part, it seems that for example EasyAdmin is loading it differently and thus, finding the data values correctly:
Here you can see this very same UUID is not able to query the element when using UNHEX (which is more likely to be used I'd assume):
Here are information for the specific elements in the DB:
UUID
Works
0192f361-bfac-7e90-80e0-382f9f6edfab
:no_entry_sign:
0192ef68-73da-7497-a446-bf3a300d0a41
:heavy_check_mark:
0192f26c-da9f-7ebd-8538-28d8e3163b1e
:heavy_check_mark:
0192f26d-2e06-7560-8a83-ce406955add6
:heavy_check_mark:
I cannot see much of a difference between these UUIDs.
Expected behavior
The collection contains 4 full elements that have all kind of data.
How to reproduce
I cannot really reproduce it; i just happen to see it in my local environment right now. This is the first time I see such an error and without changing my code, I cannot reproduce the issue again. So it must be connceted to the UUID, or the way how its being called.
Bug Report
Summary
In some cases it seems Doctrine is not able to correctly load entities that have a UUID foreign key set up.
Current behavior
I load an object that contains a relation to another object, with FK UUID. Upon inspection, I can verify that only 3 of 4 elements are loaded (by checking the content of the relation children). However, all UUIDs are correctly instanciated.
Here you can see that Doctrine is able to load the UUIDs correctly:
Here you can see that its unable to report the properties values correctly:
Here you can see that the ID is query-able via MySQL Workbench:
Now comes the interesting part, it seems that for example EasyAdmin is loading it differently and thus, finding the data values correctly:
Here you can see this very same UUID is not able to query the element when using
UNHEX
(which is more likely to be used I'd assume):I cannot see much of a difference between these UUIDs.
Expected behavior
The collection contains 4 full elements that have all kind of data.
How to reproduce
I cannot really reproduce it; i just happen to see it in my local environment right now. This is the first time I see such an error and without changing my code, I cannot reproduce the issue again. So it must be connceted to the UUID, or the way how its being called.