Uploaded image for project: 'Doctrine 2 - ORM'
  1. Doctrine 2 - ORM
  2. DDC-1254

EntityGenerator does not respect Class Inheritance properly


    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Git Master
    • Fix Version/s: 2.1.1
    • Component/s: None
    • Security Level: All
    • Labels:
    • Environment:
      Symfony2 RC4, PHP 5.3., Fedora 15


      as mentioned here DDC-904, https://github.com/symfony/symfony/issues/1550# and https://github.com/stof/StofDoctrineExtensionsBundle/issues/47
      The Doctrine2 EntityGenerator does not respect inheritance of Models correctly, especially when inheriting the primary field from an abstract base class as done by Symfony2's StofDoctrineExtensionsBundle.

      This is extremly annoying since it renders the generator unusable when aforementioned bundle is active. It always fails with this message:


      No identifier/primary key specified for Entity 'Stof\DoctrineExtensionsBundle\Entity\Translation'. Every Entity must have an
      identifier/primary key.

      DDC-904 mentioned this should be fixed, but this is not true: bug is still found in latest Symfony2 git.
      The docs only refer to using a single mapping format inside a bundle, but this does not work. Stof... uses xml mappings and it does not matter if i use yml or annotiations in a different bundle - the above error is still present.

        Issue Links


          bigbadbassman Daniel Reiche created issue -
          beberlei Benjamin Eberlei made changes -
          Field Original Value New Value
          Link This issue is required for DDC-1243 [ DDC-1243 ]
          beberlei Benjamin Eberlei made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.1.1 [ 10153 ]
          Resolution Fixed [ 1 ]
          beberlei Benjamin Eberlei made changes -
          Workflow jira [ 12795 ] jira-feedback [ 14936 ]
          beberlei Benjamin Eberlei made changes -
          Workflow jira-feedback [ 14936 ] jira-feedback2 [ 16800 ]
          beberlei Benjamin Eberlei made changes -
          Workflow jira-feedback2 [ 16800 ] jira-feedback3 [ 19053 ]


            • Assignee:
              beberlei Benjamin Eberlei
              bigbadbassman Daniel Reiche
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: