mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-751: Simplify overwriting ClassMetadataFactory #926
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 (Aug 17, 2010).
Jira issue originally created by user @beberlei:
Currently its very hard (only via Reflection Hack) to overwrite the ClassMetadataFactory used. This should be simplified to allow people to implement their own ClassMetadataFacfotry or ClassMetadata instances.
@doctrinebot commented on GitHub (Aug 26, 2010):
Comment created by romanb:
What do you suggest? Making this part of the configuration? Do we need to extract an interface?
@doctrinebot commented on GitHub (Aug 29, 2010):
Comment created by @beberlei:
No i don't think an interface is necessary. The class has much logic that is rather important. However you might want to extend it here and there: DisconnectedMetadataFactory is one example.
A method on Doctrine\ORM\Configuration sounds very good.
@doctrinebot commented on GitHub (Aug 30, 2010):
Comment created by romanb:
Do you think this is essential to be included in 2.0 ?
@doctrinebot commented on GitHub (Aug 30, 2010):
Comment created by @beberlei:
nope. The problem is that the CMF constructor expects the EntityManager, this means that you would only be able to configure the class name.
But the configuration is also timing depend, because the CMF is stored inside EntityManager::$metadataFactory and should not be dynamically overwritable AFTER the Entity Manager was created this could create funny problems.
@doctrinebot commented on GitHub (Dec 28, 2010):
Comment created by @beberlei:
This is already fixed.
@doctrinebot commented on GitHub (Dec 28, 2010):
Issue was closed with resolution "Fixed"