Throw when loading a proxy without identifiers#10818
Conversation
c939539 to
0c255d4
Compare
|
This is not supposed to happen so this should not be needed. |
0c255d4 to
b2abc0b
Compare
|
Well it happened 😅 |
|
Might be interesting to see if there are other places in the code where an empty array will cause hard to troubleshoot issues and if yes, introducing an alternate method that throws instead of returning an empty array. Also, finding out what method should not be called with an empty array and annotate them with |
Co-authored-by: Grégoire Paris <[email protected]>
|
Indeed. I guess such a work would supersede this PR? |
|
The first part would, I suppose. |
|
Closing as itʼs not really an issue. |
Related to symfony/symfony#50874
Loading a proxy without identifiers currently leads to its hydration using its table’s first row; it is better to throw in that case.
Not sure if it should be done in
EntityPersister:loadByIdthough 🤔