Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-751

Simplify overwriting ClassMetadataFactory

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-BETA3
    • Fix Version/s: 2.0
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      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.

        Activity

        Benjamin Eberlei created issue -
        Hide
        Roman S. Borschel added a comment -

        What do you suggest? Making this part of the configuration? Do we need to extract an interface?

        Show
        Roman S. Borschel added a comment - What do you suggest? Making this part of the configuration? Do we need to extract an interface?
        Hide
        Benjamin Eberlei added a comment -

        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.

        Show
        Benjamin Eberlei added a comment - 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.
        Hide
        Roman S. Borschel added a comment -

        Do you think this is essential to be included in 2.0 ?

        Show
        Roman S. Borschel added a comment - Do you think this is essential to be included in 2.0 ?
        Hide
        Benjamin Eberlei added a comment -

        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.

        Show
        Benjamin Eberlei added a comment - 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.
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Fix Version/s 2.x [ 10090 ]
        Fix Version/s 2.0-BETA4 [ 10072 ]
        Hide
        Benjamin Eberlei added a comment -

        This is already fixed.

        Show
        Benjamin Eberlei added a comment - This is already fixed.
        Benjamin Eberlei made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0 [ 10021 ]
        Fix Version/s 2.x [ 10090 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 11787 ] jira-feedback [ 14539 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 14539 ] jira-feedback2 [ 16403 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 16403 ] jira-feedback3 [ 18656 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-751, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Benjamin Eberlei
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: