<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Wed Jun 19 07:34:19 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-164/MODM-164.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-164] DocumentPersister&apos;s prepareQuery() method is not suitable for preparing newObj for update queries</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-164</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;Doctrine\ODM\MongoDB\Query\Expr::getNewObj() uses Doctrine\ODM\MongoDB\Persisters\DocumentPersister::prepareQuery() method for preparing newObj. However, prepareQuery is not suitable for that.&lt;/p&gt;

&lt;p&gt;The first lines in prepareQuery method should apply to find queries only:&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;if (is_scalar($query) || $query instanceof \MongoId) {&lt;br/&gt;
    $query = array(&apos;_id&apos; =&amp;gt; $query);&lt;br/&gt;
}&lt;br/&gt;
if ($this-&amp;gt;class-&amp;gt;hasDiscriminator() &amp;amp;&amp;amp; ! isset($query[$this-&amp;gt;class-&amp;gt;discriminatorField&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;name&amp;#39;&amp;#93;&lt;/span&gt;])) {&lt;br/&gt;
    $discriminatorValues = $this-&amp;gt;getClassDiscriminatorValues($this-&amp;gt;class);&lt;br/&gt;
    $query[$this-&amp;gt;class-&amp;gt;discriminatorField&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;name&amp;#39;&amp;#93;&lt;/span&gt;] = array(&apos;$in&apos; =&amp;gt; $discriminatorValues);&lt;br/&gt;
}&lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;Recommendation: DocumentPersister should introduce a new method, such as prepareNewObj($newObj) for preparing the newObj array.  Expr::getNewObj() should be change to invoke the new method.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13611">MODM-164</key>
            <summary>DocumentPersister&apos;s prepareQuery() method is not suitable for preparing newObj for update queries</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="juhasuni">Juha Suni</reporter>
                        <labels>
                    </labels>
                <created>Thu, 5 Apr 2012 06:47:40 +0000</created>
                <updated>Thu, 5 Apr 2012 06:47:40 +0000</updated>
                                                                    <component>Persister</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>