object from "DoctrineProxies\__CG__\", the third object of recursive calling #10892
Replies: 2 comments
-
Moving to support because with the information provided I cannot tell if this is really a bug. If you want to file a bug, please provide a way to reproduce the problem (a code snippet, a small repository, …). Also, please make sure, you can reproduce the issue with the latest versions of all libraries. We won't fix bugs in ORM 2.10 or DBAL 2. |
Beta Was this translation helpful? Give feedback.
-
This may happen if you query an object that has already been fetched as a lazy proxy in a previous call.
I don't know where this expectation is coming from, but you should not rely on that. The EM can return a proxy and that's fine. |
Beta Was this translation helpful? Give feedback.
-
Bug Report
Summary
I'm recursively calling the get by id function normally, one of the records retrieved (always the 3rd call) is not an obj of the same class as supposed. it seems like the relation is fetched "lazy" (default) instead of "eager" in this 3rd call only
Current behavior
I'm recursively calling the get by id function normally, one of the records retrieved (always the 3rd call) is not an obj of the same class as supposed. it seems like the relation is fetched "lazy" (default) instead of "eager" in this 3rd call only
the object retrieved from the third call is "DoctrineProxies_CG_" object not the same as the other objects in the same call!
How to reproduce
Expected behavior
all objects should be from the same class.
Beta Was this translation helpful? Give feedback.
All reactions