<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu May 23 11:48:39 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-110/MODM-110.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-110] QueryBuilder missing values and values with wrong data types being inserted</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-110</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I&apos;m using annotation mapping for my documents and found something strange when i insert a document (having an embed document) using the query builder...&lt;/p&gt;

&lt;p&gt;When i use the document class and persist it, things are fine:&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;$testCase = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Documents\Test();
$testCase-&amp;gt;testInt = &apos;0&apos;;
$testCase-&amp;gt;intfields = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Documents\Embed\Intfields();
$testCase-&amp;gt;intfields-&amp;gt;intone = &apos;1&apos;;
$testCase-&amp;gt;intfields-&amp;gt;inttwo = &apos;2&apos;;
$dm-&amp;gt;persist($testCase);
$dm-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Result:&lt;br/&gt;
{&lt;br/&gt;
   &quot;_id&quot;: ObjectId(&quot;4d417fb1723014d009000008&quot;),&lt;br/&gt;
   &quot;testInt&quot;: 0,&lt;br/&gt;
   &quot;intfields&quot;: &lt;/p&gt;
{
     &quot;intone&quot;: 1,
     &quot;inttwo&quot;: 2
  }
&lt;p&gt;} &lt;/p&gt;

&lt;p&gt;But when i use the query builder:&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()
-&amp;gt;insert(&apos;Documents\Test&apos;)
-&amp;gt;field(&apos;testInt&apos;)-&amp;gt;set(&apos;0&apos;)
-&amp;gt;field(&apos;intfields.intone&apos;)-&amp;gt;set(&apos;1&apos;)
-&amp;gt;field(&apos;intfields.inttwo&apos;)-&amp;gt;set(&apos;2&apos;)
-&amp;gt;getQuery()-&amp;gt;execute();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Result:&lt;br/&gt;
{&lt;br/&gt;
   &quot;_id&quot;: ObjectId(&quot;4d417fb1723014d009000009&quot;),&lt;br/&gt;
   &quot;testInt&quot;: &quot;0&quot;,&lt;br/&gt;
   &quot;intfields&quot;: &lt;/p&gt;
{
     &quot;inttwo&quot;: &quot;2&quot;
  }
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;Intone is missing and the values are all string values.&lt;/p&gt;

&lt;p&gt;It seems to be a bug, but as i&apos;m new to the doctrine and mongo world, it&apos;s more than possible to be a user error. :}&lt;/p&gt;

&lt;p&gt;I was using the clone version of the master git hub.. is that beta2?&lt;/p&gt;

&lt;p&gt;Regards&lt;br/&gt;
S.&lt;/p&gt;

&lt;p&gt;PS.: Php files are attached&lt;/p&gt;</description>
                <environment></environment>
            <key id="12331">MODM-110</key>
            <summary>QueryBuilder missing values and values with wrong data types being inserted</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="1">Fixed</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="shards">Shards</reporter>
                        <labels>
                    </labels>
                <created>Thu, 27 Jan 2011 10:11:13 +0000</created>
                <updated>Sat, 19 Feb 2011 18:28:25 +0000</updated>
                    <resolved>Sat, 12 Feb 2011 23:54:43 +0000</resolved>
                                            <fixVersion>1.0.0BETA2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15266" author="jwage" created="Fri, 11 Feb 2011 14:58:48 +0000"  >&lt;p&gt;Hi, phpunit test case?&lt;/p&gt;</comment>
                    <comment id="15290" author="jwage" created="Sat, 12 Feb 2011 23:54:43 +0000"  >&lt;p&gt;This is fixed now.&lt;/p&gt;</comment>
                    <comment id="15302" author="shards" created="Mon, 14 Feb 2011 03:28:13 +0000"  >&lt;p&gt;thank you =}&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10921" name="Documents.zip" size="1079" author="shards" created="Thu, 27 Jan 2011 10:11:13 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>