<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Tue May 21 13:49:43 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/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+DDC+AND+fixVersion+%3D+%222.2.3%22&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://www.doctrine-project.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Doctrine Project</title>
        <link>http://www.doctrine-project.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+DDC+AND+fixVersion+%3D+%222.2.3%22</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="26" total="26"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DDC-1944] [GH-408] Fix typo in remove method template in entity generator</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1944</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of benlumley:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/408&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/408&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

&lt;p&gt;Single character change - fixes generated docblocks for removeXXX methods.&lt;/p&gt;

&lt;p&gt;Before:&lt;/p&gt;

&lt;p&gt;    /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Remove measurements&lt;br/&gt;
     *&lt;/li&gt;
	&lt;li&gt;@param &amp;lt;variableType$measurements&lt;br/&gt;
     */&lt;br/&gt;
     public function removeMeasurement(\My\Bundle\Entity\CalibrationMeasurement $measurements)
     {
         $this-&amp;gt;measurements-&amp;gt;removeElement($measurements);
     }&lt;br/&gt;
&lt;br/&gt;
After:&lt;br/&gt;
&lt;br/&gt;
    /**&lt;br/&gt;
     * Remove measurements&lt;br/&gt;
     *&lt;br/&gt;
     * @param My\Bundle\Entity\Measurement $measurements&lt;br/&gt;
     */&lt;br/&gt;
     public function removeMeasurement(\My\Bundle\Entity\Measurement $measurements)&lt;br/&gt;
     {         $this-&amp;gt;measurements-&amp;gt;removeElement($measurements);     }&lt;/li&gt;
&lt;/ul&gt;

</description>
                <environment></environment>
            <key id="13880">DDC-1944</key>
            <summary>[GH-408] Fix typo in remove method template in entity generator</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 25 Jul 2012 17:53:24 +0000</created>
                <updated>Sun, 29 Jul 2012 07:08:35 +0000</updated>
                    <resolved>Sun, 29 Jul 2012 07:08:35 +0000</resolved>
                                            <fixVersion>2.2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18392" author="beberlei" created="Sun, 29 Jul 2012 07:08:24 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-408&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/408&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/408&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1941] [GH-407] DDC-1939 - Removing references to non-existing AssociationMapping class</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1941</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Ocramius:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/407&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/407&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

&lt;p&gt;This fixes &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1939&quot; title=&quot;Trying to save ManyToMany relatrionship&quot;&gt;&lt;del&gt;DDC-1939&lt;/del&gt;&lt;/a&gt;, which is caused by an overlooked usage of `Doctrine\ORM\Mapping\AssociationMapping`, which was removed.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13877">DDC-1941</key>
            <summary>[GH-407] DDC-1939 - Removing references to non-existing AssociationMapping class</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 24 Jul 2012 09:42:12 +0000</created>
                <updated>Sun, 29 Jul 2012 07:33:15 +0000</updated>
                    <resolved>Sun, 29 Jul 2012 07:33:15 +0000</resolved>
                                            <fixVersion>2.2.3</fixVersion>
                <fixVersion>2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18393" author="beberlei" created="Sun, 29 Jul 2012 07:29:45 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-407&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/407&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/407&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18395" author="beberlei" created="Sun, 29 Jul 2012 07:33:15 +0000"  >&lt;p&gt;Merged this PR&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1939] Trying to save ManyToMany relatrionship</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1939</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When i try to save a many to many relationship i have to following error&lt;/p&gt;

&lt;p&gt;Fatal error: Call to a member function getOwner() on a non-object in  Doctrine/ORM/Persisters/ManyToManyPersister.php on line 181&lt;/p&gt;

&lt;p&gt;It tries to call getOwner on the following array ($mapping)&lt;/p&gt;

&lt;p&gt;array(19) {&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;fieldName&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; string(10) &quot;privileges&quot;&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;joinTable&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; array(4) {&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;name&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; string(36) &quot;fsbackend.user_mch_account_privilege&quot;&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;schema&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; NULL&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;joinColumns&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; array(2) {&lt;br/&gt;
      &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; =&amp;gt; array(6) &lt;/p&gt;
{
        [&quot;name&quot;] =&amp;gt; string(13) &quot;mch_accountid&quot;
        [&quot;referencedColumnName&quot;] =&amp;gt; string(13) &quot;mch_accountid&quot;
        [&quot;unique&quot;] =&amp;gt; bool(false)
        [&quot;nullable&quot;] =&amp;gt; bool(true)
        [&quot;onDelete&quot;] =&amp;gt; NULL
        [&quot;columnDefinition&quot;] =&amp;gt; NULL
      }
&lt;p&gt;      &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; =&amp;gt; array(6) &lt;/p&gt;
{
        [&quot;name&quot;] =&amp;gt; string(3) &quot;uid&quot;
        [&quot;referencedColumnName&quot;] =&amp;gt; string(3) &quot;uid&quot;
        [&quot;unique&quot;] =&amp;gt; bool(false)
        [&quot;nullable&quot;] =&amp;gt; bool(true)
        [&quot;onDelete&quot;] =&amp;gt; NULL
        [&quot;columnDefinition&quot;] =&amp;gt; NULL
      }
&lt;p&gt;    }&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;inverseJoinColumns&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; array(1) {&lt;br/&gt;
      &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; =&amp;gt; array(6) &lt;/p&gt;
{
        [&quot;name&quot;] =&amp;gt; string(10) &quot;resourceid&quot;
        [&quot;referencedColumnName&quot;] =&amp;gt; string(10) &quot;resourceid&quot;
        [&quot;unique&quot;] =&amp;gt; bool(false)
        [&quot;nullable&quot;] =&amp;gt; bool(true)
        [&quot;onDelete&quot;] =&amp;gt; NULL
        [&quot;columnDefinition&quot;] =&amp;gt; NULL
      }
&lt;p&gt;    }&lt;br/&gt;
  }&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;targetEntity&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; string(21) &quot;Entity\User\Privilege&quot;&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;mappedBy&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; NULL&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;inversedBy&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; NULL&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;cascade&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; array(0) {&lt;br/&gt;
  }&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;indexBy&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; string(10) &quot;resourceid&quot;&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;fetch&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; int(2)&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;type&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; int(8)&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;isOwningSide&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; bool(true)&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;sourceEntity&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; string(26) &quot;Entity\Merchant\Membership&quot;&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;isCascadeRemove&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; bool(false)&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;isCascadePersist&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; bool(false)&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;isCascadeRefresh&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; bool(false)&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;isCascadeMerge&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; bool(false)&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;isCascadeDetach&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; bool(false)&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;relationToSourceKeyColumns&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; array(2) &lt;/p&gt;
{
    [&quot;mch_accountid&quot;] =&amp;gt; string(13) &quot;mch_accountid&quot;
    [&quot;uid&quot;] =&amp;gt; string(3) &quot;uid&quot;
  }
&lt;p&gt;  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;joinTableColumns&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; array(3) &lt;/p&gt;
{
    [0] =&amp;gt; string(13) &quot;mch_accountid&quot;
    [1] =&amp;gt; string(3) &quot;uid&quot;
    [2] =&amp;gt; string(10) &quot;resourceid&quot;
  }
&lt;p&gt;  &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;relationToTargetKeyColumns&amp;quot;&amp;#93;&lt;/span&gt; =&amp;gt; array(1) &lt;/p&gt;
{
    [&quot;resourceid&quot;] =&amp;gt; string(10) &quot;resourceid&quot;
  }
&lt;p&gt;}&lt;/p&gt;</description>
                <environment></environment>
            <key id="13874">DDC-1939</key>
            <summary>Trying to save ManyToMany relatrionship</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="yokoloko">Jeremie Tom tom</reporter>
                        <labels>
                    </labels>
                <created>Mon, 23 Jul 2012 10:21:04 +0000</created>
                <updated>Sun, 29 Jul 2012 07:32:46 +0000</updated>
                    <resolved>Sun, 29 Jul 2012 07:32:46 +0000</resolved>
                            <version>2.2</version>
                                <fixVersion>2.2.3</fixVersion>
                <fixVersion>2.3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="18369" author="ocramius" created="Mon, 23 Jul 2012 10:30:37 +0000"  >&lt;p&gt;Can you try to replace your cache with an `ArrayCache` and see if the problem may come from there?&lt;br/&gt;
It would also be interesting to see your bootstrap code and the code you use to interact with the collection.&lt;/p&gt;</comment>
                    <comment id="18370" author="yokoloko" created="Mon, 23 Jul 2012 11:56:54 +0000"  >&lt;p&gt;I&apos;m already using an ArrayCache for my cache.&lt;/p&gt;

&lt;p&gt;Also for my bootstrap I&apos;m using this implementation of it : &lt;a href=&quot;https://github.com/guilhermeblanco/ZendFramework1-Doctrine2&quot; class=&quot;external-link&quot;&gt;https://github.com/guilhermeblanco/ZendFramework1-Doctrine2&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here is how i interact with the collection.&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;$collection-&amp;gt;clear();&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;foreach ($values as $value) {&lt;/tt&gt;&lt;br/&gt;
    &lt;tt&gt;$collection-&amp;gt;add(&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;$this-&amp;gt;_em-&amp;gt;getReference(&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&apos;Entity\User\Privilege&apos;,&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;$value&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;));&lt;/tt&gt;}&lt;/p&gt;

&lt;p&gt;... Later on ...&lt;br/&gt;
... I have an entity $userAccount with many memberships set to Cascade persist, ....&lt;br/&gt;
... and on the membership entity relationship i have my collection ...&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;$this-&amp;gt;_em-&amp;gt;persist($userAccount);&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;$this-&amp;gt;_em-&amp;gt;flush();&lt;/tt&gt;&lt;/p&gt;
</comment>
                    <comment id="18371" author="yokoloko" created="Tue, 24 Jul 2012 07:52:58 +0000"  >&lt;p&gt;I don&apos;t know if it helps but it works if I replace $mapping with $coll on line 181 : &lt;/p&gt;

