Doctrine Proxies Hydration not works in local #5498

Closed
opened 2026-01-22 15:09:15 +01:00 by admin · 2 comments
Owner

Originally created by @christiancannata on GitHub (Apr 14, 2017).

Originally assigned to: @Ocramius on GitHub.

Hi,
I don't know why this code return null suddenly, in production I have not this problem, only in local:

$companyName= $application->getVacancy()->getCompany()->getName() //return null in local but in production works

now in local I have changed with:
$vacancy=$application->getVacancy(); $vacancy = $this->em->getRepository('<repo>')->find($vacancy->getId()); $company=$vacancy->getCompany()->getId(); $company = $this->em->getRepository('<repo>')->find($company->getId()); //return company object $companyName=$company->getName() //now it works!
Why it doen't work suddenly in local? I remember that the code on top works correctly and I have not problem in production.

Originally created by @christiancannata on GitHub (Apr 14, 2017). Originally assigned to: @Ocramius on GitHub. Hi, I don't know why this code return null suddenly, in production I have not this problem, only in local: `$companyName= $application->getVacancy()->getCompany()->getName() //return null in local but in production works` now in local I have changed with: `$vacancy=$application->getVacancy(); $vacancy = $this->em->getRepository('<repo>')->find($vacancy->getId()); $company=$vacancy->getCompany()->getId(); $company = $this->em->getRepository('<repo>')->find($company->getId()); //return company object $companyName=$company->getName() //now it works! ` Why it doen't work suddenly in local? I remember that the code on top works correctly and I have not problem in production.
admin added the BugIncompleteMissing Tests labels 2026-01-22 15:09:15 +01:00
admin closed this issue 2026-01-22 15:09:15 +01:00
Author
Owner

@theofidry commented on GitHub (Apr 14, 2017):

@christiancannata could you help by providing more info? There's no way we can tell the issue just from that :/

For example:

  • which version you are using
  • how is your environment defined
  • what DB are you using
  • did you check your DB?
@theofidry commented on GitHub (Apr 14, 2017): @christiancannata could you help by providing more info? There's no way we can tell the issue just from that :/ For example: - which version you are using - how is your environment defined - what DB are you using - did you check your DB?
Author
Owner

@Ocramius commented on GitHub (Apr 14, 2017):

Closing as incomplete.

As much as I'd like digging into this, information is missing, and no debugging has been attempted.
Please try reproducing the results locally with a test case or similar, then report again should this be a failure on the ORM side.

@Ocramius commented on GitHub (Apr 14, 2017): Closing as `incomplete`. As much as I'd like digging into this, information is missing, and no debugging has been attempted. Please try reproducing the results locally with a test case or similar, then report again should this be a failure on the ORM side.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5498