Skip to content

Loading…

DDC-1111: EntityGenerator duplicates attributes, getters and setters in mapped subclasses #1709

Closed
doctrinebot opened this Issue · 2 comments

2 participants

@doctrinebot

Jira issue originally created by user stoefln:

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

before generating:

/****
 * @orm:Entity
 */
class User extends BaseUser
{
    /****
     * @orm:Id
     * @orm:Column(type="integer")
     * @orm:generatedValue(strategy="AUTO")
     */
    protected $id;
}

after generating:

/****
 * @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...):

abstract class User implements UserInterface
{
    protected $id;
   //...
}
@doctrinebot

Comment created by @beberlei:

Duplicate of DDC-1134, fixed

@doctrinebot

Issue was closed with resolution "Duplicate"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0.5 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.