<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Tue May 21 19:02:27 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+MODM+AND+resolution+%3D+Unresolved+AND+component+%3D+UnitOfWork+ORDER+BY+priority+DESC&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+MODM+AND+resolution+%3D+Unresolved+AND+component+%3D+UnitOfWork+ORDER+BY+priority+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="1" total="1"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[MODM-140] Issue with nested embdedded documents after adding an EmbeddedDocument to Document</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-140</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;I&apos;m using the latest version of Doctrine ODM (fresh from Git).&lt;/p&gt;

&lt;p&gt;I have three levels of Documents (Two embedded); Category -&amp;gt; EmbedsMany: Post -&amp;gt; EmbedsMany PostVersion. &lt;/p&gt;

&lt;p&gt;Step-by-step:&lt;/p&gt;

&lt;p&gt; 1. Make a new Post (Post1), 2 PostVersions (PostVersion1 and 2) and a Category&lt;br/&gt;
 2. Add Post1 to Category&lt;br/&gt;
 3. Persist Category, Flush, Clear&lt;br/&gt;
 4. Retrieve Category&lt;br/&gt;
 5. Make a new Post (Post2) and 2 PostVersions(PostVersion3 and 4)&lt;br/&gt;
 6. Add Post2 to Category&lt;br/&gt;
 7. Flush&lt;/p&gt;

&lt;p&gt;If you&apos;re following properly, at this stage in the database there should be:&lt;br/&gt;
1 Category, &lt;br/&gt;
2 Posts&lt;br/&gt;
4 PostVersions ... &lt;b&gt;2&lt;/b&gt; PostVersions in each Post&lt;/p&gt;

&lt;p&gt;However, what actually happens is:&lt;br/&gt;
1 Category, &lt;br/&gt;
2 Posts&lt;br/&gt;
4 PostVersions ... &lt;b&gt;4&lt;/b&gt; PostVersions in Post1, &lt;b&gt;0&lt;/b&gt; PostVersions in Post2&lt;/p&gt;

&lt;p&gt;On StackOverflow: &lt;a href=&quot;http://bit.ly/ekFbe2&quot; class=&quot;external-link&quot;&gt;http://bit.ly/ekFbe2&lt;/a&gt;&lt;br/&gt;
Testcase Gist: &lt;a href=&quot;https://gist.github.com/920914&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/920914&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A work around is to make Post2 and add it to Category, flush, then make new PostVersions and flush again.&lt;/p&gt;

&lt;p&gt;I did some debugging but I don&apos;t know enough about the internals to fix the issue.&lt;/p&gt;</description>
                <environment>PHP 5.3.3, Mac OS X 10.6.6, MongoDB 1.8.0</environment>
            <key id="12562">MODM-140</key>
            <summary>Issue with nested embdedded documents after adding an EmbeddedDocument to Document</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="cobby">Andrew Cobby</reporter>
                        <labels>
                    </labels>
                <created>Thu, 14 Apr 2011 01:38:01 +0000</created>
                <updated>Mon, 19 Dec 2011 02:05:44 +0000</updated>
                                    <version>1.0.0BETA3</version>
                                                <component>UnitOfWork</component>
                        <due></due>
                    <votes>5</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="15731" author="cobby" created="Thu, 14 Apr 2011 02:09:07 +0000"  >&lt;p&gt;Failing test&lt;/p&gt;</comment>
                    <comment id="15732" author="cobby" created="Thu, 14 Apr 2011 20:53:10 +0000"  >&lt;p&gt;Added a test using the EmbdeddedTestLevelX Documents, please refer to Gist: &lt;a href=&quot;https://gist.github.com/920914&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/920914&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For some reason, they work? I&apos;m thinking maybe this isn&apos;t a bug... very confused at the moment.&lt;/p&gt;</comment>
                    <comment id="16011" author="arevai" created="Sat, 18 Jun 2011 19:36:18 +0000"  >&lt;p&gt;I&apos;ve got the same problem.&lt;/p&gt;</comment>
                    <comment id="16301" author="kelvinw" created="Tue, 9 Aug 2011 03:50:04 +0000"  >&lt;p&gt;I had a similar problem, and resolved it with the attached patch (based on the 1.0.0beta3 release).&lt;/p&gt;

&lt;p&gt;This patch causes the ODM to stop scanning for changes further down the heirachy once it finds a new object, and then ensures that the Persistence Builder will include all contents of the new item.&lt;/p&gt;</comment>
                    <comment id="17033" author="iampersistent" created="Mon, 19 Dec 2011 02:05:44 +0000"  >&lt;p&gt;Kevin, do you want to put a PR in on github for this?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11044" name="doctrine-odm-patch-1.0.0beta3.diff" size="3780" author="kelvinw" created="Tue, 9 Aug 2011 03:50:04 +0000" />
                    <attachment id="10972" name="MODM140Test.php" size="1830" author="cobby" created="Thu, 14 Apr 2011 02:09:07 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>