&lt;p&gt;&lt;tt&gt;$sourceClass = $this-&amp;gt;_em-&amp;gt;getClassMetadata(get_class($mapping-&amp;gt;getOwner()));&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Replaced by :&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;$sourceClass = $this-&amp;gt;_em-&amp;gt;getClassMetadata(get_class($coll-&amp;gt;getOwner()));&lt;/tt&gt;&lt;/p&gt;</comment>
                    <comment id="18372" author="ocramius" created="Tue, 24 Jul 2012 09:31:33 +0000"  >&lt;p&gt;Looks like code coming from the (removed) AssociationMapping class. The fix seems also to be valid. I&apos;m patching this.&lt;/p&gt;</comment>
                    <comment id="18373" author="ocramius" created="Tue, 24 Jul 2012 09:43:07 +0000"  >&lt;p&gt;Nevermind, I don&apos;t think this needs a test. It is just something overlooked during a refactoring. Being handled at &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1941&quot; title=&quot;[GH-407] DDC-1939 - Removing references to non-existing AssociationMapping class&quot;&gt;&lt;del&gt;DDC-1941&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18374" author="ocramius" created="Tue, 24 Jul 2012 09:57:34 +0000"  >&lt;p&gt;Could you please provide the models anyway? It would be interesting to see why the test suite doesn&apos;t cover that part &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;br/&gt;
Thank you!&lt;/p&gt;</comment>
                    <comment id="18375" author="yokoloko" created="Tue, 24 Jul 2012 12:36:54 +0000"  >&lt;p&gt;Ok I attached it. Tell me if you need more informations i didn&apos;t upload the full models. But just the parts i thought were relevant.&lt;/p&gt;</comment>
                    <comment id="18394" author="beberlei" created="Sun, 29 Jul 2012 07:32:46 +0000"  >&lt;p&gt;Fixed and applied to 2.2.3 and 2.3&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11210" name="Membership.php" size="968" author="yokoloko" created="Tue, 24 Jul 2012 12:36:54 +0000" />
                    <attachment id="11212" name="Privileges.php" size="332" author="yokoloko" created="Tue, 24 Jul 2012 12:36:54 +0000" />
                    <attachment id="11211" name="UserAccount.php" size="627" author="yokoloko" created="Tue, 24 Jul 2012 12:36:54 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1937] [GH-405] Add possibility to cache annotations wih APC</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1937</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of zim32:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/405&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/405&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

&lt;p&gt;APC has a bug - after apc_fetch is made, arrays loose their cursors. That is why is_numeric(key(...)) is not working&lt;/p&gt;</description>
                <environment></environment>
            <key id="13871">DDC-1937</key>
            <summary>[GH-405] Add possibility to cache annotations wih APC</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 21 Jul 2012 08:12:42 +0000</created>
                <updated>Sun, 29 Jul 2012 10:00:36 +0000</updated>
                    <resolved>Sun, 29 Jul 2012 10:00:14 +0000</resolved>
                                            <fixVersion>2.2.3</fixVersion>
                <fixVersion>2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18408" author="beberlei" created="Sun, 29 Jul 2012 10:00:36 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-405&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/405&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/405&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1909] Getting Fatal error Call to undefined method Doctrine\ORM\Mapping\ClassMetadata::getSqlExecutor()</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1909</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;
