Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1111

EntityGenerator duplicates attributes, getters and setters in mapped subclasses

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.0.3
    • Fix Version/s: 2.0.5
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None
    • Environment:
      mac osx, symfony framework (standard distribution PR10) with installed userbundle

      Description

      when I want to generate getters and setters for my entity which subclasses another entity-base-class, my properties are duplicated.

      before generating:

      Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
      /**
       * @orm:Entity
       */
      class User extends BaseUser
      {
          /**
           * @orm:Id
           * @orm:Column(type="integer")
           * @orm:generatedValue(strategy="AUTO")
           */
          protected $id;
      }
      

      after generating:

      Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
      /**
       * @orm:Entity
       */
      class User extends BaseUser
      {
          /**
           * @orm:Id
           * @orm:Column(type="integer")
           * @orm:generatedValue(strategy="AUTO")
           */
          protected $id;
      
      
          /**
           * @var integer $id
           */
          private $id;
      
      
          /**
           * Get id
           *
           * @return integer $id
           */
          public function getId()
          {
              return $this->id;
          }
      }
      

      SuperSuperClass (there are multiple levels of inheritance...):

      Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
      abstract class User implements UserInterface
      {
          protected $id;
         //...
      }
      

        Activity

        Hide
        Benjamin Eberlei added a comment -

        Duplicate of DDC-1134, fixed

        Show
        Benjamin Eberlei added a comment - Duplicate of DDC-1134 , fixed

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Stephan Petzl
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: