{"action":"created","issue":{"url":"https://api.github.com/repos/doctrine/DoctrineMongoDBBundle/issues/39","labels_url":"https://api.github.com/repos/doctrine/DoctrineMongoDBBundle/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/doctrine/DoctrineMongoDBBundle/issues/39/comments","events_url":"https://api.github.com/repos/doctrine/DoctrineMongoDBBundle/issues/39/events","html_url":"https://github.com/doctrine/DoctrineMongoDBBundle/issues/39","id":1412786,"number":39,"title":"mongodb:generate:documents adds duplicate properties/getters/setters on subclass when using inheritance","user":{"login":"jonathaningram","id":626664,"avatar_url":"https://avatars.githubusercontent.com/u/626664?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathaningram","html_url":"https://github.com/jonathaningram","followers_url":"https://api.github.com/users/jonathaningram/followers","following_url":"https://api.github.com/users/jonathaningram/following{/other_user}","gists_url":"https://api.github.com/users/jonathaningram/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathaningram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathaningram/subscriptions","organizations_url":"https://api.github.com/users/jonathaningram/orgs","repos_url":"https://api.github.com/users/jonathaningram/repos","events_url":"https://api.github.com/users/jonathaningram/events{/privacy}","received_events_url":"https://api.github.com/users/jonathaningram/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2011-08-16T06:04:03Z","updated_at":"2015-04-17T07:14:55Z","closed_at":null,"body":"Start with these two Documents:\r\n\r\n```php<?php\r\n\r\nnamespace My\\XBundle\\Document;\r\n\r\nuse Doctrine\\ODM\\MongoDB\\Mapping\\Annotations as MongoDB;\r\n\r\n/**\r\n * @MongoDB\\Document\r\n * @MongoDB\\InheritanceType(\"COLLECTION_PER_CLASS\")\r\n */\r\nabstract class AbstractFoo\r\n{\r\n\t/**\r\n\t * @MongoDB\\Id\r\n\t */\r\n\tprotected $id;\r\n\r\n\t/**\r\n\t * @MongoDB\\String\r\n\t */\r\n\tprotected $displayName;\r\n}\r\n```\r\n\r\n```php<?php\r\n\r\nnamespace My\\XBundle\\Document;\r\n\r\nuse Doctrine\\ODM\\MongoDB\\Mapping\\Annotations as MongoDB;\r\n\r\n/**\r\n * @MongoDB\\Document\r\n */\r\nclass SubFoo extends AbstractFoo\r\n{\r\n\t/**\r\n\t * @MongoDB\\String\r\n\t */\r\n\tprotected $value;\r\n}\r\n```\r\n\r\nNow, when you run `mongodb:generate:documents My\\XBundle`, you will end up with this in the subclass:\r\n\r\n```php<?php\r\n\r\nnamespace My\\XBundle\\Document;\r\n\r\nuse Doctrine\\ODM\\MongoDB\\Mapping\\Annotations as MongoDB;\r\n\r\n/**\r\n * @MongoDB\\Document\r\n */\r\nclass SubFoo extends AbstractFoo\r\n{\r\n\t/**\r\n\t * @MongoDB\\String\r\n\t */\r\n\tprotected $value;\r\n\r\n    /**\r\n     * @var $id\r\n     */\r\n    protected $id;\r\n\r\n    /**\r\n     * @var string $displayName\r\n     */\r\n    protected $displayName;\r\n\r\n\r\n    /**\r\n     * Set value\r\n     *\r\n     * @param string $value\r\n     */\r\n    public function setValue($value)\r\n    {\r\n        $this->value = $value;\r\n    }\r\n\r\n    /**\r\n     * Get value\r\n     *\r\n     * @return string $value\r\n     */\r\n    public function getValue()\r\n    {\r\n        return $this->value;\r\n    }\r\n\r\n    /**\r\n     * Get id\r\n     *\r\n     * @return id $id\r\n     */\r\n    public function getId()\r\n    {\r\n        return $this->id;\r\n    }\r\n\r\n    /**\r\n     * Set displayName\r\n     *\r\n     * @param string $displayName\r\n     */\r\n    public function setDisplayName($displayName)\r\n    {\r\n        $this->displayName = $displayName;\r\n    }\r\n\r\n    /**\r\n     * Get displayName\r\n     *\r\n     * @return string $displayName\r\n     */\r\n    public function getDisplayName()\r\n    {\r\n        return $this->displayName;\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/doctrine/DoctrineMongoDBBundle/issues/comments/93929066","html_url":"https://github.com/doctrine/DoctrineMongoDBBundle/issues/39#issuecomment-93929066","issue_url":"https://api.github.com/repos/doctrine/DoctrineMongoDBBundle/issues/39","id":93929066,"user":{"login":"indeyets","id":13445,"avatar_url":"https://avatars.githubusercontent.com/u/13445?v=3","gravatar_id":"","url":"https://api.github.com/users/indeyets","html_url":"https://github.com/indeyets","followers_url":"https://api.github.com/users/indeyets/followers","following_url":"https://api.github.com/users/indeyets/following{/other_user}","gists_url":"https://api.github.com/users/indeyets/gists{/gist_id}","starred_url":"https://api.github.com/users/indeyets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indeyets/subscriptions","organizations_url":"https://api.github.com/users/indeyets/orgs","repos_url":"https://api.github.com/users/indeyets/repos","events_url":"https://api.github.com/users/indeyets/events{/privacy}","received_events_url":"https://api.github.com/users/indeyets/received_events","type":"User","site_admin":false},"created_at":"2015-04-17T07:14:55Z","updated_at":"2015-04-17T07:14:55Z","body":"upstream issue is closed, but it is definitely there. I see it both with inheritance and traits"}}