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

        Hide
        Doctrine Bot added a comment -

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

        Show
        Doctrine Bot added a comment - A related Github Pull-Request [GH-315] was closed: https://github.com/doctrine/common/pull/315
        Hide
        Benjamin Eberlei added a comment -

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

        Show
        Benjamin Eberlei added a comment - A related Github Pull-Request [GH-315] was synchronize https://github.com/doctrine/doctrine2/pull/315
        Hide
        Benjamin Eberlei added a comment -

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

        Show
        Benjamin Eberlei added a comment - A related Github Pull-Request [GH-315] was synchronize https://github.com/doctrine/doctrine2/pull/315
        Hide
        Benjamin Eberlei added a comment -

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

        Show
        Benjamin Eberlei added a comment - A related Github Pull-Request [GH-315] was synchronize https://github.com/doctrine/doctrine2/pull/315
        Hide
        Benjamin Eberlei added a comment -

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

        Show
        Benjamin Eberlei added a comment - A related Github Pull-Request [GH-315] was synchronize https://github.com/doctrine/doctrine2/pull/315
        Hide
        Benjamin Eberlei added a comment -

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

        Show
        Benjamin Eberlei added a comment - A related Github Pull-Request [GH-315] was synchronize https://github.com/doctrine/doctrine2/pull/315
        Hide
        Benjamin Eberlei added a comment -

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

        Show
        Benjamin Eberlei added a comment - A related Github Pull-Request [GH-315] was synchronize https://github.com/doctrine/doctrine2/pull/315
        Hide
        Benjamin Eberlei added a comment - - edited
        Show
        Benjamin Eberlei added a comment - - edited I added a testcase for this, it works. http://github.com/doctrine/doctrine2/commit/d3419780f9daa3eaf0400c2b6fcee0234240b1de

          People

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

            Dates

            • Created:
              Updated:
              Resolved: