<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sun May 26 08:47:42 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-2255/DDC-2255.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-2255] [Doctrine-Bridge][Console] Entity, Getters and Setters Generating Bug detected in Symfony 2 Framework</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2255</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;h3&gt;&lt;a name=&quot;BugfoundwhengenerationtheEntity%2CGettersandSettersbyusingtheCommand%3A&quot;&gt;&lt;/a&gt;Bug found when generation the Entity, Getters and Setters by using the Command:&lt;/h3&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-none&quot;&gt;
&amp;gt; php app/console doctrine:generate:entities YourBundleBundle:YourEntity 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In the situation you have a &lt;b&gt;OneToMany&lt;/b&gt; relation in the Entity and you did implement the &lt;b&gt;__construct()&lt;/b&gt;, then the Console &lt;b&gt;Wont&lt;/b&gt; generate the &lt;b&gt;ArrayCollection()&lt;/b&gt; !&lt;br/&gt;
In the case you did not implement the &lt;b&gt;__construct()&lt;/b&gt;, then everything will goes fine when generating them,&lt;br/&gt;
Example:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-none&quot;&gt;
/**
 * @ORM\OneToMany(targetEntity=&quot; YourBundleBundle \Entity\ YourEntity &quot;, mappedBy=&quot; YourEntity &quot;)
 */
private $YourAttribut;

public function __construct()
{
  $this-&amp;gt; YourAttribut = new \Doctrine\Common\Collections\ArrayCollection();
} 
// But in the case you did implement the __construct() before using the Command, let say like this:

public function __construct()
{
  $this-&amp;gt; YourOtherAttribut = a_value;
} 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In this case, when using the Command to generate Entity, Getters and Setters, the Console &lt;b&gt;Wont&lt;/b&gt; generate the &lt;b&gt;ArrayCollection()&lt;/b&gt; of the &lt;b&gt;OneToMany&lt;/b&gt; relations in the &lt;b&gt;__construct()&lt;/b&gt; !&lt;/p&gt;</description>
                <environment></environment>
            <key id="14408">DDC-2255</key>
            <summary>[Doctrine-Bridge][Console] Entity, Getters and Setters Generating Bug detected in Symfony 2 Framework</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="nayzo">Ala Eddine Khefifi</reporter>
                        <labels>
                        <label>collection</label>
                    </labels>
                <created>Thu, 24 Jan 2013 11:38:03 +0000</created>
                <updated>Thu, 24 Jan 2013 13:24:22 +0000</updated>
                    <resolved>Thu, 24 Jan 2013 12:26:39 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19398" author="ocramius" created="Thu, 24 Jan 2013 12:26:39 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=nayzo&quot; class=&quot;user-hover&quot; rel=&quot;nayzo&quot;&gt;Ala Eddine Khefifi&lt;/a&gt; This is expected behavior, since the generator should not change already existing methods&lt;/p&gt;</comment>
                    <comment id="19399" author="nayzo" created="Thu, 24 Jan 2013 12:50:41 +0000"  >&lt;p&gt;but it could override them and add missing instruction that should be added within the code, otherwise it leads to a dis-function and non stable relations !! &lt;/p&gt;</comment>
                    <comment id="19402" author="ocramius" created="Thu, 24 Jan 2013 13:24:22 +0000"  >&lt;p&gt;No, that is not up to the generator. Entity generation and fixing your broken existing code are different things. You should not rely on the generator to handle this kind of problems, the generator just gives you a kick-start, but after that, you are on your own.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>