( ! ) Fatal error: Call to undefined method Doctrine\ORM\Mapping\ClassMetadata::getSqlExecutor() in /home/www/scms/library/Doctrine/ORM/Query.php on line 241
Call Stack
#	Time	Memory	Function	Location
1	0.0000	327100	{main}( )	../index.php:0
2	0.1485	4174724	Zend_Application-&amp;gt;run( )	../index.php:47
3	0.1485	4174724	Zend_Application_Bootstrap_Bootstrap-&amp;gt;run( )	../Application.php:366
4	0.1486	4174796	Zend_Controller_Front-&amp;gt;dispatch( ???, ??? )	../Bootstrap.php:97
5	0.1545	4488224	Zend_Controller_Router_Rewrite-&amp;gt;route( object(Zend_Controller_Request_Http)[333] )	../Front.php:911
6	0.1550	4488968	SCMS_Controller_Router_Route-&amp;gt;match( string(6), ??? )	../Rewrite.php:398
7	0.1567	4570028	Doctrine\ORM\AbstractQuery-&amp;gt;getOneOrNullResult( long )	../Route.php:72
8	0.1567	4570192	Doctrine\ORM\AbstractQuery-&amp;gt;execute( array(0), long )	../AbstractQuery.php:571
9	0.1567	4570660	Doctrine\ORM\Query-&amp;gt;_doExecute( )	../AbstractQuery.php:733
Variables in local scope (#9)

$executor =

	Undefined

$paramMappings =

	Undefined

$sqlParams =

	Undefined

$types =

	Undefined

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;error appears out of the blue, after a few refreshes it disappears, but this happens constantly.&lt;/p&gt;</description>
                <environment>PHP 5.3.6-13ubuntu3.8 with Suhosin-Patch (cli) (built: Jun 13 2012 17:19:54) &lt;br/&gt;
Copyright (c) 1997-2011 The PHP Group&lt;br/&gt;
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;with Xdebug v2.2.0, Copyright (c) 2002-2012, by Derick Rethans&lt;br/&gt;
</environment>
            <key id="13822">DDC-1909</key>
            <summary>Getting Fatal error Call to undefined method Doctrine\ORM\Mapping\ClassMetadata::getSqlExecutor()</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="gamesh">Justinas</reporter>
                        <labels>
                    </labels>
                <created>Thu, 5 Jul 2012 11:27:44 +0000</created>
                <updated>Sun, 29 Jul 2012 09:43:34 +0000</updated>
                    <resolved>Sun, 29 Jul 2012 09:43:34 +0000</resolved>
                            <version>2.2.2</version>
                                <fixVersion>2.2.3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="18191" author="ocramius" created="Thu, 5 Jul 2012 18:14:22 +0000"  >&lt;p&gt;Can you try namespacing your caches (metadata/query/results) and see if the problem persists?&lt;br/&gt;
Also, it would be interesting to see your bootstrap configuration...&lt;/p&gt;</comment>
                    <comment id="18210" author="beberlei" created="Thu, 5 Jul 2012 21:04:03 +0000"  >&lt;p&gt;We need the complete bootstrap configuratino and options.&lt;/p&gt;</comment>
                    <comment id="18253" author="gamesh" created="Mon, 9 Jul 2012 06:53:31 +0000"  >&lt;p&gt;DoctrineCache.php is a controller plugin that runs first and initializes doctrine cache usually memcache servers&lt;br/&gt;
options.ini contains all configuration options for doctrine&lt;/p&gt;

&lt;p&gt;Bisna initializes Doctrine based on options and integrates it into ZF&lt;/p&gt;

&lt;p&gt;as you can see all caches are namespaced, and i&apos;m currently the only one using system locally so no cache conflicts should occur even without namespaces&lt;/p&gt;</comment>
                    <comment id="18289" author="beberlei" created="Thu, 12 Jul 2012 07:41:46 +0000"  >&lt;p&gt;Can you show one of your controller actions/model services where this error occurs, explicitly the code that generates the ResultCache keys.&lt;/p&gt;</comment>
                    <comment id="18290" author="gamesh" created="Thu, 12 Jul 2012 07:57:32 +0000"  >&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;
if ($em instanceof \Doctrine\ORM\EntityManager) {
			//search for matching vanity urls from most accurate to least accurate
			//matching full slug first /tv/samsung/lcd then /tv/samsung, and then /tv
			foreach ($urls as $possible_match) {
				/* @var $q Doctrine\ORM\Query */
				$q = $em-&amp;gt;createQuery(&apos;SELECT r
				FROM SCMS\Entity\Route r
				WHERE r.full_slug = :slug&apos;);
				$q-&amp;gt;setMaxResults(1)
						-&amp;gt;setParameter(&apos;slug&apos;, $possible_match)
						-&amp;gt;useResultCache(true, \SCMS\DbCache::TTL_ROUTE, $possible_match);

				$result = $q-&amp;gt;getOneOrNullResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="18291" author="ocramius" created="Thu, 12 Jul 2012 08:11:22 +0000"  >&lt;p&gt;You should definitely namespace your cache (with something like Doctrine\Common\Cache\ApcCache#setNamespace() for example), since you&apos;re manually defining your cache key here...&lt;/p&gt;

&lt;p&gt;Is the explicit usage of the cache ID intended?&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=beberlei&quot; class=&quot;user-hover&quot; rel=&quot;beberlei&quot;&gt;Benjamin Eberlei&lt;/a&gt;, should the fetched cache items be checked for their type?&lt;/p&gt;</comment>
                    <comment id="18292" author="beberlei" created="Thu, 12 Jul 2012 08:14:13 +0000"  >&lt;p&gt;What are the contents of $urls and $possible_match? You should namespace them even further in your code:&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-java&quot;&gt;
$q-&amp;gt;useResultCache(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;, \SCMS\DbCache::TTL_ROUTE, &lt;span class=&quot;code-quote&quot;&gt;&quot;my_query_type_something_&quot;&lt;/span&gt; . $possible_match);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="18293" author="beberlei" created="Thu, 12 Jul 2012 08:17:53 +0000"  >&lt;p&gt;This isn&apos;t related to the result cache, but to the query cache though i just realized. However i don&apos;t see any way this is possible, the DQL Query Cache key is generated as a hash, the Metadata cache entry is generated using the ClassName as key. I don&apos;t udnerstand how the Metadata could end up in a Query Cache key.&lt;/p&gt;

&lt;p&gt;@ocramius As a fix, in AbstractQuery and ClassMetadataFactory, we should check if the return value is really instanceof ClassMetadata or ParserResult. And if that happens throw an error. Also we should prefix the metadata and DQL queries ourself.&lt;/p&gt;</comment>
                    <comment id="18294" author="gamesh" created="Thu, 12 Jul 2012 08:21:08 +0000"  >&lt;p&gt;$urls is an array of URIs array(&apos;/tv/samsung/lcd&apos;, &apos;/tv/samsung&apos;, &apos;/tv&apos;);&lt;br/&gt;
$possible_match is the value of array ex.: &apos;/tv/samsung/lcd&apos;&lt;/p&gt;

&lt;p&gt;i&apos;m setting the namespace in the configuration, and providing a unique id for each result cache. the documentation isn&apos;t clear&lt;br/&gt;
is namespace prefixed automatically if you set your cache id or is namespace ignored if you set cache id yourself.&lt;br/&gt;
so i always assumed that namespace is prefixed automatically, and that you have to set cacheId yourself for same query with different parameters, so that query searching for &apos;/tv/samsung&apos; would not return the same result as searching for &apos;/tv&apos;;&lt;/p&gt;</comment>
                    <comment id="18295" author="beberlei" created="Thu, 12 Jul 2012 08:26:59 +0000"  >&lt;p&gt;can you try setting different namespace for Query and Metadata cache? They seem to use the same prefix. Only the Result cache uses its own prefix.&lt;/p&gt;</comment>
                    <comment id="18296" author="ocramius" created="Thu, 12 Jul 2012 08:30:20 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=gamesh&quot; class=&quot;user-hover&quot; rel=&quot;gamesh&quot;&gt;Justinas&lt;/a&gt;, setting different caches for query, results and metadata allows you to have, as an example, 3 caches writing/reading from APC. If you set a namespace for those caches, those won&apos;t collide (everything is handled transparently).&lt;/p&gt;

&lt;p&gt;Anyway &lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=beberlei&quot; class=&quot;user-hover&quot; rel=&quot;beberlei&quot;&gt;Benjamin Eberlei&lt;/a&gt; is correct when he states that this shouldn&apos;t happen here. Even if your approach isn&apos;t correct (you don&apos;t need to explicitly set any cache key here, plus you should be using namespaced caches) the issue seems to be valid...&lt;/p&gt;

&lt;p&gt;Does this happen also with a clean cache?&lt;/p&gt;</comment>
                    <comment id="18297" author="gamesh" created="Thu, 12 Jul 2012 08:45:38 +0000"  >&lt;p&gt;i&apos;m not sure, about the clean cache, it just doesn&apos;t happen all the time so it&apos;s hard to check. If i remember correctly i flushed the cache, and the error appeared, after a few refreshes it disappeared, without flushing cache. it sorta appears and disappears from time to time.&lt;/p&gt;

&lt;p&gt;even if i don&apos;t set the namespace for my caches i have a local memcache, so no cache collision from other projects shouldn&apos;t occur&lt;/p&gt;</comment>
                    <comment id="18407" author="beberlei" created="Sun, 29 Jul 2012 09:43:34 +0000"  >&lt;p&gt;Added a guard to avoid this problem. Its not a real fix, but i cannot come up with the a way to reproduce the problem that you have exactly.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11204" name="Bisna.zip" size="5495" author="gamesh" created="Mon, 9 Jul 2012 06:53:31 +0000" />
                    <attachment id="11202" name="DoctrineCache.php" size="1652" author="gamesh" created="Mon, 9 Jul 2012 06:53:31 +0000" />
                    <attachment id="11203" name="options.ini" size="11333" author="gamesh" created="Mon, 9 Jul 2012 06:53:31 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1907] RemoveMethod generation doesn&apos;t exist</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1907</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Symfony2 test existence of AddMethod and RemoveMethod and tools doesn&apos;t generate RemoveMethod on Many Relation&lt;/p&gt;

&lt;p&gt;CF : symfony2/dev-master Symfony/Component/Form/Util/PropertyPath.php Line 535&lt;/p&gt;</description>
                <environment>Symfony2</environment>
            <key id="13817">DDC-1907</key>
            <summary>RemoveMethod generation doesn&apos;t exist</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="xorrox">Xorrox</reporter>
                        <labels>
                    </labels>
                <created>Wed, 4 Jul 2012 10:01:38 +0000</created>
                <updated>Wed, 4 Jul 2012 19:10:49 +0000</updated>
                    <resolved>Wed, 4 Jul 2012 19:10:49 +0000</resolved>
                            <version>2.2.2</version>
                                <fixVersion>2.2.3</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="18158" author="beberlei" created="Wed, 4 Jul 2012 19:10:49 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1901] [GH-386] [DDC-1895] Fix fetch relation by id of association field</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1901</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Burgov:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/386&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/386&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

&lt;p&gt;See issue notes for explaination&lt;/p&gt;</description>
                <environment></environment>
            <key id="13811">DDC-1901</key>
            <summary>[GH-386] [DDC-1895] Fix fetch relation by id of association field</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="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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 2 Jul 2012 13:35:27 +0000</created>
                <updated>Wed, 4 Jul 2012 20:27:51 +0000</updated>
                    <resolved>Wed, 4 Jul 2012 19:21:55 +0000</resolved>
                                            <fixVersion>2.2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="18155" author="beberlei" created="Tue, 3 Jul 2012 13:48:27 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-386&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/386&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/386&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18162" author="beberlei" created="Wed, 4 Jul 2012 19:21:55 +0000"  >&lt;p&gt;See &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1865&quot; title=&quot;[GH-368] Join poc&quot;&gt;&lt;del&gt;DDC-1865&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18163" author="beberlei" created="Wed, 4 Jul 2012 19:22:18 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1895&quot; title=&quot;update an entity with an ID column which is a relation instead of a normal field&quot;&gt;&lt;del&gt;DDC-1895&lt;/del&gt;&lt;/a&gt; i mean&lt;/p&gt;</comment>
                    <comment id="18172" author="beberlei" created="Wed, 4 Jul 2012 20:14:25 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-389&amp;#93;&lt;/span&gt; was opened&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/389&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/389&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18174" author="beberlei" created="Wed, 4 Jul 2012 20:27:51 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-389&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/389&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/389&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1895] update an entity with an ID column which is a relation instead of a normal field</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1895</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I got this error when trying to update an entity with an ID column which is a relation instead of a normal field: &lt;a href=&quot;https://gist.github.com/3399c0ad5e0a44a29f98&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/3399c0ad5e0a44a29f98&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the relevant mapping:&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-java&quot;&gt;&amp;lt;?php

namespace Roompot\TRSBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Samson\Bundle\TRSBundle\Entity\Registrar;

/**
 * @ORM\Entity
 */
class RegistrarDepartmentMapping
{
    /**
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;RoompotRegistrar&quot;&lt;/span&gt;)
     * @ORM\JoinColumn(referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;person_id&quot;&lt;/span&gt;)
     * @ORM\Id
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $registrar;

    /**
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Department&quot;&lt;/span&gt;)
     * @ORM\Id
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $department;

    /**
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-object&quot;&gt;boolean&lt;/span&gt;&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $head = &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getRegistrar()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;registrar;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setRegistrar(Registrar $registrar)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; !== $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;registrar) {
            &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \RuntimeException(&apos;Cannot change registrar! Remove &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; entity and create a &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; one&apos;);
        }
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;registrar = $registrar;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getDepartment()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; !== $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;registrar) {
            &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \RuntimeException(&apos;Cannot change department! Remove &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; entity and create a &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; one&apos;);
        }
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;department;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setDepartment(Department $department)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;department = $department;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function isHead()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;head;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setHead($head)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;head = $head;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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-java&quot;&gt;&amp;lt;?php

namespace Roompot\TRSBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Samson\Bundle\TRSBundle\Entity\Registrar;

/**
 * @ORM\Entity
 */
class RoompotRegistrar &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Registrar
{
    [...]
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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-java&quot;&gt;&amp;lt;?php

namespace Samson\Bundle\TRSBundle\Entity;

use Samson\Bundle\AddressBookBundle\Entity\Person;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity 
 * @ORM\InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;SINGLE_TABLE&quot;&lt;/span&gt;)
 * @ORM\DiscriminatorColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;discr&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
 */
&lt;span class=&quot;code-keyword&quot;&gt;abstract&lt;/span&gt; class Registrar
{
    /**
     * @ORM\Id
     * @ORM\OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Samson\Bundle\AddressBookBundle\Entity\Person&quot;&lt;/span&gt;, cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;persist&quot;&lt;/span&gt;})
     * @ORM\JoinColumn(nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $person;

    [...]
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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-java&quot;&gt;&amp;lt;?php

namespace Samson\Bundle\AddressBookBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity(repositoryClass=&lt;span class=&quot;code-quote&quot;&gt;&quot;Samson\Bundle\AddressBookBundle\Entity\PersonRepository&quot;&lt;/span&gt;)
 */
class Person &lt;span class=&quot;code-keyword&quot;&gt;implements&lt;/span&gt; [...]
{
    /**
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     * @ORM\Id
     * @ORM\GeneratedValue
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;

    [...]
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I was able to fix the error by updating BasicEntityPersister: &lt;a href=&quot;https://github.com/SamsonIT/doctrine2/compare/fetching_id_column_if_relation&quot; class=&quot;external-link&quot;&gt;https://github.com/SamsonIT/doctrine2/compare/fetching_id_column_if_relation&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13804">DDC-1895</key>
            <summary>update an entity with an ID column which is a relation instead of a normal field</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="burgov">Bart van den Burg</reporter>
                        <labels>
                    </labels>
                <created>Wed, 27 Jun 2012 10:12:19 +0000</created>
                <updated>Thu, 5 Jul 2012 20:00:50 +0000</updated>
                    <resolved>Thu, 5 Jul 2012 20:00:50 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.2.3</fixVersion>
                <fixVersion>2.3</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="18200" author="beberlei" created="Thu, 5 Jul 2012 20:00:50 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1861] UnitOfWork#doMerge() bug on visited entities</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1861</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Its using return; instead of return $vsted&lt;span class=&quot;error&quot;&gt;&amp;#91;$oid&amp;#93;&lt;/span&gt;; because contract of doMerge(9 actually expects a @return.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13764">DDC-1861</key>
            <summary>UnitOfWork#doMerge() bug on visited entities</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 9 Jun 2012 11:32:17 +0000</created>
                <updated>Wed, 4 Jul 2012 19:57:50 +0000</updated>
                    <resolved>Wed, 4 Jul 2012 19:57:50 +0000</resolved>
                                            <fixVersion>2.2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1846] Pessimistic lock does not retreive latest version of entity when entity is already in doctrine cache</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1846</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When setting a pessimistic lock on an entity (e.g. a row lock) and retreiving an entity from the database, Doctrine returns the entity from cache if it has any. When updating a counter on an entity for example, it is important the row is locked, retreived, updated and then unlocked to guarantee the counter keeps in sync. Using $em-&amp;gt;clear(); before $em-&amp;gt;find(); is a work-around for this problem, but as requested by Benjamin Eberlei on the google groups thread (&lt;a href=&quot;https://groups.google.com/forum/?fromgroups#!topic/doctrine-user/N8Xop2-XbTY&quot; class=&quot;external-link&quot;&gt;https://groups.google.com/forum/?fromgroups#!topic/doctrine-user/N8Xop2-XbTY&lt;/a&gt;) this bugreport is made to fix this without the need of clear().&lt;/p&gt;

&lt;p&gt;In the next example, if the entity is previously retreived already, find() returns that version instead of retreiving the current version from the database after the rowlock is set. When $em-&amp;gt;clear(); can be used to work-around the problem&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-java&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;// $em &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; EntityManager
&lt;/span&gt;
&lt;span class=&quot;code-comment&quot;&gt;//$em-&amp;gt;clear(); // Uncommenting &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; fixed the problem
&lt;/span&gt;$em-&amp;gt;getConnection()-&amp;gt;beginTransaction();

&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; {
	$entity = $em-&amp;gt;find(&apos;Entity&apos;, $id, LockMode::PESSIMISTIC_WRITE);
	
	/* Update some fields, &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; example, decrease a counter */
	$entity-&amp;gt;setCounter($entity-&amp;gt;getCounter() - 1);
	
	$em-&amp;gt;persist($entity);
	$em-&amp;gt;flush();
	$em-&amp;gt;getConnection()-&amp;gt;commit();
} &lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; ( \Exception $ex ) {
	$em-&amp;gt;getConnection()-&amp;gt;rollback();
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>Mysql 5.5.22-0ubuntu1</environment>
            <key id="13740">DDC-1846</key>
            <summary>Pessimistic lock does not retreive latest version of entity when entity is already in doctrine cache</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="bramklg">Bram Klein Gunnewiek</reporter>
                        <labels>
                    </labels>
                <created>Wed, 30 May 2012 07:27:18 +0000</created>
                <updated>Sat, 7 Jul 2012 14:52:50 +0000</updated>
                    <resolved>Sat, 7 Jul 2012 14:52:50 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.2.3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="18132" author="bramklg" created="Fri, 22 Jun 2012 14:52:40 +0000"  >&lt;p&gt;Any update or ETA on this one? The work-around is still in my production code and I would like to get it out to get it cleaned-up a bit.&lt;/p&gt;</comment>
                    <comment id="18175" author="beberlei" created="Wed, 4 Jul 2012 21:11:00 +0000"  >&lt;p&gt;Why does the $this-&amp;gt;_em-&amp;gt;lock() in EntityRepository#find() don&apos;t work for you? It should grab the entity from cache, then do a SELECT 1 FROM table and do the pessemistic write lock on the row.&lt;/p&gt;</comment>
                    <comment id="18184" author="bramklg" created="Thu, 5 Jul 2012 08:58:03 +0000"  >&lt;p&gt;I don&apos;t exactly know why that does not work. I created this bugreport on your request (see: &lt;a href=&quot;https://groups.google.com/forum/?fromgroups#!topic/doctrine-user/N8Xop2-XbTY&quot; class=&quot;external-link&quot;&gt;https://groups.google.com/forum/?fromgroups#!topic/doctrine-user/N8Xop2-XbTY&lt;/a&gt;) because I couldnt figure out what I was do&#239;ng wrong. &lt;/p&gt;

&lt;p&gt;The script that updates the entity is a long running console script, allot of times the entity in question is already in the cache and did not get locked properly. There are two seperate processes that work on the same entity (processing jobs from a jobqueu) and when updating the counters at the same time, and both scripts (with the same locking code as described in the bugreport) have to update a counter, the counter is not updated properly (e.g. both scripts do for example 2-1 where the first script should do 2-1, the second script 1-1 since the counter is updated by the first script).&lt;/p&gt;</comment>
                    <comment id="18185" author="beberlei" created="Thu, 5 Jul 2012 09:22:42 +0000"  >&lt;p&gt;Can you paste the SQL log that gets executed?&lt;/p&gt;</comment>
                    <comment id="18186" author="bramklg" created="Thu, 5 Jul 2012 09:47:57 +0000"  >&lt;p&gt;Allright, I reverted  the code back to my original code. Doctrine is updated to the latest dev version. Code looks like this:&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; 
$em = $this-&amp;gt;getEntityManager();
#$em-&amp;gt;clear(); // This fixes the locking problem
$em-&amp;gt;getConnection()-&amp;gt;beginTransaction();

try {
    // Lock entity in db and load it to update counters
    $entity = $em-&amp;gt;find($this-&amp;gt;getEntityName(), $this-&amp;gt;getEppEntityId(), LockMode::PESSIMISTIC_WRITE);

    printf(&apos;Decreasing pendingjobs with 1. Current amount of pending jobs is %d&apos;, $entity-&amp;gt;getPendingJobs());

    $entity-&amp;gt;setPendingJobs($entity-&amp;gt;getPendingJobs() - 1);

    $em-&amp;gt;persist($entity);
    $em-&amp;gt;flush();
    $em-&amp;gt;getConnection()-&amp;gt;commit();
} catch ( \Exception $ex ) {
    $em-&amp;gt;getConnection()-&amp;gt;rollback();
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The output of the debug statement looks like this (e.g. each line is printed by a different process. Instead of the first script decreasing 2 to 1 and the second script decreasing 1 to 0, both scripts decrease 2 to 1):&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; 
[2012-07-05 11:31:08] Decreasing pendingjobs with 1. Current amount of pending jobs is 2
[2012-07-05 11:31:07] Decreasing pendingjobs with 1. Current amount of pending jobs is 2
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I enabled SQL logging but the thing is huge and I dont really know where to look. There is data in it that I dont want publically availible on the internet, is it possible to mail the to you directly?&lt;/p&gt;</comment>
                    <comment id="18225" author="beberlei" created="Sat, 7 Jul 2012 14:52:50 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1836] [GH-356] [DDC-1835] Fix clone side effects in PersistentCollection</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1836</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of kdambekalns:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/356&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/356&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

</description>
                <environment></environment>
            <key id="13726">DDC-1836</key>
            <summary>[GH-356] [DDC-1835] Fix clone side effects in PersistentCollection</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 24 May 2012 16:56:24 +0000</created>
                <updated>Sun, 27 May 2012 08:18:59 +0000</updated>
                    <resolved>Sun, 27 May 2012 08:18:59 +0000</resolved>
                                            <fixVersion>2.1.7</fixVersion>
                <fixVersion>2.2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17988" author="beberlei" created="Sun, 27 May 2012 08:12:45 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-356&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/356&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/356&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1835] Cloning PersistentCollection affects internal collection of clone source</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1835</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When a PersistentCollection (PC) is loaded and is cloned before it is initialized, anything that is already in that collection will be duplicated if the collection is initialized after it has been marked dirty. The cause is a too late clone operation on the internal (Array)Collection (AC) in the PC.&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;PC is loaded, but not initialized. The internal AC is empty.&lt;/li&gt;
	&lt;li&gt;PC is cloned. PC&apos; calls initialize() in __clone()&lt;/li&gt;
	&lt;li&gt;PC&apos; fills AC (as that has not been cloned yet)&lt;/li&gt;
	&lt;li&gt;PC&apos; clones AC&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;As a result the AC in PC now contains elements, but PC still is uninitialized. If PC is afterwards initialized and dirty, the elements already in AC will be considered new and added again to the AC.&lt;/p&gt;

&lt;p&gt;The effect will be constraint violations in join tables due to duplicate entries.&lt;/p&gt;

&lt;p&gt;The clone method causing this has been introduced with commit &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/647bd2b2f295d2cbe7d0ee67f21be8a48bae3db5&quot; class=&quot;external-link&quot;&gt;647bd2b2f295d2cbe7d0ee67f21be8a48bae3db5&lt;/a&gt; on February 17th.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13725">DDC-1835</key>
            <summary>Cloning PersistentCollection affects internal collection of clone source</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="k-fish">Karsten Dambekalns</reporter>
                        <labels>
                    </labels>
                <created>Thu, 24 May 2012 15:27:44 +0000</created>
                <updated>Sun, 27 May 2012 08:19:11 +0000</updated>
                    <resolved>Sun, 27 May 2012 08:19:11 +0000</resolved>
                            <version>2.2</version>
                                <fixVersion>2.1.7</fixVersion>
                <fixVersion>2.2.3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17980" author="k-fish" created="Thu, 24 May 2012 16:56:57 +0000"  >&lt;p&gt;Test and fix: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/356&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/356&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1833] [GH-354] ValidateSchemaCommand dont&apos;t call exit() in execute()</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1833</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of pscheit:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/354&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/354&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

&lt;p&gt;calling exit() in the command itself is not needed. Symfony Application calls exit() with the return exit code.&lt;/p&gt;

&lt;p&gt;chaing this into return makes the validateSchemaCommand usable in other commands as a sub-command&lt;/p&gt;</description>
                <environment></environment>
            <key id="13721">DDC-1833</key>
            <summary>[GH-354] ValidateSchemaCommand dont&apos;t call exit() in execute()</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 22 May 2012 11:28:41 +0000</created>
                <updated>Tue, 22 May 2012 17:07:39 +0000</updated>
                    <resolved>Tue, 22 May 2012 17:07:39 +0000</resolved>
                                            <fixVersion>2.2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17960" author="beberlei" created="Tue, 22 May 2012 17:03:51 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-354&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/354&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/354&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1830] [GH-353] prevent the validator to stop with an &quot;undefined array index&quot;-error</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1830</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of pscheit:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/353&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/353&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

&lt;p&gt; while validating a wrong inversedBy Attribute.&lt;/p&gt;

&lt;p&gt;The validation-error is caught correctly in the block above. Just the warning / notice stops the validator when using stricter error handling&lt;/p&gt;</description>
                <environment></environment>
            <key id="13717">DDC-1830</key>
            <summary>[GH-353] prevent the validator to stop with an &quot;undefined array index&quot;-error</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 21 May 2012 16:24:41 +0000</created>
                <updated>Tue, 22 May 2012 17:10:09 +0000</updated>
                    <resolved>Tue, 22 May 2012 17:10:09 +0000</resolved>
                                            <fixVersion>2.2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17961" author="beberlei" created="Tue, 22 May 2012 17:09:12 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-353&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/353&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/353&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1828] [GH-351] Composer requirement</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1828</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of stof:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/351&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/351&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

&lt;p&gt;The ORM should accept using the 2.2 branch of DBAL and Common too, not only the tags (preferring the stable release should be done using the stability flag in composer at the project level)&lt;/p&gt;</description>
                <environment></environment>
            <key id="13714">DDC-1828</key>
            <summary>[GH-351] Composer requirement</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 20 May 2012 20:50:41 +0000</created>
                <updated>Tue, 22 May 2012 17:13:19 +0000</updated>
                    <resolved>Tue, 22 May 2012 17:13:19 +0000</resolved>
                                            <fixVersion>2.2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17953" author="beberlei" created="Sun, 20 May 2012 21:19:00 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-351&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/351&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/351&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1799] Doctrine&apos;s Reverse Engineering 1-n (one to many) association misunderstood as 1-1 (one to one)</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1799</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I found an odd behaviour of Doctrine&apos;s reverse engineering process, just create two simple tables tied by a simple 1-n relationship, take a look at the snap of the folowing SQL code:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;    SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
    SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
    SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=&apos;TRADITIONAL&apos;;
    
    DROP SCHEMA IF EXISTS `ACME` ;
    CREATE SCHEMA IF NOT EXISTS `ACME` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ;
    USE `ACME` ;
    
    -- -----------------------------------------------------
    -- Table `ACME`.`task`
    -- -----------------------------------------------------
    DROP TABLE IF EXISTS `ACME`.`task` ;
    
    CREATE  TABLE IF NOT EXISTS `ACME`.`task` (
      `id_task` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
      `description` VARCHAR(45) NULL ,
      PRIMARY KEY (`id_task`) )
    ENGINE = InnoDB;
    
    
    -- -----------------------------------------------------
    -- Table `ACME`.`tag`
    -- -----------------------------------------------------
    DROP TABLE IF EXISTS `ACME`.`tag` ;
    
    CREATE  TABLE IF NOT EXISTS `ACME`.`tag` (
      `id_tag` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
      `name` VARCHAR(50) NULL ,
      `task_id` INT UNSIGNED NOT NULL ,
      PRIMARY KEY (`id_tag`) ,
      INDEX `fk_tag_task` (`task_id` ASC) ,
      CONSTRAINT `fk_tag_task`
        FOREIGN KEY (`task_id` )
        REFERENCES `ACME`.`task` (`id_task` )
        ON DELETE NO ACTION
        ON UPDATE NO ACTION)
    ENGINE = InnoDB;
    
    
    
    SET SQL_MODE=@OLD_SQL_MODE;
    SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
    SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I have a Symfony2 netbeans project at &lt;/p&gt;

&lt;p&gt;&amp;gt; /Applications/MAMP/htdocs/Acme&lt;/p&gt;

&lt;p&gt; and from that location, according to &lt;/p&gt;

&lt;p&gt;&amp;gt; &lt;a href=&quot;http://symfony.com/doc/current/cookbook/doctrine/reverse_engineering.html&quot; class=&quot;external-link&quot;&gt;http://symfony.com/doc/current/cookbook/doctrine/reverse_engineering.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; in a terminal I did:&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-java&quot;&gt;    $ ./../../bin/php/php5.3.6/bin/php app/console doctrine:mapping:convert yml ./src/Acme/TaskBundle/Resources/config/doctrine/ --from-database --force
    Processing entity &lt;span class=&quot;code-quote&quot;&gt;&quot;Tag&quot;&lt;/span&gt;
    Processing entity &lt;span class=&quot;code-quote&quot;&gt;&quot;Task&quot;&lt;/span&gt;
    
    Exporting &lt;span class=&quot;code-quote&quot;&gt;&quot;yml&quot;&lt;/span&gt; mapping information to &lt;span class=&quot;code-quote&quot;&gt;&quot;/Applications/MAMP/htdocs/Acme/src/Acme/TaskBundle/Resources/config/doctrine&quot;&lt;/span&gt;
    
    $ ./../../bin/php/php5.3.6/bin/php app/console doctrine:mapping:&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; Acme\TaskBundle yml
    Importing mapping information from &lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;&quot;&lt;/span&gt; entity manager
      &amp;gt; writing /Applications/MAMP/htdocs/Acme/src/Acme/TaskBundle/Resources/config/doctrine/Tag.orm.yml
      &amp;gt; writing /Applications/MAMP/htdocs/Acme/src/Acme/TaskBundle/Resources/config/doctrine/Task.orm.yml
    
    $ ./../../bin/php/php5.3.6/bin/php app/console doctrine:generate:entities Acme\TaskBundle
    Generating entities &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; bundle &lt;span class=&quot;code-quote&quot;&gt;&quot;AcmeTaskBundle&quot;&lt;/span&gt;
      &amp;gt; backing up Tag.php to Tag.php~
      &amp;gt; generating Acme\TaskBundle\Entity\Tag
      &amp;gt; backing up Task.php to Task.php~
      &amp;gt; generating Acme\TaskBundle\Entity\Task
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The fact is that it only seems ok, because if you take a look at &quot;Tag.orm.yml&quot;: &lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;Tag.orm.yml&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;    Acme\TaskBundle\Entity\Tag:
      type: entity
      table: tag
      fields:
        idTag:
          id: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
          type: integer
          unsigned: &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
          nullable: &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
          column: id_tag
          generator:
            strategy: IDENTITY
        name:
          type: string
          length: 50
          fixed: &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
          nullable: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      oneToOne:
        task:
          targetEntity: Task
          cascade: {  }
          mappedBy: &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;
          inversedBy: &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;
          joinColumns:
            task_id:
              referencedColumnName: id_task
          orphanRemoval: &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
      lifecycleCallbacks: {  }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It created a *&lt;b&gt;oneToOne&lt;/b&gt;* relationship and not a *&lt;b&gt;oneToMany&lt;/b&gt;* !&lt;/p&gt;

&lt;p&gt;If you need any more confirmation, here are **&lt;b&gt;Task.php&lt;/b&gt;** and **&lt;b&gt;Tag.php&lt;/b&gt;**:&lt;/p&gt;

&lt;p&gt;**&lt;b&gt;Task.php&lt;/b&gt;**&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;Task.php&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;    &amp;lt;?php
    
    namespace Acme\TaskBundle\Entity;
    
    use Doctrine\ORM\Mapping as ORM;
    
    /**
     * Acme\TaskBundle\Entity\Task
     */
    class Task
    {
        /**
         * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; integer $idTask
         */
        &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $idTask;
    
        /**
         * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string $description
         */
        &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $description;
    
    
        /**
         * Get idTask
         *
         * @&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; integer 
         */
        &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getIdTask()
        {
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;idTask;
        }
    
        /**
         * Set description
         *
         * @param string $description
         */
        &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setDescription($description)
        {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;description = $description;
        }
    
        /**
         * Get description
         *
         * @&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; string 
         */
        &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getDescription()
        {
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;description;
        }
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;Tag.php&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;***Tag.php***

    &amp;lt;?php
    
    namespace Acme\TaskBundle\Entity;
    
    use Doctrine\ORM\Mapping as ORM;
    
    /**
     * Acme\TaskBundle\Entity\Tag
     */
    class Tag
    {
        /**
         * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; integer $idTag
         */
        &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $idTag;
    
        /**
         * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string $name
         */
        &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $name;
    
        /**
         * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Acme\TaskBundle\Entity\Task
         */
        &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $task;
    
    
        /**
         * Get idTag
         *
         * @&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; integer 
         */
        &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getIdTag()
        {
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;idTag;
        }
    
        /**
         * Set name
         *
         * @param string $name
         */
        &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setName($name)
        {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;name = $name;
        }
    
        /**
         * Get name
         *
         * @&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; string 
         */
        &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getName()
        {
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;name;
        }
    
        /**
         * Set task
         *
         * @param Acme\TaskBundle\Entity\Task $task
         */
        &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setTask(\Acme\TaskBundle\Entity\Task $task)
        {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;task = $task;
        }
    
        /**
         * Get task
         *
         * @&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; Acme\TaskBundle\Entity\Task 
         */
        &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getTask()
        {
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;task;
        }
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;linuxatico&lt;/p&gt;</description>
                <environment>MAC OS X 10.6.8, Symfony 2.0.12, PHP 5.3.6, mysql server 5.5.9</environment>
            <key id="13663">DDC-1799</key>
            <summary>Doctrine&apos;s Reverse Engineering 1-n (one to many) association misunderstood as 1-1 (one to one)</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="linuxatico">simone adami</reporter>
                        <labels>
                    </labels>
                <created>Fri, 27 Apr 2012 10:46:30 +0000</created>
                <updated>Sun, 27 May 2012 08:02:46 +0000</updated>
                    <resolved>Sun, 27 May 2012 08:02:46 +0000</resolved>
                            <version>2.1.6</version>
                                <fixVersion>2.1.7</fixVersion>
                <fixVersion>2.2.3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17897" author="linuxatico" created="Mon, 30 Apr 2012 07:55:50 +0000"  >&lt;p&gt;This problem is encountered only in this case, 1-1 and n-m relationship are handled in the right way, has anyone else faced this problem too?&lt;/p&gt;

&lt;p&gt;linuxatico&lt;/p&gt;</comment>
                    <comment id="17931" author="linuxatico" created="Mon, 7 May 2012 12:41:27 +0000"  >&lt;p&gt;Hi all,&lt;br/&gt;
I wanna give the Doctrine community my full support to help fixing this bug, but I need someone who can give me an answer.....&lt;br/&gt;
I couldn&apos;t figure out in the source code which is the method executed when given the command &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-java&quot;&gt;$ ./../../bin/php/php5.3.6/bin/php app/console doctrine:mapping:convert yml ./src/Acme/TaskBundle/Resources/config/doctrine/ --from-database --force&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I will keep on looking for it, but some help will be appreciated,&lt;/p&gt;

&lt;p&gt;linuxatico&lt;/p&gt;</comment>
                    <comment id="17932" author="linuxatico" created="Mon, 7 May 2012 12:52:21 +0000"  >&lt;p&gt;Found in vendor/doctrine/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php&lt;br/&gt;
I&apos;ll see what I can do.&lt;/p&gt;

&lt;p&gt;linuxatico&lt;/p&gt;</comment>
                    <comment id="17936" author="linuxatico" created="Wed, 9 May 2012 10:43:38 +0000"  >&lt;p&gt;Even if I keep being ignored, I want to report a very useful discovery about this annoying bug: it&apos;s 100% related to the YAML conversion, because if you execute the first command &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-java&quot;&gt; $ ./../../bin/php/php5.3.6/bin/php app/console doctrine:mapping:convert xml ./src/Acme/TaskBundle/Resources/config/doctrine/ --from-database --force&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Using XML instead of YML it works in the expected way. I wonder if the author of this code have written a unit test before integrating this function in the official release of Doctrine.... (ironic question)&lt;/p&gt;

&lt;p&gt;linuxatico&lt;/p&gt;</comment>
                    <comment id="17984" author="beberlei" created="Sun, 27 May 2012 08:02:46 +0000"  >&lt;p&gt;This case was indeed not unit-tested, many-to-one and one-to-one were handled the same in YAML Exporter. No need to get picky about it though, we are investing our free time here.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1798] [GH-342] Fix identifier generator strategy for composite identifier</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1798</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of jeanmonod:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/342&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/342&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

&lt;p&gt;When using the ConvertMappingCommand on a schema that contain a table with a composite key, we got the exception:&lt;/p&gt;

&lt;p&gt;    Single id is not allowed on composite primary key in entity CollectionFields&lt;/p&gt;

&lt;p&gt;This can be fix by setting the identifier strategy to NONE for composite identifier fields&lt;/p&gt;</description>
                <environment></environment>
            <key id="13661">DDC-1798</key>
            <summary>[GH-342] Fix identifier generator strategy for composite identifier</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 26 Apr 2012 19:11:21 +0000</created>
                <updated>Sun, 27 May 2012 16:47:15 +0000</updated>
                    <resolved>Sun, 27 May 2012 16:47:15 +0000</resolved>
                                            <fixVersion>2.2.3</fixVersion>
                <fixVersion>2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="18010" author="beberlei" created="Sun, 27 May 2012 16:47:15 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1784] Error on generate entities: &apos;Attribute &quot;allocationSize&quot; of @ORM\SequenceGenerator&apos;</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1784</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When I generated my entities on version 2.2.2 through &quot;orm:convert-mapping&quot;, the sequence has a value &apos; allocationSize=&quot;1&quot;, initialValue=&quot;1&quot; &apos; with quotes. &lt;/p&gt;

&lt;p&gt;So I received an error: &lt;/p&gt;

&lt;p&gt;Attribute &quot;allocationSize&quot; of @ORM\SequenceGenerator declared on property entities\Test::$id expects a&lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/thumbs_down.gif&quot; height=&quot;19&quot; width=&quot;19&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; integer, but got string. &lt;/p&gt;

&lt;p&gt;To fix, I removed the quotes. is It a bug?&lt;/p&gt;

&lt;p&gt;Part of entity generated:&lt;/p&gt;

&lt;p&gt;    /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@var integer $id&lt;br/&gt;
     *&lt;/li&gt;
	&lt;li&gt;@ORM\Column(name=&quot;id&quot;, type=&quot;integer&quot;, precision=0, scale=0, nullable=false, unique=false)&lt;/li&gt;
	&lt;li&gt;@ORM\Id&lt;/li&gt;
	&lt;li&gt;@ORM\GeneratedValue(strategy=&quot;SEQUENCE&quot;)&lt;/li&gt;
	&lt;li&gt;@ORM\SequenceGenerator(sequenceName=&quot;test_id_seq&quot;, allocationSize=&quot;1&quot;, initialValue=&quot;1&quot;) /* SEE QUOTES ON allocationSize=&quot;1&quot;, initialValue=&quot;1&quot; */&lt;br/&gt;
     */&lt;br/&gt;
    private $id;&lt;/li&gt;
&lt;/ul&gt;

</description>
                <environment></environment>
            <key id="13641">DDC-1784</key>
            <summary>Error on generate entities: &apos;Attribute &quot;allocationSize&quot; of @ORM\SequenceGenerator&apos;</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/blocker.png">Blocker</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="augustoximenes">Augusto Ximenes de Souza</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 Apr 2012 02:45:43 +0000</created>
                <updated>Sun, 27 May 2012 17:14:22 +0000</updated>
                    <resolved>Fri, 20 Apr 2012 01:40:47 +0000</resolved>
                            <version>2.2.2</version>
                                <fixVersion>2.2.3</fixVersion>
                <fixVersion>2.3</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17862" author="augustoximenes" created="Wed, 18 Apr 2012 02:55:18 +0000"  >&lt;p&gt;I think the problem is on the line 1037 to 1042 of Class Doctrine \ ORM \ Tools \ EntityGenerator:&lt;/p&gt;

&lt;p&gt;                    if (isset($metadata-&amp;gt;sequenceGeneratorDefinition&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;allocationSize&amp;#39;&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
                        $sequenceGenerator[] = &apos;allocationSize=&quot;&apos; . $metadata-&amp;gt;sequenceGeneratorDefinition[&apos;allocationSize&apos;] . &apos;&quot;&apos;;
                    }

&lt;p&gt;                    if (isset($metadata-&amp;gt;sequenceGeneratorDefinition&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;initialValue&amp;#39;&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
                        $sequenceGenerator[] = &apos;initialValue=&quot;&apos; . $metadata-&amp;gt;sequenceGeneratorDefinition[&apos;initialValue&apos;] . &apos;&quot;&apos;;
                    }

&lt;p&gt;Replace to:&lt;/p&gt;

&lt;p&gt;                    if (isset($metadata-&amp;gt;sequenceGeneratorDefinition&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;allocationSize&amp;#39;&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
                        $sequenceGenerator[] = &apos;allocationSize=&apos; . $metadata-&amp;gt;sequenceGeneratorDefinition[&apos;allocationSize&apos;];
                    }

&lt;p&gt;                    if (isset($metadata-&amp;gt;sequenceGeneratorDefinition&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;initialValue&amp;#39;&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
                        $sequenceGenerator[] = &apos;initialValue=&apos; . $metadata-&amp;gt;sequenceGeneratorDefinition[&apos;initialValue&apos;];
                    }</comment>
                    <comment id="17873" author="fabio.bat.silva" created="Fri, 20 Apr 2012 01:40:46 +0000"  >&lt;p&gt;Fixed by : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/d5d47222c1dc5ea97ebd8f4c68834fbe4abeb238&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/d5d47222c1dc5ea97ebd8f4c68834fbe4abeb238&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18016" author="beberlei" created="Sun, 27 May 2012 17:14:22 +0000"  >&lt;p&gt;Merged into 2.2&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1783] Combination of Query::iterate() and ObjectHydrator results in continued memory growth after clearing the entity manager</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1783</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;To reproduce:&lt;/p&gt;

&lt;p&gt;Start with the doctrine sandbox.  Remove address relation from user.  append the following to index.php&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;code&amp;#93;&lt;/span&gt;&lt;br/&gt;
for($i=0;$i&amp;lt;100000;++$i) {&lt;br/&gt;
    $user = new User;&lt;br/&gt;
    $user-&amp;gt;setName(&apos;foo&apos; . $i);&lt;br/&gt;
    $em-&amp;gt;persist($user);&lt;br/&gt;
}&lt;br/&gt;
$em-&amp;gt;flush();&lt;br/&gt;
$em-&amp;gt;clear();&lt;/p&gt;

&lt;p&gt;$query = $em-&amp;gt;getRepository(&apos;Entities\User&apos;)&lt;del&gt;&amp;gt;createQueryBuilder(&apos;u&apos;)&lt;/del&gt;&amp;gt;getQuery();&lt;br/&gt;
$i = 0;&lt;br/&gt;
echo &quot;Running test:&quot; . PHP_EOL . &quot;start: &quot; . memory_get_usage() . PHP_EOL;&lt;br/&gt;
foreach($query-&amp;gt;iterate() as $row) {&lt;br/&gt;
    $em-&amp;gt;detach($row&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;);&lt;br/&gt;
    if (++$i === 100000) &lt;/p&gt;
{
        echo &quot;end: &quot; . memory_get_usage() . PHP_EOL;
    }
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;echo PHP_EOL . &quot;done&quot; . PHP_EOL;&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;/code&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;The result i get is&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;code&amp;#93;&lt;/span&gt;&lt;br/&gt;
Running test:&lt;br/&gt;
start: 7658928&lt;br/&gt;
end: 32601776&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;/code&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Adding my own custom hydrator which simply extends and resets the ObjectHydrator::_identifierMap (may cause bugs, i dont know) i get&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;code&amp;#93;&lt;/span&gt;&lt;br/&gt;
Running test:&lt;br/&gt;
start: 7658768&lt;br/&gt;
end: 10724984&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;/code&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;This originally came up while working with an process to import an existing doctrine table of ~10M rows into elastic search.  I realize going through the ORM will never be the most efficient, but there is room for more efficiency.  With larger objects and larger result sets the memory growth is much more pronounced.&lt;/p&gt;

</description>
                <environment>ubuntu 11.04, php 5.3.6-13ubuntu3.6</environment>
            <key id="13640">DDC-1783</key>
            <summary>Combination of Query::iterate() and ObjectHydrator results in continued memory growth after clearing the entity manager</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ebernhardson">Erik Bernhardson</reporter>
                        <labels>
                    </labels>
                <created>Tue, 17 Apr 2012 18:34:18 +0000</created>
                <updated>Sun, 27 May 2012 10:03:07 +0000</updated>
                    <resolved>Sun, 27 May 2012 10:03:07 +0000</resolved>
                            <version>2.2.2</version>
                                <fixVersion>2.2.3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17861" author="ebernhardson" created="Tue, 17 Apr 2012 18:37:14 +0000"  >&lt;p&gt;code paste above didn&apos;t work out so well.  Attached is a .tgz of the sandbox used above.&lt;/p&gt;</comment>
                    <comment id="17995" author="beberlei" created="Sun, 27 May 2012 10:03:07 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11184" name="sandbox.tgz" size="392811" author="ebernhardson" created="Tue, 17 Apr 2012 18:37:13 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1779] [GH-336] Fixed DDC1778</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1779</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of merk:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/336&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/336&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

</description>
                <environment></environment>
            <key id="13633">DDC-1779</key>
            <summary>[GH-336] Fixed DDC1778</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 Apr 2012 03:06:11 +0000</created>
                <updated>Mon, 16 Apr 2012 17:01:05 +0000</updated>
                    <resolved>Mon, 16 Apr 2012 17:01:05 +0000</resolved>
                                            <fixVersion>2.2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17854" author="beberlei" created="Mon, 16 Apr 2012 17:01:05 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1778] Cloned PersistentCollection with orphanRemoval</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1778</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When using a cloned PersistentCollection (with the Symfony2 Form component, for example) when orphanRemoval is enabled, the cloned PersistentCollection will tell the UOW to schedule orphan removal.&lt;/p&gt;

&lt;p&gt;I am working on a test and a fix, posting so i get an issue number to use.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13632">DDC-1778</key>
            <summary>Cloned PersistentCollection with orphanRemoval</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="merk">Tim Nagel</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 Apr 2012 02:32:36 +0000</created>
                <updated>Sun, 29 Apr 2012 10:30:38 +0000</updated>
                    <resolved>Mon, 16 Apr 2012 17:01:11 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.2.3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17851" author="merk" created="Mon, 16 Apr 2012 03:06:30 +0000"  >&lt;p&gt;Pull request with 3 failing tests (That are fixed by modifications to PersistentCollection in the same commit)&lt;/p&gt;</comment>
                    <comment id="17852" author="merk" created="Mon, 16 Apr 2012 03:06:43 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/336&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/336&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17855" author="beberlei" created="Mon, 16 Apr 2012 17:01:11 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                    <comment id="17895" author="bschussek" created="Sun, 29 Apr 2012 10:30:38 +0000"  >&lt;p&gt;Is this backported to 2.1 as well?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1775] Notify strategy listener is not attached for new entities</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1775</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;New entities with Notify strategy for changes and with GeneratedValue(strategy=&quot;AUTO&quot;) never get the onPropertyChanged listener attached to them. That happens because of the logic in the UOW::scheduleForInsert($entity) method. The last condition  in it &quot;isset($this-&amp;gt;entityIdentifiers&lt;span class=&quot;error&quot;&gt;&amp;#91;$oid&amp;#93;&lt;/span&gt;)&quot; is never true because the identifier is not set and therefore the code that attaches the PropertyChangedListener in addToIdentityMap is never run.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13626">DDC-1775</key>
            <summary>Notify strategy listener is not attached for new entities</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="deatheriam">Oleg Namaka</reporter>
                        <labels>
                    </labels>
                <created>Wed, 11 Apr 2012 16:45:47 +0000</created>
                <updated>Sat, 7 Jul 2012 15:50:04 +0000</updated>
                    <resolved>Sat, 7 Jul 2012 15:50:04 +0000</resolved>
                            <version>2.2.1</version>
                                <fixVersion>2.2.3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17966" author="guilhermeblanco" created="Wed, 23 May 2012 03:54:14 +0000"  >&lt;p&gt;This is intentional to me. &lt;br/&gt;
According to code and documentation, PropertyChanged is supposed to operate over updates, never over inserts.&lt;/p&gt;

&lt;p&gt;I experimented changing the code to also notify about changed during new and the consequences were very drastic. Internally, propertyChanged creates entityChangesets that implies an UPDATE.&lt;/p&gt;

&lt;p&gt;Marking ticket as won&apos;t fix.&lt;/p&gt;</comment>
                    <comment id="17979" author="deatheriam" created="Thu, 24 May 2012 04:05:37 +0000"  >&lt;p&gt;In that case the Notify strategy is partially broken:&lt;br/&gt;
Category entity:&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-java&quot;&gt;..............

  *\Entity\Category
 *
 * @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;category&quot;&lt;/span&gt;)
 * @ORM\Entity
 */
class Category &lt;span class=&quot;code-keyword&quot;&gt;implements&lt;/span&gt; TimestampableInterface
 
    /**
     * Caption
     *
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string $caption
     * @ORM\Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;caption&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;text&quot;&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $caption;
	
    /**
     * Added At
     *
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; \DateTime $addedAt
     *
     * @ORM\Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;added_at&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;datetime&quot;&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $addedAt;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setCaption($caption)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;caption != $caption)  {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_onPropertyChanged(&apos;caption&apos;, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;caption, $caption);
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;caption = $caption;
        }
    }
	
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setAddedAt($addedAt)
    {
        $oldValue = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;addedAt;
		$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;addedAt = $addedAt;
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ((is_null($oldValue) || ($oldValue-&amp;gt;getTimestamp() != $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;addedAt-&amp;gt;getTimestamp()))) {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_onPropertyChanged(&apos;addedAt&apos;, $oldValue, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;addedAt);
        }
    }

    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; function _onPropertyChanged($propName, $oldValue, $newValue)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_listeners) {
            /** @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; $listener \Doctrine\Common\PropertyChangedListener */
            foreach ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_listeners as $listener) {
                $listener-&amp;gt;propertyChanged($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;, $propName, $oldValue, $newValue);
            }
        }
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addPropertyChangedListener(PropertyChangedListener $listener)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_listeners[] = $listener;
    }
	
..............	

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;OnFlush event handler:&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-java&quot;&gt;..............

        foreach ($uow-&amp;gt;getScheduledEntityInsertions() as $entity) {
            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($entity &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; TimestampableInterface) {
                $entity-&amp;gt;setUpdatedAt(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \DateTime(&apos;now&apos;));
                $entity-&amp;gt;setAddedAt(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \DateTime(&apos;now&apos;));
                $uow-&amp;gt;recomputeSingleEntityChangeSet($em-&amp;gt;getClassMetadata(get_class($entity)), $entity);
            }
        }
		
...............		
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;		
&lt;p&gt;Code that uses the entity:&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-java&quot;&gt;        $cat = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Entity\Category();
        &lt;span class=&quot;code-comment&quot;&gt;// @todo &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; is a workaround until the http://www.doctrine-project.org/jira/browse/DDC-1775 is resolved
&lt;/span&gt;        $cat-&amp;gt;addPropertyChangedListener($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getUnitOfWork());
        $cat-&amp;gt;setCaption(&apos;Please explain&apos;);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;persist($cat);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If there is no explicit call to the addPropertyChangedListener method, the caption field gets saved but the $addedAt remains null after flush. The entity does not have the attached listener so UnitOfWork does not know anything about the update that happened in the OnFlush event, and the recomputeSingleEntityChangeSet method skips entities with Notify strategy.&lt;/p&gt;</comment>
                    <comment id="18000" author="beberlei" created="Sun, 27 May 2012 11:42:45 +0000"  >&lt;p&gt;Changing computeScheduleInsertsChangeSets() would solve this, but it would also mean that the notifier gets injected more than once. &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-java&quot;&gt;    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; function computeScheduleInsertsChangeSets()
    {
        foreach ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;entityInsertions as $entity) {
            $class = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;getClassMetadata(get_class($entity));

            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;computeChangeSet($class, $entity);

            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($entity &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; NotifyPropertyChanged) {
                $entity-&amp;gt;addPropertyChangedListener($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;);
            }
        }
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I think injecting in scheduleForInsert() is ok, but we have to look at potential problems also&lt;/p&gt;</comment>
                    <comment id="18227" author="beberlei" created="Sat, 7 Jul 2012 15:50:04 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1753] [GH-322] In some weird situation the SimpleXmlIterator used to iterate on the ``$...</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1753</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of rande:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/322&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/322&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

&lt;p&gt;...xmlRoot-&amp;gt;field`` property just get resetted. This solution avoid this situation. This problem occurs when Symfony2 warms up cache with autogenerate proxy to ``true``&lt;/p&gt;</description>
                <environment></environment>
            <key id="13591">DDC-1753</key>
            <summary>[GH-322] In some weird situation the SimpleXmlIterator used to iterate on the ``$...</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 2 Apr 2012 11:55:50 +0000</created>
                <updated>Mon, 16 Apr 2012 17:37:37 +0000</updated>
                    <resolved>Mon, 16 Apr 2012 17:37:37 +0000</resolved>
                                            <fixVersion>2.2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17748" author="beberlei" created="Wed, 4 Apr 2012 19:59:02 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-322&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/322&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/322&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17791" author="beberlei" created="Fri, 6 Apr 2012 13:50:37 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-322&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/322&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/322&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17818" author="beberlei" created="Sat, 7 Apr 2012 07:21:04 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-322&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/322&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/322&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1745] [GH-316] Fixes autoloading of generated Annotations </title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1745</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of fixe:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/316&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/316&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

&lt;p&gt;This PR fixes an &lt;span class=&quot;error&quot;&gt;&amp;#91;issue&amp;#93;&lt;/span&gt;(&lt;a href=&quot;https://github.com/symfony/symfony/issues/3752&quot; class=&quot;external-link&quot;&gt;https://github.com/symfony/symfony/issues/3752&lt;/a&gt;) submited by @Venzon.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13583">DDC-1745</key>
            <summary>[GH-316] Fixes autoloading of generated Annotations </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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 1 Apr 2012 01:01:46 +0000</created>
                <updated>Mon, 16 Apr 2012 16:52:20 +0000</updated>
                    <resolved>Mon, 16 Apr 2012 16:52:20 +0000</resolved>
                                            <fixVersion>2.1.7</fixVersion>
                <fixVersion>2.2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17707" author="beberlei" created="Sun, 1 Apr 2012 09:02:14 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-316&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/316&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/316&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17745" author="beberlei" created="Wed, 4 Apr 2012 19:59:01 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-316&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/316&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/316&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17789" author="beberlei" created="Fri, 6 Apr 2012 13:50:37 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-316&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/316&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/316&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17811" author="beberlei" created="Sat, 7 Apr 2012 07:21:03 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-316&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/316&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/316&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17853" author="beberlei" created="Mon, 16 Apr 2012 16:52:20 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1735] [GH-312] Removed LOCK_EX for writing Proxy class file</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1735</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of hason:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/312&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/312&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

&lt;p&gt;LOCK_EX will not work on NFS and many other networked file systems.&lt;/p&gt;

&lt;p&gt;Replaces #307&lt;/p&gt;</description>
                <environment></environment>
            <key id="13571">DDC-1735</key>
            <summary>[GH-312] Removed LOCK_EX for writing Proxy class file</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 29 Mar 2012 11:23:48 +0000</created>
                <updated>Thu, 5 Jul 2012 20:26:50 +0000</updated>
                    <resolved>Thu, 5 Jul 2012 20:26:50 +0000</resolved>
                                            <fixVersion>2.2.3</fixVersion>
                <fixVersion>2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17675" author="beberlei" created="Thu, 29 Mar 2012 11:41:34 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-312&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/312&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/312&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17683" author="beberlei" created="Fri, 30 Mar 2012 19:55:56 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-312&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/312&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/312&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17686" author="beberlei" created="Fri, 30 Mar 2012 20:01:01 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-312&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/312&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/312&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17709" author="beberlei" created="Sun, 1 Apr 2012 09:02:14 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-312&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/312&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/312&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17746" author="beberlei" created="Wed, 4 Apr 2012 19:59:02 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-312&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/312&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/312&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17786" author="beberlei" created="Fri, 6 Apr 2012 13:50:37 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-312&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/312&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/312&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17808" author="beberlei" created="Sat, 7 Apr 2012 07:21:02 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-312&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/312&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/312&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18203" author="beberlei" created="Thu, 5 Jul 2012 20:26:50 +0000"  >&lt;p&gt;Changed to using temporary filename + rename&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1504] Cascade remove in OneToMany relation doesn&apos;t work</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1504</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have two entities :&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-java&quot;&gt;class Structure
{
    &lt;span class=&quot;code-comment&quot;&gt;// Id and other variables
&lt;/span&gt;
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; ArrayCollection $employees liste des employ&#233;s d&apos;une structure
     *
     * @ORM\OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Uriae\EmployeeBundle\Entity\Employee&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;structure&quot;&lt;/span&gt;, cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;all&quot;&lt;/span&gt;})
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $employees;
}

class Employee
{
    &lt;span class=&quot;code-comment&quot;&gt;// Id and other variables
&lt;/span&gt;
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; integer $structure
     *
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Uriae\StructureBundle\Entity\Structure&quot;&lt;/span&gt;,inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;employees&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $structure;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The problem is when I used tests and I wan&apos;t remove a Structure the Employees aren&apos;t removed.&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-java&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;// Doesn&apos;t work
&lt;/span&gt;$em-&amp;gt;remove($structure);
$em-&amp;gt;flush();

&lt;span class=&quot;code-comment&quot;&gt;// Bad solution but it works
&lt;/span&gt;$em-&amp;gt;remove($structure);
$em-&amp;gt;flush();
foreach ($employee as $employees)
{
    $em-&amp;gt;remove($employee);
}
$e-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>Ubuntu 10.10, syfmony 2.0.4</environment>
            <key id="13209">DDC-1504</key>
            <summary>Cascade remove in OneToMany relation doesn&apos;t work</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="4">Incomplete</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="naelyth">Gaetan Rousseau</reporter>
                        <labels>
                    </labels>
                <created>Tue, 22 Nov 2011 09:36:38 +0000</created>
                <updated>Wed, 14 Mar 2012 21:52:46 +0000</updated>
                    <resolved>Wed, 14 Mar 2012 21:52:46 +0000</resolved>
                            <version>2.1.2</version>
                                <fixVersion>2.2.3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="16931" author="stefi023" created="Wed, 30 Nov 2011 15:06:26 +0000"  >&lt;p&gt;The same problem, described here&lt;br/&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/7766999/doctrine-2-0-vs-2-1-cascade-remove-onetomany&quot; class=&quot;external-link&quot;&gt;http://stackoverflow.com/questions/7766999/doctrine-2-0-vs-2-1-cascade-remove-onetomany&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="16932" author="naelyth" created="Wed, 30 Nov 2011 15:10:09 +0000"  >&lt;p&gt;I know, it&apos;s me who answered. But the solution i&apos;ve found is &quot;ugly&quot;.&lt;/p&gt;</comment>
                    <comment id="17008" author="beberlei" created="Thu, 15 Dec 2011 23:04:55 +0000"  >&lt;p&gt;Fixed formatting&lt;/p&gt;</comment>
                    <comment id="17109" author="entea" created="Tue, 27 Dec 2011 15:46:14 +0000"  >&lt;p&gt;If you add &lt;b&gt;orphanRemoval=&quot;true&quot;&lt;/b&gt; it works.&lt;br/&gt;
But I think doctrine should somehow let the user know about this problem (throw exception, etc.)&lt;br/&gt;
Maybe it worths making &lt;b&gt;orphanRemoval=true&lt;/b&gt; when cascading=remove? &lt;/p&gt;</comment>
                    <comment id="17121" author="beberlei" created="Wed, 28 Dec 2011 08:27:39 +0000"  >&lt;p&gt;1. orphanRemoval is not the right solution, it has different semantics. If you want this semantics the solution is ok.&lt;br/&gt;
2. Has anyone tried updating to anything above 2.1.2?&lt;br/&gt;
3. I cannot reproduce with a test-case against the current master or 2.1.5&lt;/p&gt;

&lt;p&gt;I need a better testcase. Attached is the one i am working with.&lt;/p&gt;</comment>
                    <comment id="17588" author="beberlei" created="Wed, 14 Mar 2012 21:52:46 +0000"  >&lt;p&gt;No feedback given.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11136" name="DDC1504GitlessTest.php" size="2024" author="beberlei" created="Wed, 28 Dec 2011 08:27:55 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>