<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sat May 25 22:57:32 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-138/MODM-138.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-138] Field&apos;s name attribute does not work for the update queries</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-138</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;Documents&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 Test 
{
.
.
.
/**
 * @EmbedOne(targetDocument=&lt;span class=&quot;code-quote&quot;&gt;&quot;Location&quot;&lt;/span&gt;, name=&lt;span class=&quot;code-quote&quot;&gt;&quot;l&quot;&lt;/span&gt;)
*/
&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $location;
.
.
.
}

/** @EmbeddedDocument */
class Location
{
    /**
	 * @Field(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-object&quot;&gt;float&lt;/span&gt;&quot;&lt;/span&gt;, name=&lt;span class=&quot;code-quote&quot;&gt;&quot;y&quot;&lt;/span&gt;)
	 */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $lat;

    /**
	 * @Field(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-object&quot;&gt;float&lt;/span&gt;&quot;&lt;/span&gt;, name=&lt;span class=&quot;code-quote&quot;&gt;&quot;x&quot;&lt;/span&gt;)
	 */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $lng;

	&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __construct($latitude,$longitude) {
		$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;lat = $latitude;
		$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;lng = $longitude;
	}
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Update query:&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;$dm-&amp;gt;createQueryBuilder(&apos;Test&apos;)
-&amp;gt;update()
-&amp;gt;field(&apos;id&apos;)-&amp;gt;equals(123)
-&amp;gt;field(&apos;l&apos;)-&amp;gt;set(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Location(39, 32);
-&amp;gt;getQuery(array(&apos;upsert&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;))
-&amp;gt;execute();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Result of this query is&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-quote&quot;&gt;&quot;l&quot;&lt;/span&gt;: {
    &lt;span class=&quot;code-quote&quot;&gt;&quot;lat&quot;&lt;/span&gt;: 39,
    &lt;span class=&quot;code-quote&quot;&gt;&quot;lng&quot;&lt;/span&gt;: 32
},

however, it should be

&lt;span class=&quot;code-quote&quot;&gt;&quot;l&quot;&lt;/span&gt;: {
    &lt;span class=&quot;code-quote&quot;&gt;&quot;y&quot;&lt;/span&gt;: 39,
    &lt;span class=&quot;code-quote&quot;&gt;&quot;x&quot;&lt;/span&gt;: 32
},

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

&lt;p&gt;also field function can support field name of the class on update queries, as follows&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;$dm-&amp;gt;createQueryBuilder(&apos;Test&apos;)
-&amp;gt;update()
-&amp;gt;field(&apos;id&apos;)-&amp;gt;equals(123)
-&amp;gt;field(&apos;location&apos;)-&amp;gt;set(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Location(39, 32);
-&amp;gt;getQuery(array(&apos;upsert&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;))
-&amp;gt;execute();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="12545">MODM-138</key>
            <summary>Field&apos;s name attribute does not work for the 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="bsrykt">Ba&#351;ar Aykut</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Apr 2011 12:38:04 +0000</created>
                <updated>Thu, 7 Apr 2011 12:38:04 +0000</updated>
                                    <version>1.0.0BETA3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>