<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sun May 19 18:50:50 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/si/jira.issueviews:issue-xml/DDC-1579/DDC-1579.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Doctrine Project</title>
    <link>http://www.doctrine-project.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.7</version>
        <build-number>850</build-number>
        <build-date>21-02-2013</build-date>
    </build-info>

<item>
            <title>[DDC-1579] MappedSuperClass and inheritance problem with console generate:entities command</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1579</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have two classes.&lt;/p&gt;

&lt;p&gt;One extends from another. I&apos;m using the annotation @MappedSuperclass&lt;br/&gt;
and operates correctly, but when he did the entities generation&lt;br/&gt;
through the command console, doctrine adds the property and the&lt;br/&gt;
methods of the &quot;father&quot; class in the subclass.&lt;/p&gt;

&lt;p&gt;This is a bug of the command console?&lt;/p&gt;

&lt;p&gt;Really you should not copy them if you do not extend them. When you&lt;br/&gt;
run the update of the database schema, i must delete these fields and&lt;br/&gt;
methods added to obtain the desired result.&lt;/p&gt;

&lt;p&gt;What happens?&lt;/p&gt;

&lt;p&gt;Im usign Symfony 2.&lt;/p&gt;

&lt;p&gt;Thanks!!!!&lt;/p&gt;

&lt;p&gt;Code:&lt;/p&gt;

&lt;p&gt;Father class:&lt;/p&gt;

&lt;p&gt;/********************************************************************&lt;/p&gt;

&lt;p&gt;/**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@ORM\MappedSuperclass&lt;br/&gt;
 */&lt;br/&gt;
abstract class ConfigBase&lt;br/&gt;
{&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;    /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@ORM\Column(name=&quot;enabled&quot;, type=&quot;boolean&quot;)&lt;br/&gt;
     */&lt;br/&gt;
    protected $enabled;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;    /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Set enabled&lt;br/&gt;
     *&lt;/li&gt;
	&lt;li&gt;@param boolean $enabled&lt;br/&gt;
     */&lt;br/&gt;
    public function setEnabled($enabled)
    {
        $this-&amp;gt;enabled = $enabled;
    }&lt;br/&gt;
&lt;br/&gt;
    /**&lt;br/&gt;
     * Get enabled&lt;br/&gt;
     *&lt;br/&gt;
     * @return boolean&lt;br/&gt;
     */&lt;br/&gt;
    public function getEnabled()&lt;br/&gt;
    {
        return $this-&amp;gt;enabled;
    }&lt;br/&gt;
&lt;br/&gt;
}&lt;br/&gt;
&lt;br/&gt;
/********************************************************************&lt;br/&gt;
&lt;br/&gt;
SubClass&lt;br/&gt;
&lt;br/&gt;
/********************************************************************&lt;br/&gt;
&lt;br/&gt;
/**&lt;br/&gt;
 * @ORM\Entity&lt;br/&gt;
 *&lt;br/&gt;
 */&lt;br/&gt;
class UserConfig extends ConfigBase&lt;br/&gt;
{&lt;br/&gt;
    /**&lt;br/&gt;
     * @var integer $id&lt;br/&gt;
     *&lt;br/&gt;
     * @ORM\Column(name=&quot;id&quot;, type=&quot;integer&quot;)&lt;br/&gt;
     * @ORM\Id&lt;br/&gt;
     * @ORM\GeneratedValue(strategy=&quot;AUTO&quot;)&lt;br/&gt;
     */&lt;br/&gt;
    protected $id;&lt;br/&gt;
&lt;br/&gt;
    /**&lt;br/&gt;
     * Get id&lt;br/&gt;
     *&lt;br/&gt;
     * @return integer&lt;br/&gt;
     */&lt;br/&gt;
    public function getId()&lt;br/&gt;
    {
        return $this-&amp;gt;id;
    }&lt;br/&gt;
&lt;br/&gt;
/************************************************/&lt;br/&gt;
/* Auto generated and non desired values */&lt;br/&gt;
/************************************************/&lt;br/&gt;
    /**&lt;br/&gt;
     * @var boolean $enabled&lt;br/&gt;
     */&lt;br/&gt;
    private $enabled;&lt;br/&gt;
&lt;br/&gt;
    /**&lt;br/&gt;
     * Set enabled&lt;br/&gt;
     *&lt;br/&gt;
     * @param boolean $enabled&lt;br/&gt;
     */&lt;br/&gt;
    public function setEnabled($enabled)&lt;br/&gt;
    {        $this-&amp;gt;enabled = $enabled;    }&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;    /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Get enabled&lt;br/&gt;
     *&lt;/li&gt;
	&lt;li&gt;@return boolean&lt;br/&gt;
     */&lt;br/&gt;
    public function getEnabled()
    {
        return $this-&amp;gt;enabled;
    } &lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment>Debian 6.0.3  -  Linux 2.6.32-5-amd64&lt;br/&gt;
&lt;br/&gt;
Symfony2 2.0.8 + Doctrine2 2.1.5</environment>
            <key id="13330">DDC-1579</key>
            <summary>MappedSuperClass and inheritance problem with console generate:entities command</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="smoya">Sergio Moya</reporter>
                        <labels>
                    </labels>
                <created>Thu, 5 Jan 2012 10:26:27 +0000</created>
                <updated>Mon, 10 Dec 2012 10:07:12 +0000</updated>
                    <resolved>Mon, 9 Jan 2012 14:07:49 +0000</resolved>
                            <version>2.1.5</version>
                                <fixVersion>2.3</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17203" author="beberlei" created="Mon, 9 Jan 2012 14:07:49 +0000"  >&lt;p&gt;It is a known problem that will be fixed in 2.3 hopefully.&lt;/p&gt;</comment>
                    <comment id="18156" author="johan" created="Tue, 3 Jul 2012 18:48:08 +0000"  >&lt;p&gt;I just noticed that this is only an issue if the member has a protected scope in the mapped super class, it works fine for private members.&lt;/p&gt;</comment>
                    <comment id="19115" author="lukxde" created="Mon, 10 Dec 2012 10:07:12 +0000"  >&lt;p&gt;As of Doctrine 2.3.0, Symfony 2.1.3, this behaviour is still reproducable.&lt;br/&gt;
Mr. Ehlers is correct; generation will work correctly when the super class&apos; properties are set to private scope. However, in that case the Proxy Object&apos;s lazy loading can&apos;t set the properties in question.&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10002">
                <name>Dependency</name>
                                <outwardlinks description="depends on">
                            <issuelink>
            <issuekey id="13345">DDC-1590</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>