DDC-3441: Unidirectional ManyToOne Not Lazy Loading #4247

Open
opened 2026-01-22 14:38:03 +01:00 by admin · 7 comments
Owner

Originally created by @doctrinebot on GitHub (Dec 9, 2014).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user mbright:

The Unidirectional ManyToOne association described in the docs does not lazy load correctly. The appropriate SQL will get executed, and the returned Proxy does pass type hinting for the correct class. However, the lazy loaded object always has the following properties:

  • *_initializer_*
  • *_cloner_*
  • *_isInitialized_*
  • lazyPropertiesDefaults

Any properties from the class definition do not show up. This is problematic when trying to get reflected properties and their values. Methods are correctly reflected.

Pull request for failing test case

Originally created by @doctrinebot on GitHub (Dec 9, 2014). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user mbright: The Unidirectional ManyToOne association described [in the docs](http://doctrine-orm.readthedocs.org/en/latest/reference/association-mapping.html#many-to-one-unidirectional) does not lazy load correctly. The appropriate SQL will get executed, and the returned Proxy does pass type hinting for the correct class. However, the lazy loaded object always has the following properties: - `*_initializer_*` - `*_cloner_*` - `*_isInitialized_*` - `lazyPropertiesDefaults` Any properties from the class definition do not show up. This is problematic when trying to get reflected properties and their values. Methods are correctly reflected. Pull request for [failing test case](https://github.com/doctrine/doctrine2/pull/1217)
admin added the Bug label 2026-01-22 14:38:03 +01:00
Author
Owner

@doctrinebot commented on GitHub (Dec 9, 2014):

@doctrinebot commented on GitHub (Dec 9, 2014): - depends on [DDC-3442: [GH-1217] @DDC3441 failing test cases for the ticket](http://www.doctrine-project.org/jira/browse/DDC-3442)
Author
Owner

@doctrinebot commented on GitHub (Dec 9, 2014):

Comment created by mbright:

Let me know if anything else is needed.

@doctrinebot commented on GitHub (Dec 9, 2014): Comment created by mbright: Let me know if anything else is needed.
Author
Owner

@doctrinebot commented on GitHub (Dec 11, 2014):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1217] was assigned:
https://github.com/doctrine/doctrine2/pull/1217

@doctrinebot commented on GitHub (Dec 11, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-1217] was assigned: https://github.com/doctrine/doctrine2/pull/1217
Author
Owner

@doctrinebot commented on GitHub (Dec 11, 2014):

Comment created by @ocramius:

Looks like a current ORM limitation (private properties lazy loading).

Related:

@doctrinebot commented on GitHub (Dec 11, 2014): Comment created by @ocramius: Looks like a current ORM limitation (private properties lazy loading). Related: - https://github.com/Ocramius/ProxyManager/issues/159 - https://github.com/Ocramius/ProxyManager/pull/192
Author
Owner

@doctrinebot commented on GitHub (Jan 24, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1217] was labeled:
https://github.com/doctrine/doctrine2/pull/1217

@doctrinebot commented on GitHub (Jan 24, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1217] was labeled: https://github.com/doctrine/doctrine2/pull/1217
Author
Owner

@doctrinebot commented on GitHub (Jan 24, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1217] was labeled:
https://github.com/doctrine/doctrine2/pull/1217

@doctrinebot commented on GitHub (Jan 24, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1217] was labeled: https://github.com/doctrine/doctrine2/pull/1217
Author
Owner

@doctrinebot commented on GitHub (Jun 16, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1217] was closed:
https://github.com/doctrine/doctrine2/pull/1217

@doctrinebot commented on GitHub (Jun 16, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1217] was closed: https://github.com/doctrine/doctrine2/pull/1217
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4247