<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sat May 18 13:01:28 UTC 2013

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

<item>
            <title>[DDC-2112] cascade remove revert order</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2112</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;cascadeRemove incorrect work&lt;/p&gt;

&lt;p&gt;UnitOfWork&lt;/p&gt;

&lt;p&gt;in commit() (336)&lt;/p&gt;

&lt;p&gt;            // Entity deletions come last and need to be in reverse commit order&lt;br/&gt;
            if ($this-&amp;gt;entityDeletions) {&lt;br/&gt;
                for ($count = count($commitOrder), $i = $count - 1; $i &amp;gt;= 0; --$i) &lt;/p&gt;
{
                    $this-&amp;gt;executeDeletions($commitOrder[$i]);
                }
&lt;p&gt;            }&lt;/p&gt;


&lt;p&gt;----------------------------------------------------------------&lt;br/&gt;
in doRemove (1630)&lt;/p&gt;

&lt;p&gt;        // Cascade first, because scheduleForDelete() removes the entity from the identity map, which&lt;br/&gt;
        // can cause problems when a lazy proxy has to be initialized for the cascade operation.&lt;br/&gt;
        $this-&amp;gt;cascadeRemove($entity, $visited);&lt;/p&gt;


&lt;p&gt;......&lt;/p&gt;


&lt;p&gt;                $this-&amp;gt;scheduleForDelete($entity);&lt;/p&gt;


&lt;p&gt;in array we get&lt;/p&gt;

&lt;p&gt;child&lt;br/&gt;
child&lt;br/&gt;
parent&lt;/p&gt;

&lt;p&gt;revert in commit - first remove parent and get foregein key error&lt;/p&gt;

&lt;p&gt;if move cascadeRemove after switch all woork correct&lt;/p&gt;</description>
                <environment></environment>
            <key id="14182">DDC-2112</key>
            <summary>cascade remove revert order</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ivan1986">Ivan Borzenkov</reporter>
                        <labels>
                    </labels>
                <created>Thu, 1 Nov 2012 14:12:46 +0000</created>
                <updated>Thu, 8 Nov 2012 07:12:04 +0000</updated>
                    <resolved>Thu, 8 Nov 2012 07:12:04 +0000</resolved>
                            <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18902" author="ivan1986" created="Thu, 1 Nov 2012 14:15:23 +0000"  >&lt;p&gt;patch&lt;/p&gt;</comment>
                    <comment id="18903" author="ivan1986" created="Thu, 1 Nov 2012 17:58:05 +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-java&quot;&gt;

class Domain
{
...
    /**
     * @ORM\OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Query&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&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;protected&lt;/span&gt; $q;
...
}

class Query
{
...
    /**
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Domain&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;q&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $domain;
...
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;if remove Domain - get mysql error foreign key&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11341" name="DDC2112.patch" size="1179" author="ivan1986" created="Thu, 1 Nov 2012 14:15:22 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>