mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-235: Associated Classes Do Not Trigger Event::loadClassMetadata #290
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 @doctrinebot on GitHub (Jan 4, 2010).
Jira issue originally created by user mridgway:
This may or may not be working as intended.
Currently when a class is loaded via association, the loadClassMetadata event is only fired for the original object that was loaded. You can use getClassMetaData to access the lazy loaded class's metadata, but there is no easy way to hook into the loadClassMetadata event for that class.
Example of what I'm trying to do.. I have a class with the following:
Content uses Class Table Inheritance to be able to define multiple types of content:
When Content is lazy loaded from Block, the loadClassMetadata function is never called for Content. In this case I wanted to dynamically add discriminator maps to Content.
As I said before this may be intended since the metadata is loaded with the containing object, but it means I have to make several special cases in loadClassMetadata for every object that maps to Content in order to modify the metadata.
@doctrinebot commented on GitHub (Jan 4, 2010):
Comment created by mridgway:
User error.
@doctrinebot commented on GitHub (Jan 4, 2010):
Issue was closed with resolution "Invalid"