mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
associated object is showing null instead of correct values #5846
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @flik on GitHub (Jan 15, 2018).
Originally assigned to: @Ocramius on GitHub.
associated object is coming but values are null ?
here is output :
object(stdClass)[581]
public 'CLASS' => string 'PsnPersonPsn' (length=12)
public 'idPsn' => int 17468
public 'logiurModifiedPsn' =>
object(stdClass)[650]
public 'CLASS' => string 'UserIur' (length=7)
public 'IS_PROXY' => boolean true
public 'PROXY_INITIALIZED' => boolean false
public 'idIur' => int 1
public 'idpsnIur' => null
public 'usernameIur' => null
public 'passwordIur' => null
public 'isActiveIur' => null
public 'isDeletedIur' => null
public 'logDateCreatedIur' => null
public 'saltIur' => null
public 'signatureIur' => null
public 'externalidIur' => null
public 'isApiIur' => null
public 'certserialIur' => null
public 'anonymisedIur' => null
public 'logIdiurIur' => null
public 'logDateModifiedIur' => null
public 'logIdiurModifiedIur' => null
public 'logDateLastloginIur' => null
public 'idconIur' => null
public 'idsystemColPsn' => null
public 'idsystemGenPsn' =>
object(stdClass)[669]
public 'CLASS' => string 'GenderGen' (length=9)
public 'IS_PROXY' => boolean true
public 'PROXY_INITIALIZED' => boolean false
public 'idgenderGen' => int 3
public 'valueEngGen' => null
public 'valueDeuGen' => null
public 'valueFraGen' => null
public 'valueItaGen' => null
public 'valueSpaGen' => null
public 'codeGen' => null
public 'isActiveGen' => null
public 'isDeletedGen' => null
@Ocramius commented on GitHub (Jan 15, 2018):
This is normal: proxies are lazy-loaded when you actually try reading their internal state. Ref: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/working-with-objects.html#entity-object-graph-traversal
@flik commented on GitHub (Jan 17, 2018):
I fixed this issue by edit the entity with fetch="EAGER" attribute, below is the code example where to change. just add the attribute in foreign fields.