Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-727

Proxy instances should be able to get their correspondent ClassMetadata

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-RC1
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      This should be possible:

      $entity = $em->getReference('Foo' , 1); 
      $class = $em->getClassMetadata(get_class($entity)); // ClassMetadata if Foo entity
      

      Currently it seems to throw an Exception.

        Activity

        Guilherme Blanco created issue -
        Roman S. Borschel made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Minor [ 4 ]
        Benjamin Eberlei made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0-RC1 [ 10091 ]
        Resolution Fixed [ 1 ]
        Marco Pivetta made changes -
        Comment [ This will be broken again if https://github.com/doctrine/doctrine2/pull/315 removes registration of metadata for proxy classes ]
        Benjamin Eberlei made changes -
        Workflow jira [ 11697 ] jira-feedback [ 14522 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 14522 ] jira-feedback2 [ 16386 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 16386 ] jira-feedback3 [ 18639 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: