<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Tue May 21 12:04:25 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/MODM-134/MODM-134.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>[MODM-134] Reference added twice</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-134</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;I have a listener who listens on onFlush event, &lt;br/&gt;
i have a document and change a property (integer) in it and call $uow-&amp;gt;recomputeSingleDocumentChangeSet().&lt;br/&gt;
The result is that all references are added twice.&lt;/p&gt;

&lt;p&gt;If i remove the call to  $uow-&amp;gt;recomputeSingleDocumentChangeSet() all is fine.&lt;/p&gt;


&lt;p&gt;Here&apos;s my document (notice references added twice on children property):&lt;/p&gt;


&lt;p&gt;array (&lt;br/&gt;
  &apos;children&apos; =&amp;gt; &lt;br/&gt;
  array (&lt;br/&gt;
    0 =&amp;gt; &lt;br/&gt;
    array (&lt;br/&gt;
      &apos;$ref&apos; =&amp;gt; &apos;block&apos;,&lt;br/&gt;
      &apos;$id&apos; =&amp;gt; new MongoId(&quot;4d8b663638b6180803000005&quot;),&lt;br/&gt;
      &apos;$db&apos; =&amp;gt; &apos;app_jules&apos;,&lt;br/&gt;
      &apos;_doctrine_class_name&apos; =&amp;gt; &apos;Design\\PageBundle\\Document&lt;br class=&quot;atl-forced-newline&quot; /&gt;StrategyBlock&apos;,&lt;br/&gt;
    ),&lt;br/&gt;
    1 =&amp;gt; &lt;br/&gt;
    array (&lt;br/&gt;
      &apos;$ref&apos; =&amp;gt; &apos;block&apos;,&lt;br/&gt;
      &apos;$id&apos; =&amp;gt; new MongoId(&quot;4d8b663638b6180803000005&quot;),&lt;br/&gt;
      &apos;$db&apos; =&amp;gt; &apos;app_jules&apos;,&lt;br/&gt;
      &apos;_doctrine_class_name&apos; =&amp;gt; &apos;Design\\PageBundle\\Document&lt;br class=&quot;atl-forced-newline&quot; /&gt;StrategyBlock&apos;,&lt;br/&gt;
    )&lt;br/&gt;
  ),&lt;br/&gt;
  &apos;order&apos; =&amp;gt; 0,&lt;br/&gt;
  &apos;parent&apos; =&amp;gt; &lt;br/&gt;
  array (&lt;br/&gt;
    &apos;$ref&apos; =&amp;gt; &apos;block&apos;,&lt;br/&gt;
    &apos;$id&apos; =&amp;gt; new MongoId(&quot;4d8b663638b6180803000003&quot;),&lt;br/&gt;
    &apos;$db&apos; =&amp;gt; &apos;app_jules&apos;,&lt;br/&gt;
    &apos;_doctrine_class_name&apos; =&amp;gt; &apos;Design\\PageBundle\\Document&lt;br class=&quot;atl-forced-newline&quot; /&gt;ContainerBlock&apos;,&lt;br/&gt;
  ),&lt;br/&gt;
  &apos;type&apos; =&amp;gt; &apos;container&apos;,&lt;br/&gt;
)&lt;/p&gt;


&lt;p&gt;EDIT: if i clear() the $children ArrayCollection before calling $uow-&amp;gt;recomputeSingleDocumentChangeSet() all is fine&lt;/p&gt;

&lt;p&gt;I tried to reproduce it in a test-case but the result wasn&apos;t successful&lt;/p&gt;</description>
                <environment></environment>
            <key id="12491">MODM-134</key>
            <summary>Reference added twice</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="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="gordonslondon">jules b</reporter>
                        <labels>
                    </labels>
                <created>Thu, 24 Mar 2011 11:47:07 +0000</created>
                <updated>Fri, 25 Mar 2011 12:55:17 +0000</updated>
                                    <version>1.0.0BETA3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>