object from "DoctrineProxies\__CG__\", the third object of recursive calling #7208

Closed
opened 2026-01-22 15:47:02 +01:00 by admin · 0 comments
Owner

Originally created by @ghost on GitHub (Aug 8, 2023).

Bug Report

Q A
BC Break no
Version 2.10.4
    "doctrine/cache": "^1.11",
    "doctrine/collections": "1.6.4",
    "doctrine/dbal": "^2.12.1",
    "doctrine/orm": "^2.7"

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.

Originally created by @ghost on GitHub (Aug 8, 2023). ### Bug Report <!-- Fill in the relevant information below to help triage your issue. --> | Q | A |------------ | ------ | BC Break | no | Version | 2.10.4 "doctrine/cache": "^1.11", "doctrine/collections": "1.6.4", "doctrine/dbal": "^2.12.1", "doctrine/orm": "^2.7" #### Summary <!-- Provide a summary describing the problem you are experiencing. --> 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 <!-- Provide steps to reproduce the bug. If possible, also add a code snippet with relevant configuration, entity mappings, DQL etc. Adding a failing Unit or Functional Test would help us a lot - you can submit one in a Pull Request separately, referencing this bug report. --> #### Expected behavior <!-- What was the expected (correct) behavior? --> all objects should be from the same class.
admin closed this issue 2026-01-22 15:47:02 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#7208