<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Fri May 24 05:35:40 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+ORDER+BY+due+ASC%2C+priority+DESC%2C+created+ASC&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+ORDER+BY+due+ASC%2C+priority+DESC%2C+created+ASC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="40" total="40"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[MODM-116] Collection Per Class Inheritance : Documents of a child class referenced in a parent class may be saved to the parent collection</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-116</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;Here is my class hierarchy (classes &amp;amp; attributes renamed for a better understanding) :&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; 
/** @Document @InheritanceType(&quot;COLLECTION_PER_CLASS&quot;) **/
class Parent {
    /** @ReferenceOne(targetDocument=&quot;Child&quot;) **/
    protected $child;
}

/** @Document **/
class Child extends Parent {
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;When doing :&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;$parent-&amp;gt;setXXX($value);
$parent-&amp;gt;getChild()-&amp;gt;setXXX($value2)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;the $parent-&amp;gt;getChild() document is saved to the Parent collection.&lt;/p&gt;

&lt;p&gt;It looks like the problems lies in UnitOfWork::executeUpdates :&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; 
if (get_class($document) == $className || $document instanceof Proxy &amp;amp;&amp;amp; $document instanceof $className) {
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;$child_document is an instance of Proxy (ChildProxy) and also an instance of Parent =&amp;gt; saved using the Parent persister.&lt;/p&gt;

&lt;p&gt;Shouldn&apos;t the test be : get_class($document) == $className || get_class($document) == $className_of_Proxy ?&lt;/p&gt;

&lt;p&gt;As a side note : why &quot;if ($class-&amp;gt;isEmbeddedDocument) &lt;/p&gt;
{ continue; }
&lt;p&gt;&quot; is within the foreach and not a &quot;if ($class-&amp;gt;isEmbeddedDocument) &lt;/p&gt;
{ return; }
&lt;p&gt;&quot; at the beginning of the method ?&lt;/p&gt;</description>
                <environment></environment>
            <key id="12360">MODM-116</key>
            <summary>Collection Per Class Inheritance : Documents of a child class referenced in a parent class may be saved to the parent collection</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="jfbus">JF Bustarret</reporter>
                        <labels>
                    </labels>
                <created>Mon, 7 Feb 2011 04:45:43 +0000</created>
                <updated>Thu, 21 Apr 2011 17:13:51 +0000</updated>
                                    <version>1.0.0BETA3</version>
                                                <component>Document Manager</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15260" author="jwage" created="Fri, 11 Feb 2011 14:24:04 +0000"  >&lt;p&gt;I added a test for this here and it appears to be passing: &lt;a href=&quot;https://github.com/doctrine/mongodb-odm/commit/3f24d77cc04adc0bb5532333e33826100457c666&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/mongodb-odm/commit/3f24d77cc04adc0bb5532333e33826100457c666&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="15272" author="jfbus" created="Fri, 11 Feb 2011 16:34:02 +0000"  >&lt;p&gt;I&apos;ll try to get more info on the problem and provide a test for it.&lt;/p&gt;</comment>
                    <comment id="15602" author="jfbus" created="Mon, 28 Mar 2011 06:08:02 +0000"  >&lt;p&gt;Here is a new test case :&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; 
/** @Document
 *  @InheritanceType(&quot;COLLECTION_PER_CLASS&quot;)
 **/
class MODM116Parent
{
    /** @Id */
    private $id;

    /** @String */
    private $name;

    /** @ReferenceOne **/
    private $child;

    public function getId()
    {
        return $this-&amp;gt;id;
    }

    public function getName()
    {
        return $this-&amp;gt;name;
    }

    public function setName($name)
    {
        $this-&amp;gt;name = $name;
    }

    public function getChild()
    {
        return $this-&amp;gt;child;
    }

    public function setChild(MODM116Child $child)
    {
        $this-&amp;gt;child = $child;
    }
}

/** @Document **/
class MODM116Child extends MODM116Parent
{
    
    /** @EmbedMany(targetDocument=&quot;MODM116Embedded&quot;) **/
    protected $embedded;
    
    function addEmbedded($parent) {
        $this-&amp;gt;embedded[] = new MODM116Embedded($parent);
    }
}

/** @EmbeddedDocument **/
class MODM116Embedded {
    
    /** @ReferenceOne(targetDocument=&quot;MODM116Parent&quot;) **/
    protected $parent;
    
    public function __construct($parent) {
        $this-&amp;gt;parent = $parent;
    }
    
}


$parent = new MODM116Parent();
$parent-&amp;gt;setName(&apos;test&apos;);
$parent-&amp;gt;setChild(new MODM116Child());
$dm-&amp;gt;persist($parent-&amp;gt;getChild());
$dm-&amp;gt;persist($parent);
$dm-&amp;gt;flush();
$dm-&amp;gt;clear();

$parent = $dm-&amp;gt;getRepository(get_class($parent))-&amp;gt;findOneBy(array(&apos;name&apos; =&amp;gt; &apos;test&apos;));

$parent-&amp;gt;getChild()-&amp;gt;setName(&apos;ok&apos;);
$parent-&amp;gt;getChild()-&amp;gt;addEmbedded($parent);
$dm-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="15637" author="jfbus" created="Wed, 30 Mar 2011 02:42:50 +0000"  >&lt;p&gt;Pulled the last version from git. The bug still exists.&lt;/p&gt;</comment>
                    <comment id="15741" author="jfbus" created="Thu, 21 Apr 2011 17:13:51 +0000"  >&lt;p&gt;Up. Any news on a fix ?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-149] Fix PHPDoc @return types in various places</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-149</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;In certain PHPDoc blocks for functions, the @return type is not of the right type. This causes auto-completion issues in various IDEs (I&apos;m using PhpStorm). &lt;/p&gt;

&lt;p&gt;For example, in \Doctrine\ODM\MongoDB\DocumentManager on line #341 the -&amp;gt;createQueryBuilder($documentName = null) function.&lt;/p&gt;

&lt;p&gt;/**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Create a new Query instance for a class.&lt;br/&gt;
     *&lt;/li&gt;
	&lt;li&gt;@param string $documentName The document class name.&lt;/li&gt;
	&lt;li&gt;@return Document\ODM\MongoDB\Query  &amp;lt;--------------------------- MUST BE Query\Builder !&lt;br/&gt;
     */&lt;br/&gt;
    public function createQueryBuilder($documentName = null)
    {
        return new Query\Builder($this, $this-&amp;gt;cmd, $documentName);
    }&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
            <key id="12792">MODM-149</key>
            <summary>Fix PHPDoc @return types in various places</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</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="dayson">Dayson Pais</reporter>
                        <labels>
                    </labels>
                <created>Tue, 5 Jul 2011 17:55:05 +0000</created>
                <updated>Thu, 5 Apr 2012 14:23:56 +0000</updated>
                                    <version>1.0.0BETA3</version>
                                                <component>Document Manager</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17777" author="leedavis81" created="Thu, 5 Apr 2012 14:23:56 +0000"  >&lt;p&gt;This appears to be fixed in 1.0.0BETA4-DEV&lt;/p&gt;

&lt;p&gt;Line 357 in Doctrine\ODM\MongoDB\DocumentManager...&lt;/p&gt;

&lt;p&gt;    /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Create a new Query instance for a class.&lt;br/&gt;
     *&lt;/li&gt;
	&lt;li&gt;@param string $documentName The document class name.&lt;/li&gt;
	&lt;li&gt;@return Query\Builder&lt;br/&gt;
     */&lt;br/&gt;
    public function createQueryBuilder($documentName = null)
    {
        return new Query\Builder($this, $this-&amp;gt;cmd, $documentName);
    }&lt;/li&gt;
&lt;/ul&gt;
</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-153] &quot;Near&quot; Query does not work.</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-153</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;&quot;Near&quot; statement does not work for me. The following code returns  &lt;b&gt;all&lt;/b&gt;  cities from collection:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;$cities = $this-&amp;gt;dm-&amp;gt;createQuery(&apos;City&apos;)
    -&amp;gt;field(&apos;coordinates&apos;)-&amp;gt;near(50, 60)
    -&amp;gt;execute();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Could you please fix it?&lt;/p&gt;</description>
                <environment></environment>
            <key id="12912">MODM-153</key>
            <summary>&quot;Near&quot; Query does not work.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</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="dmitry-by">Dmitry</reporter>
                        <labels>
                    </labels>
                <created>Wed, 10 Aug 2011 12:55:40 +0000</created>
                <updated>Mon, 20 Feb 2012 19:54:57 +0000</updated>
                                    <version>1.0.0BETA2</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16411" author="maarky" created="Fri, 2 Sep 2011 04:11:59 +0000"  >&lt;p&gt;It also does not work in beta3 but it fails differently. It never returns anything.&lt;/p&gt;

&lt;p&gt;$places = $documentManager-&amp;gt;createQueryBuilder(&apos;Documents\Place&apos;)&lt;br/&gt;
			-&amp;gt;field(&apos;point&apos;)&lt;br/&gt;
			-&amp;gt;near(36.5788494, -121.7207804)&lt;br/&gt;
			-&amp;gt;getQuery()&lt;br/&gt;
			-&amp;gt;execute();&lt;/p&gt;

&lt;p&gt;This returns 0 documents even though I have a point at 36.5788493, -121.7207805. Doctrine\MongoDB\Query\Builder::near() only takes one argument so the Y value is ignored. However, the docblock specifies 2 params.&lt;/p&gt;</comment>
                    <comment id="16426" author="timatej" created="Sun, 4 Sep 2011 19:10:45 +0000"  >&lt;p&gt;Hi All,&lt;/p&gt;

&lt;p&gt;Here is correct realization of this function in &lt;br/&gt;
Doctrine\MongoDB\Query\Builder&lt;/p&gt;

&lt;p&gt;    public function near($x, $y)&lt;/p&gt;
    {
        $this-&amp;gt;query[&apos;type&apos;] = Query::TYPE_GEO_LOCATION;
        $this-&amp;gt;query[&apos;near&apos;] = array($x, $y);
        return $this;
    }

&lt;p&gt;When may this fix appear in Doctrine ODM?&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;</comment>
                    <comment id="17468" author="nvoyageur" created="Mon, 20 Feb 2012 19:54:57 +0000"  >&lt;p&gt;I had the same issue on 1.0.0.BETA3.&lt;/p&gt;

&lt;p&gt;The solution was to change the query up a little.&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-none&quot;&gt;$places = $this-&amp;gt;dm-&amp;gt;createQueryBuilder(&apos;\Application\Event&apos;)-&amp;gt;field(&apos;latitude&apos;)-&amp;gt;near(50)-&amp;gt;field(&apos;longitude&apos;)-&amp;gt;near(60)-&amp;gt;getQuery()-&amp;gt;execute(); 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/a/9015906/179335&quot; class=&quot;external-link&quot;&gt;http://stackoverflow.com/a/9015906/179335&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-82] Add New Attribute &quot;idGetter&quot; to allow accessing the ID without triggering lazy-load</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-82</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;access the ID of a proxy without loading it.&lt;/p&gt;

&lt;p&gt;See &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-687&quot; title=&quot;Add New Entity Attribute &amp;quot;idGetter&amp;quot; to allow accessing the ID without triggering lazy-load&quot;&gt;DDC-687&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="11963">MODM-82</key>
            <summary>Add New Attribute &quot;idGetter&quot; to allow accessing the ID without triggering lazy-load</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</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="tecbot">Thomas Adam</reporter>
                        <labels>
                    </labels>
                <created>Wed, 29 Sep 2010 16:33:07 +0000</created>
                <updated>Fri, 4 Mar 2011 10:46:11 +0000</updated>
                                    <version>1.0.0BETA2</version>
                                <fixVersion>1.1.0</fixVersion>
                                <component>Proxies</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-128] Upserts in Query builder</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-128</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;It seems that if you just call upsert(true) in a update request, it won&apos;t be enough. You have to calm getQuery(array(&apos;upsert&apos; =&amp;gt; true)) as well in order to have the &apos;insert if not exist&apos; working.  &lt;/p&gt;</description>
                <environment>Mac OS X + MAMP</environment>
            <key id="12417">MODM-128</key>
            <summary>Upserts in Query builder</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="billybob">Billy Bob</reporter>
                        <labels>
                    </labels>
                <created>Wed, 23 Feb 2011 23:31:45 +0000</created>
                <updated>Wed, 23 Feb 2011 23:31:45 +0000</updated>
                                    <version>1.0.0BETA2</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-129] Storing embeded documents containing embeded documents, already persistet in another collection fails</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-129</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;We persist a document a1 containing an embedded document a1.1 which itself contains another embedded document a1.1.1. When the embedded document a1.1 is moved to another document of another collection b1 and needs to get persisted as embedded document b1.1 the embedded document a1.1.1 (which is now part of b1.1, too) is not saved as an embedded document of  b1.1.&lt;/p&gt;

&lt;p&gt;Example: We use a version object which contains a pageversion as an embedded document. This page object contains multiple elements (stored as embedded documents) which themselves contain several parameter objects (stored as embedded document of elements). Now assume we have such a persisted version and want to &quot;copy&quot; the pageversion in another collection. So we generate a new page object, and add to this page all elements of the persisted pageversion. If we now persist this page, the representation in mongodb contains all elements but not any parameters, which should be part of the page as well (as they are part of an element).&lt;/p&gt;</description>
                <environment></environment>
            <key id="12422">MODM-129</key>
            <summary>Storing embeded documents containing embeded documents, already persistet in another collection fails</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="kolja">Kolja Treutlein</reporter>
                        <labels>
                    </labels>
                <created>Fri, 25 Feb 2011 05:36:07 +0000</created>
                <updated>Fri, 25 Feb 2011 11:39:02 +0000</updated>
                                    <version>1.0.0BETA3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15368" author="kolja" created="Fri, 25 Feb 2011 05:43:23 +0000"  >&lt;p&gt;Testcase&lt;/p&gt;</comment>
                    <comment id="15370" author="jwage" created="Fri, 25 Feb 2011 11:39:02 +0000"  >&lt;p&gt;Try cloning the embedded document when you move it. The reason why you have issues most likely is because internally inside Doctrine we keep track of each embedded document instance and what parent document it is attached to. So when you move it, Doctrine gets confused.  You need to move it by cloning so the embedded document is actually a new object instance to Doctrine.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10945" name="testcase.tar.gz" size="2333" author="kolja" created="Fri, 25 Feb 2011 05:43:23 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-131] Notice in Doctrine\MongoDB\GridFS::doInsert</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-131</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;Notice: Undefined variable: file in /projects/tbi/vendors/doctrine/odm/lib/vendor/doctrine-mongodb/lib/Doctrine/MongoDB/GridFS.php on line 112&lt;/p&gt;</description>
                <environment>CentOS 5.5, PHP 5.3</environment>
            <key id="12464">MODM-131</key>
            <summary>Notice in Doctrine\MongoDB\GridFS::doInsert</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="vkaplich">Vitaliy Kaplich</reporter>
                        <labels>
                    </labels>
                <created>Wed, 9 Mar 2011 14:14:59 +0000</created>
                <updated>Wed, 9 Mar 2011 14:14:59 +0000</updated>
                                    <version>1.0.0BETA3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-132] Doctrine\ODM\MongoDB\Mapping\ClassMetaData is loosing &quot;file&quot; property after serialization</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-132</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;After ClassMetaData is awakened it looses the &quot;file&quot; property and that breaks our File model.&lt;br/&gt;
File::count() returns 0&lt;/p&gt;

&lt;p&gt;I dumped ClassMetaData object with caching enabled and disabled. Here&apos;s the diff:&lt;/p&gt;

&lt;p&gt;146c146&lt;br/&gt;
&amp;lt;     &lt;span class=&quot;error&quot;&gt;&amp;#91;file&amp;#93;&lt;/span&gt; =&amp;gt; &lt;br/&gt;
&amp;#8212;&lt;br/&gt;
&amp;gt;     &lt;span class=&quot;error&quot;&gt;&amp;#91;file&amp;#93;&lt;/span&gt; =&amp;gt; file&lt;br/&gt;
149a150,180&lt;br/&gt;
&amp;gt;             &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; =&amp;gt; Array&lt;br/&gt;
&amp;gt;                 (&lt;br/&gt;
&amp;gt;                     &lt;span class=&quot;error&quot;&gt;&amp;#91;keys&amp;#93;&lt;/span&gt; =&amp;gt; Array&lt;br/&gt;
&amp;gt;                         (&lt;br/&gt;
&amp;gt;                             &lt;span class=&quot;error&quot;&gt;&amp;#91;uploaded_at&amp;#93;&lt;/span&gt; =&amp;gt; 1&lt;br/&gt;
&amp;gt;                         )&lt;br/&gt;
&amp;gt;  &lt;br/&gt;
&amp;gt;                     &lt;span class=&quot;error&quot;&gt;&amp;#91;options&amp;#93;&lt;/span&gt; =&amp;gt; Array&lt;br/&gt;
&amp;gt;                         (&lt;br/&gt;
&amp;gt;                             &lt;span class=&quot;error&quot;&gt;&amp;#91;safe&amp;#93;&lt;/span&gt; =&amp;gt; true&lt;br/&gt;
&amp;gt;                             &lt;span class=&quot;error&quot;&gt;&amp;#91;unique&amp;#93;&lt;/span&gt; =&amp;gt; &lt;br/&gt;
&amp;gt;                         )&lt;br/&gt;
&amp;gt;  &lt;br/&gt;
&amp;gt;                 )&lt;br/&gt;
&amp;gt;  &lt;/p&gt;

&lt;p&gt;The first line is the missing file value. The second block appears to be missing indexes but I&apos;m guessing this information should not be serialized.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12475">MODM-132</key>
            <summary>Doctrine\ODM\MongoDB\Mapping\ClassMetaData is loosing &quot;file&quot; property after serialization</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="paradox">Andrei S</reporter>
                        <labels>
                    </labels>
                <created>Fri, 18 Mar 2011 12:40:12 +0000</created>
                <updated>Fri, 18 Mar 2011 12:40:12 +0000</updated>
                                    <version>1.0.0BETA3</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<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>

<item>
            <title>[MODM-135] [Cursor] ReferenceMany sort mapping not working</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-135</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;I have a document like this:&lt;/p&gt;

&lt;p&gt;/** @Document */&lt;br/&gt;
class Page&lt;br/&gt;
{&lt;br/&gt;
	/** @Id */&lt;br/&gt;
	protected $id;&lt;/p&gt;

&lt;p&gt;	/** @ReferenceMany(sort=&lt;/p&gt;
{&quot;order&quot;=&quot;asc&quot;}
&lt;p&gt;) */&lt;br/&gt;
	protected $blocks;&lt;br/&gt;
}&lt;/p&gt;


&lt;p&gt;If i have well understood things, i can do:&lt;/p&gt;

&lt;p&gt;$blocks = $dm-&amp;gt;getRepository(&apos;Page&apos;)&lt;del&gt;&amp;gt;find($id)&lt;/del&gt;&amp;gt;getBlocks();&lt;/p&gt;

&lt;p&gt;blocks should now be sorted by $order property.&lt;/p&gt;



&lt;p&gt;This behaviour doesn&apos;t seems to work (or maybe i&apos;m missing something). &lt;br/&gt;
In the attachment there&apos;s a test case&lt;/p&gt;

&lt;p&gt;i made the priority major because in my case i haven&apos;t found a workaround (i&apos;m using nested referenceMany, a child can have children,  which can have children, ..). &lt;/p&gt;</description>
                <environment>Macosx</environment>
            <key id="12498">MODM-135</key>
            <summary>[Cursor] ReferenceMany sort mapping not working</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>Fri, 25 Mar 2011 19:10:05 +0000</created>
                <updated>Sat, 26 Mar 2011 07:58:32 +0000</updated>
                                    <version>1.0.0BETA3</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                                <attachments>
                    <attachment id="10961" name="MODM135.zip" size="5312" author="gordonslondon" created="Fri, 25 Mar 2011 19:10:05 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-136] Document&apos;s fields names are not properly converted to database names in a query</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-136</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>
&lt;p&gt;Mappings:&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;/**
 * @Field(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;date&quot;&lt;/span&gt;, name=&lt;span class=&quot;code-quote&quot;&gt;&quot;scheduled_at&quot;&lt;/span&gt;)
 */
&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $scheduledAt;

/**
 * @Field(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;date&quot;&lt;/span&gt;, name=&lt;span class=&quot;code-quote&quot;&gt;&quot;completed_at&quot;&lt;/span&gt;)
 */
&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $completedAt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;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;$qb-&amp;gt;field(&apos;scheduledAt&apos;)-&amp;gt;lte($now)
   -&amp;gt;addOr($qb-&amp;gt;expr()-&amp;gt;field(&apos;completedAt&apos;)-&amp;gt;lte($now))
   -&amp;gt;addOr($qb-&amp;gt;expr()-&amp;gt;field(&apos;completedAt&apos;)-&amp;gt;equals(&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;))
   -&amp;gt;sort(&apos;scheduledAt&apos;, &apos;asc&apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Expected result:&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;db.foo.find({
    &lt;span class=&quot;code-quote&quot;&gt;&quot;scheduled_at&quot;&lt;/span&gt;: { &lt;span class=&quot;code-quote&quot;&gt;&quot;$lte&quot;&lt;/span&gt;: &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Date(...) }, 
    &lt;span class=&quot;code-quote&quot;&gt;&quot;$or&quot;&lt;/span&gt;: [ 
        { &lt;span class=&quot;code-quote&quot;&gt;&quot;completed_at&quot;&lt;/span&gt;: {  &lt;span class=&quot;code-quote&quot;&gt;&quot;$lte&quot;&lt;/span&gt;: &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Date(...) } }, 
        { &lt;span class=&quot;code-quote&quot;&gt;&quot;completed_at&quot;&lt;/span&gt;: &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; } ] 
})
.sort({ &lt;span class=&quot;code-quote&quot;&gt;&quot;scheduled_at&quot;&lt;/span&gt;: 1 });
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Actual result:&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;db.foo.find({
    &lt;span class=&quot;code-quote&quot;&gt;&quot;scheduled_at&quot;&lt;/span&gt;: { &lt;span class=&quot;code-quote&quot;&gt;&quot;$lte&quot;&lt;/span&gt;: &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Date(...) }, 
    &lt;span class=&quot;code-quote&quot;&gt;&quot;$or&quot;&lt;/span&gt;: [ 
        { &lt;span class=&quot;code-quote&quot;&gt;&quot;completedAt&quot;&lt;/span&gt;: {  &lt;span class=&quot;code-quote&quot;&gt;&quot;$lte&quot;&lt;/span&gt;: &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Date(...) } }, 
        { &lt;span class=&quot;code-quote&quot;&gt;&quot;completedAt&quot;&lt;/span&gt;: &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; } ] 
})
.sort({ &lt;span class=&quot;code-quote&quot;&gt;&quot;scheduledAt&quot;&lt;/span&gt;: 1 });
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;






</description>
                <environment></environment>
            <key id="12502">MODM-136</key>
            <summary>Document&apos;s fields names are not properly converted to database names in a query</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="rybakit">Eugene Leonovich</reporter>
                        <labels>
                    </labels>
                <created>Sun, 27 Mar 2011 09:13:03 +0000</created>
                <updated>Sun, 27 Mar 2011 09:13:03 +0000</updated>
                                                                            <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-137] Undefined index &apos;criteria&apos; in DocumentPersister</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-137</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;On the master branch, a notice is thrown on line 531 of the DocumentPersister for an undefined index &apos;criteria&apos;. This is when using the Yaml driver.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/mongodb-odm/blob/master/lib/Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php#L531&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/mongodb-odm/blob/master/lib/Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php#L531&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Full notice:&lt;br/&gt;
Notice: Undefined index: criteria in /Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php on line 531&lt;br/&gt;
PHP Warning: array_merge(): Argument #2 is not an array in /Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php on line 532&lt;/p&gt;

&lt;p&gt;Warning: array_merge(): Argument #2 is not an array in /Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php on line 532&lt;br/&gt;
PHP Catchable fatal error: Argument 1 passed to Doctrine\MongoDB\Collection::find() must be an array, null given, called in Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php on line 533 and defined in Doctrine/MongoDB/Collection.php on line 169&lt;/p&gt;

&lt;p&gt;Catchable fatal error: Argument 1 passed to Doctrine\MongoDB\Collection::find() must be an array, null given, called in Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php on line 533 and defined in /Doctrine/MongoDB/Collection.php on line 169&lt;/p&gt;</description>
                <environment></environment>
            <key id="12532">MODM-137</key>
            <summary>Undefined index &apos;criteria&apos; in DocumentPersister</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="kevbradwick">Kevin Bradwick</reporter>
                        <labels>
                    </labels>
                <created>Mon, 4 Apr 2011 18:50:06 +0000</created>
                <updated>Mon, 4 Apr 2011 18:50:06 +0000</updated>
                                    <version>1.0.0BETA3</version>
                                                <component>Persister</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<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>

<item>
            <title>[MODM-139] [PATCH] @ReferenceMany with no referenceMapping cannot handle DBRef in all / in queries</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-139</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;I have thoose examples : &lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;/** @Document 
 * @InheritanceType(&quot;SINGLE_COLLECTION&quot;)
 * @DiscriminatorField(fieldName=&quot;type&quot;)
 * @DiscriminatorMap({&quot;Test\Product&quot;=&quot;Product&quot;, &quot;Test\Year&quot;=&quot;Year&quot;})
*/
Attributes {
   /** @Id */
   protected $_id;
}

/** @Document */
class Product extends Attributes {}

/** @Document */
class Year extends Attributes {}

/**
 * Classe de base pour les diff&#233;rents contenus
 * @Document
 * @InheritanceType(&quot;SINGLE_COLLECTION&quot;)
 * @DiscriminatorField(fieldName=&quot;type&quot;)
 * @DiscriminatorMap({&quot;Test\Document&quot;=&quot;Document&quot;, &quot;Test\Infos&quot;=&quot;Infos&quot;})  
 */
class Content
{
   /** protected $_id */
    /** @ReferenceMany */
    protected $_attributes;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And the querying stuff&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;//and the query : 
$queryBuilder = $dm-&amp;gt;createQueryBuilder(&apos;Test\DOcument&apos;);
//...
$attribute1Ref = $dm-&amp;gt;createDBRef($attribute1Object);
$attribute2Ref = $dm-&amp;gt;createDBRef($attribute2Object);
$queryBuilder-&amp;gt;field(&apos;_attributes&apos;)-&amp;gt;all(array($attribute1Ref, $attribute2Ref));
$queryBuilder-&amp;gt;getQuery()-&amp;gt;execute();//Won&apos;t work as the generated query won&apos;t specify the &quot;_doctrine_class_name&quot; value.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Proposed patch in DocumentManager : &lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;    /**
     * Returns a DBRef array for the supplied document.
     *
     * @param mixed $document A document object
     * @param array $referenceMapping Mapping for the field the references the document
     *
     * @return array A DBRef array
     */
    public function createDBRef($document, array $referenceMapping = null)
    {
        $className = get_class($document);
        $class = $this-&amp;gt;getClassMetadata($className);
        $id = $this-&amp;gt;unitOfWork-&amp;gt;getDocumentIdentifier($document);

        $dbRef = array(
            $this-&amp;gt;cmd . &apos;ref&apos; =&amp;gt; $class-&amp;gt;getCollection(),
            $this-&amp;gt;cmd . &apos;id&apos;  =&amp;gt; $class-&amp;gt;getDatabaseIdentifierValue($id),
            $this-&amp;gt;cmd . &apos;db&apos;  =&amp;gt; $this-&amp;gt;getDocumentDatabase($className)-&amp;gt;getName()
        );

        // add a discriminator value if the referenced document is not mapped explicitely to a targetDocument
        if ($referenceMapping &amp;amp;&amp;amp; ! isset($referenceMapping[&apos;targetDocument&apos;])) {
            $discriminatorField = isset($referenceMapping[&apos;discriminatorField&apos;]) ? $referenceMapping[&apos;discriminatorField&apos;] : &apos;_doctrine_class_name&apos;;
            $discriminatorValue = isset($referenceMapping[&apos;discriminatorMap&apos;]) ? array_search($class-&amp;gt;getName(), $referenceMapping[&apos;discriminatorMap&apos;]) : $class-&amp;gt;getName();
            $dbRef[$discriminatorField] = $discriminatorValue;
+        }  elseif ($referenceMapping === null) {
+            $dbRef[&apos;_doctrine_class_name&apos;] = $class-&amp;gt;getName();
+        }
        return $dbRef;
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>Linux, PHP 5.3</environment>
            <key id="12549">MODM-139</key>
            <summary>[PATCH] @ReferenceMany with no referenceMapping cannot handle DBRef in all / in 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="geraldcroes">G&#233;rald Croes</reporter>
                        <labels>
                    </labels>
                <created>Fri, 8 Apr 2011 06:05:31 +0000</created>
                <updated>Fri, 8 Apr 2011 08:08:17 +0000</updated>
                                    <version>1.0.0BETA3</version>
                                                <component>Document Manager</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<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>

<item>
            <title>[MODM-141] Doctrine ODM: Documentation error</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-141</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;I think that is a documentation issue, in &lt;a href=&quot;http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/query-builder-api.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/query-builder-api.html&lt;/a&gt; (15.3. Modifier Operations) the queries are like:&lt;/p&gt;

&lt;p&gt;$dm-&amp;gt;createQueryBuilder(&apos;User&apos;)&lt;/p&gt;

&lt;p&gt;    &lt;del&gt;&amp;gt;field(&apos;password&apos;)&lt;/del&gt;&amp;gt;set(&apos;newpassword&apos;)&lt;/p&gt;

&lt;p&gt;    &lt;del&gt;&amp;gt;field(&apos;username&apos;)&lt;/del&gt;&amp;gt;equals(&apos;jwage&apos;)&lt;/p&gt;

&lt;p&gt;    -&amp;gt;getQuery()&lt;br/&gt;
    -&amp;gt;execute();&lt;/p&gt;


&lt;p&gt;But it is missing the update(), it should be like:&lt;/p&gt;

&lt;p&gt;$dm-&amp;gt;createQueryBuilder(&apos;User&apos;)&lt;/p&gt;

&lt;p&gt;    -&amp;gt;update()&lt;br/&gt;
    &lt;del&gt;&amp;gt;field(&apos;password&apos;)&lt;/del&gt;&amp;gt;set(&apos;newpassword&apos;)&lt;/p&gt;

&lt;p&gt;    &lt;del&gt;&amp;gt;field(&apos;username&apos;)&lt;/del&gt;&amp;gt;equals(&apos;jwage&apos;)&lt;/p&gt;

&lt;p&gt;    -&amp;gt;getQuery()&lt;br/&gt;
    -&amp;gt;execute();&lt;/p&gt;

&lt;p&gt;All the queries in that section have similar issue&lt;/p&gt;</description>
                <environment>not applicable</environment>
            <key id="12583">MODM-141</key>
            <summary>Doctrine ODM: Documentation error</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</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="diego.lewin">Diego Lewin</reporter>
                        <labels>
                    </labels>
                <created>Tue, 26 Apr 2011 18:38:27 +0000</created>
                <updated>Tue, 26 Apr 2011 18:38:27 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-142] DocumentRepository::findBy() not compatible with interface</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-142</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;I want to get a document repository for my Document\Event document class but instead i get a fatal error.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;Pseudo&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&amp;lt;?php

use Doctrine\MongoDB\Connection;
use Doctrine\ODM\MongoDB\DocumentManager;
use Doctrine\ODM\MongoDB\Configuration;
use Documents\Event;

$manager = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; DocumentManager(
    &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Connection(...),
    &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Configuration(...)
);

$manager-&amp;gt;getRepository(&apos;Documents\Event&apos;);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;blockquote&gt;&lt;p&gt;Fatal error: Declaration of Doctrine\ODM\MongoDB\DocumentRepository::findBy() must be compatible with that of Doctrine\Common\Persistence\ObjectRepository::findBy() in /home/jpieper/Workspace/Jersey/vendor/doctrine-common/lib/Doctrine/ODM/MongoDB/DocumentRepository.php on line 39&lt;/p&gt;&lt;/blockquote&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;DoctrineCommonPersistenceObjectRepository.php (github@5a285537)&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function findBy(array $criteria, array $orderBy = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;, $limit = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;, $offset = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;DoctrineODMMongoDBDocumentRepository.php (github@8d02e843)&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function findBy(array $criteria) { ... }&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;See &lt;a href=&quot;https://github.com/doctrine/common/commit/5a2855372834cf37e0408e80dcb9a9c97ec1d352#lib/Doctrine/Common/Persistence&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/commit/5a2855372834cf37e0408e80dcb9a9c97ec1d352#lib/Doctrine/Common/Persistence&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="12618">MODM-142</key>
            <summary>DocumentRepository::findBy() not compatible with interface</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="jpieper">Jan Pieper</reporter>
                        <labels>
                    </labels>
                <created>Sat, 7 May 2011 08:28:22 +0000</created>
                <updated>Sat, 7 May 2011 08:28:22 +0000</updated>
                                    <version>1.0.0BETA3</version>
                                                <component>Document Repositories</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-147] No possibility to get a json object by a working document with toArray method (inluding all the embedded documents as arrays)</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-147</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;Description of the problem here:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/6155189/doctrine-odm-mongodb-get-a-complete-array-of-an-object&quot; class=&quot;external-link&quot;&gt;http://stackoverflow.com/questions/6155189/doctrine-odm-mongodb-get-a-complete-array-of-an-object&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Problem with the unincisive toArray() method.&lt;/p&gt;</description>
                <environment>Irrelevant</environment>
            <key id="12678">MODM-147</key>
            <summary>No possibility to get a json object by a working document with toArray method (inluding all the embedded documents as arrays)</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</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="ssalat">Stephan Salat</reporter>
                        <labels>
                    </labels>
                <created>Sat, 28 May 2011 08:25:10 +0000</created>
                <updated>Sat, 28 May 2011 09:13:33 +0000</updated>
                                    <version>1.0.0BETA3</version>
                                                <component>Collections</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-148] Do not add &apos;$db&apos; in reference when referencing document from same $db</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-148</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;When using ReferenceOne or ReferenceMany , doctrine will create fully-qualified reference to the object (with all fields: &apos;$id&apos;, &apos;$ref&apos;, &apos;$db&apos;) even when reference is within same $db.&lt;/p&gt;

&lt;p&gt;This approach causes several problems: for example we use mongo database as a template for new clients - when new client registers, template database is copied for him. But since it contains hardcoded $db - copy operation becomes resource consuming, since we have to loop through every document of every collection and fix $db reference.&lt;/p&gt;

&lt;p&gt;Also maintenance suffers, since you can&apos;t easily rename database when required. &lt;/p&gt;

&lt;p&gt;Is it possible to omit $db part when referencing document from same db?&lt;/p&gt;</description>
                <environment></environment>
            <key id="12688">MODM-148</key>
            <summary>Do not add &apos;$db&apos; in reference when referencing document from same $db</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="vladar">Vladimir Razuvaev</reporter>
                        <labels>
                    </labels>
                <created>Thu, 2 Jun 2011 08:18:53 +0000</created>
                <updated>Thu, 2 Jun 2011 08:18:53 +0000</updated>
                                                                    <component>Document Manager</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-150] XSD file for XML mappings is incomplete</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-150</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;The XSD file for XML mappings (&lt;a href=&quot;http://www.doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd&lt;/a&gt;) appears to be incomplete:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Only document is allowed as root tag, not mapped-superclass or embedded-document&lt;/li&gt;
	&lt;li&gt;The name attribute for the document tag is not allowed according to the XSD file&lt;/li&gt;
	&lt;li&gt;The fieldName, index and unique attributes for the field tag is not allowed according to the XSD file&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;These are the problems I discovered at the moment, I haven&apos;t yet checked for more problems. The XSD file probably needs a bigger update.&lt;/p&gt;

&lt;p&gt;Attached is a patch file that adds the missing attributes, I haven&apos;t dug into Doctrine enough to create the mapped-superclass or embedded-document tags.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12798">MODM-150</key>
            <summary>XSD file for XML mappings is incomplete</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="a.braun">alcaeus</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Jul 2011 12:40:20 +0000</created>
                <updated>Thu, 7 Jul 2011 12:40:20 +0000</updated>
                                    <version>1.0.0BETA3</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                                <attachments>
                    <attachment id="11026" name="doctrine-mongo-mapping.xsd.patch" size="1547" author="a.braun" created="Thu, 7 Jul 2011 12:40:20 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-151] Missing Annotation class HasLifecycleCallbacks</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-151</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;Annotation class HasLifecycleCallbacks is missing in Doctrine\ODM\MongoDB\Mapping\Annotations&lt;/p&gt;</description>
                <environment>latest MongoDB ODM from git master repository</environment>
            <key id="12799">MODM-151</key>
            <summary>Missing Annotation class HasLifecycleCallbacks</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="adrive">Miloslav &quot;adrive&quot; Kmet</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Jul 2011 13:14:42 +0000</created>
                <updated>Thu, 7 Jul 2011 13:14:42 +0000</updated>
                                                                    <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-152] Single Collection Inheritance mapping does NOT work if the subclasses are in a different namespace</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-152</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;I have described the issue in detail here: &lt;a href=&quot;https://github.com/doctrine/mongodb-odm/issues/124&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/mongodb-odm/issues/124&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="12806">MODM-152</key>
            <summary>Single Collection Inheritance mapping does NOT work if the subclasses are in a different namespace</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="dayson">Dayson Pais</reporter>
                        <labels>
                    </labels>
                <created>Sat, 9 Jul 2011 16:19:34 +0000</created>
                <updated>Sat, 9 Jul 2011 16:19:34 +0000</updated>
                                    <version>1.0.0BETA3</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-154] Github-PR-150 by tecbot: [XMLDriver] fixed an error in hydration classes when the name is not equal to the fieldName</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-154</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of &lt;/p&gt;
{username}
&lt;p&gt;:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/mongodb-odm/pull/150&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/mongodb-odm/pull/150&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

</description>
                <environment></environment>
            <key id="12950">MODM-154</key>
            <summary>Github-PR-150 by tecbot: [XMLDriver] fixed an error in hydration classes when the name is not equal to the fieldName</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</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="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 21 Aug 2011 14:46:27 +0000</created>
                <updated>Sun, 21 Aug 2011 14:46:27 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-155] Github-PR-148 by roed: fixed generating of classes</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-155</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of &lt;/p&gt;
{username}
&lt;p&gt;:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/mongodb-odm/pull/148&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/mongodb-odm/pull/148&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

&lt;p&gt;fixed the generating of classes based on xml files, changed ClassMetadata to ClassMetadataInfo in these files (as in the ORM tool/mapping)&lt;/p&gt;

&lt;p&gt;the following did not work, but works after these changes:&lt;br/&gt;
$cmf = new \Doctrine\ODM\MongoDB\Tools\DisconnectedClassMetadataFactory();	&lt;br/&gt;
$cmf-&amp;gt;setDocumentManager($this-&amp;gt;_dm);			&lt;br/&gt;
$cmf-&amp;gt;setConfiguration($this-&amp;gt;_dm-&amp;gt;getConfiguration());		&lt;br/&gt;
$driver = $this-&amp;gt;_dm-&amp;gt;getConfiguration()-&amp;gt;getMetadataDriverImpl();		&lt;/p&gt;

&lt;p&gt;$metadatas = $cmf-&amp;gt;getAllMetadata(); //this would break it&lt;/p&gt;

&lt;p&gt;// $this-&amp;gt;_dm is an instance of Doctrine\ODM\MongoDB\DocumentManager&lt;/p&gt;</description>
                <environment></environment>
            <key id="12951">MODM-155</key>
            <summary>Github-PR-148 by roed: fixed generating of classes</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</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="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 21 Aug 2011 14:46:29 +0000</created>
                <updated>Sun, 21 Aug 2011 14:46:29 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-157] Github-PR-151 by l3pp4rd: fixes triggering fatal error on preupdate event in case changeset is clea</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-157</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of &lt;/p&gt;
{username}
&lt;p&gt;:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/mongodb-odm/pull/151&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/mongodb-odm/pull/151&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

&lt;p&gt;fixes triggering fatal error on preupdate event in case changeset is cleared during onFlush&lt;/p&gt;

&lt;p&gt;similar issue is fixed in ORM it should be supported on ODM mongodb also&lt;/p&gt;</description>
                <environment></environment>
            <key id="12971">MODM-157</key>
            <summary>Github-PR-151 by l3pp4rd: fixes triggering fatal error on preupdate event in case changeset is clea</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</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="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 25 Aug 2011 18:02:51 +0000</created>
                <updated>Mon, 19 Sep 2011 13:51:24 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="16494" author="strygin" created="Mon, 19 Sep 2011 13:27:25 +0000"  >&lt;p&gt;Hmm... The bug is still actual for ORM layer in master. &lt;/p&gt;</comment>
                    <comment id="16495" author="vgarvardt" created="Mon, 19 Sep 2011 13:51:24 +0000"  >&lt;p&gt;Got the same issue for ORM in 2.1.1 and same in master. Made a fix based on fix for ODM and pull request on github.&lt;/p&gt;

&lt;p&gt;URL: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/126&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/126&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PS: maybe new issue should be created in Doctrine 2 - ORM project for this issue&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-156] Github-PR-152 by vladar: Property ClassMetadata::file is not serialized</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-156</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of &lt;/p&gt;
{username}
&lt;p&gt;:&lt;/p&gt;

&lt;p&gt;  Url: &lt;a href=&quot;https://github.com/doctrine/mongodb-odm/pull/152&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/mongodb-odm/pull/152&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Message:&lt;/p&gt;

&lt;p&gt;This is causing errors, when saving gridfs files with persistent metadata cache engine (like apc, memcached, etc).&lt;/p&gt;

&lt;p&gt;I&apos;ve also found same bug in Jira - &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/MODM-132&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/MODM-132&lt;/a&gt; but seems that it is not fixed yet.&lt;/p&gt;

&lt;p&gt;Added fix + tests.&lt;/p&gt;
</description>
                <environment></environment>
            <key id="12970">MODM-156</key>
            <summary>Github-PR-152 by vladar: Property ClassMetadata::file is not serialized</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</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="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 25 Aug 2011 18:02:51 +0000</created>
                <updated>Thu, 25 Aug 2011 18:02:51 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-158] Doctrine\ODM\MongoDB\Mapping\Type\TimestampType should use MongoDate instead of MongoTimestamp</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-158</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;When using the @Timestamp mapping type for a class Doctrine uses MongoTimestamp and it creates very incorrect times in the DB. According to PHP documentation, you should not use MongoTimestamp for creating timestamps, instead MongoDate should be used.&lt;/p&gt;

&lt;p&gt;I&apos;ve attached a patch that changes it to MongoDate and this works splendid when you assign a timestamp to a @Timestamp value&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;	/**
	 * @Field(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;timestamp&quot;&lt;/span&gt;)
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $created_on;

	/**
	 * @Field(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;timestamp&quot;&lt;/span&gt;)
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $updated_on;

	&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __construct($options = NULL)
	{
		$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;created_on = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;updated_on = time();
		parent::__construct($options);
	}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


</description>
                <environment>OS 10.7&lt;br/&gt;
&lt;br/&gt;
PHP 5.3.6 with Suhosin-Patch (cli) (built: Sep  8 2011 19:34:00) &lt;br/&gt;
Copyright (c) 1997-2011 The PHP Group&lt;br/&gt;
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;with Xdebug v2.1.2, Copyright (c) 2002-2011, by Derick Rethans</environment>
            <key id="13217">MODM-158</key>
            <summary>Doctrine\ODM\MongoDB\Mapping\Type\TimestampType should use MongoDate instead of MongoTimestamp</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="nvoyageur">Shane A. Stillwell</reporter>
                        <labels>
                    </labels>
                <created>Thu, 24 Nov 2011 18:00:21 +0000</created>
                <updated>Thu, 24 Nov 2011 18:00:21 +0000</updated>
                                    <version>1.0.0BETA3</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11117" name="mongodate.patch" size="561" author="nvoyageur" created="Thu, 24 Nov 2011 18:00:21 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-159] Querying a collection by Embedded objects identifier not working.</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-159</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;Reference objects identifiers are stored as &apos;$id&apos; in database when Embedded objects identifiers are stored as &apos;_id&apos;. When querying a collection by embedded objects identifier, DocumentPersister-&amp;gt;prepareQueryValue() converts it to &apos;$id&apos; although it is stored in DB as &apos;_id&apos;. So querying for reference object ids work but embedded objects do not.&lt;/p&gt;

&lt;p&gt;DocumentPersister-&amp;gt;prepareQueryValue() first checks if field has TargetDocument mapping, if it is true it checks if field is target document&apos;s identifier, if this also returns true&lt;br/&gt;
it prepares the field as &apos;$id&apos; without looking at if it is Embedded or Reference object ... If TargetDocument it is a Reference object it works since Reference objects identifiers are stored as &apos;$id&apos; but if TargetDocument is Embedded object, query returns empty as theres no field such &apos;$id&apos; in EmbeddedObject, identifier is &apos;_id&apos; instead..&lt;/p&gt;

&lt;p&gt;Is this a bug / issue or am i missing something?&lt;/p&gt;</description>
                <environment>OS:10.8.0 OSX&lt;br/&gt;
PHP Official Version 5.3.8&lt;br/&gt;
MongoDB : 2.0.1&lt;br/&gt;
</environment>
            <key id="13228">MODM-159</key>
            <summary>Querying a collection by Embedded objects identifier not working.</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="dahuda">Dahuda Unal</reporter>
                        <labels>
                    </labels>
                <created>Wed, 30 Nov 2011 03:47:12 +0000</created>
                <updated>Wed, 30 Nov 2011 03:56:14 +0000</updated>
                                    <version>1.0.0BETA3</version>
                                                <component>Persister</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-161] Bug with index definition</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-161</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;All is there: &lt;a href=&quot;https://gist.github.com/1682981&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/1682981&lt;/a&gt;&lt;/p&gt;</description>
                <environment>MacOS 10.7.2</environment>
            <key id="13416">MODM-161</key>
            <summary>Bug with index definition</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="_kud">Erwann Mest</reporter>
                        <labels>
                    </labels>
                <created>Mon, 6 Feb 2012 09:06:14 +0000</created>
                <updated>Fri, 15 Jun 2012 08:03:07 +0000</updated>
                                                                    <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="18088" author="cordoval" created="Fri, 15 Jun 2012 08:02:42 +0000"  >&lt;p&gt;github link has nothing it was removed&lt;/p&gt;</comment>
                    <comment id="18089" author="cordoval" created="Fri, 15 Jun 2012 08:03:07 +0000"  >&lt;p&gt;gist is a broken link &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-162] Introduction Tutorial,suitable version</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-162</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;HI all,&lt;/p&gt;

&lt;p&gt;I am working on a project where I would like to use mongoDB ODM. But while following this tutotorial : &lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/reference/introduction.html&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/reference/introduction.html&lt;/a&gt;, it appears to me that the download odm library doesn&apos;t work with the code: missing code or undefined classes. Therefore I woulld like to know what&apos;s the corresponding version mongodb ODM of the tutorial.&lt;/p&gt;

&lt;p&gt;Thank&apos;s in advance&lt;/p&gt;

&lt;p&gt;regards&lt;/p&gt;

&lt;p&gt;near&lt;/p&gt;</description>
                <environment>software</environment>
            <key id="13450">MODM-162</key>
            <summary>Introduction Tutorial,suitable version</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</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="near">Hugues Leunsa</reporter>
                        <labels>
                    </labels>
                <created>Wed, 15 Feb 2012 11:02:37 +0000</created>
                <updated>Wed, 15 Feb 2012 11:02:37 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<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>

<item>
            <title>[MODM-170] Unique index on embedded document</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-170</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;Bug checked on versions:&lt;br/&gt;
doctrine/mongodb-odm (1.0.0-BETA7)&lt;br/&gt;
doctrine/mongodb-odm-bundle (v3.0.0-BETA3)&lt;br/&gt;
and &lt;br/&gt;
doctrine/mongodb-odm (dev-master 6fd7a46)&lt;br/&gt;
doctrine/mongodb-odm-bundle (dev-master 23c08a4)&lt;/p&gt;

&lt;p&gt;I&apos;ve created unique index on embedded document and ODM seem not to be working properly. When unique index is violated MongoCursorException is thrown and this behavior is desired. &lt;br/&gt;
But, the document sometimes is persisted anyway. Document structure is invalid.&lt;/p&gt;


&lt;p&gt;Thrown exception: &lt;br/&gt;
mymongoserver.xx:27017: E11000 duplicate key error index: prj.Grid.$boxes_offer_$id_1_boxes_tag_$id_1  dup key: { : ObjectId(&apos;51555bbe31bcb2c70e000001&apos;), : &quot;dom&quot; }&lt;/p&gt;

&lt;p&gt;Grid document sketch:&lt;/p&gt;
{
 _id:
 boxes:[DBref(Offer), DBref(Offer), DBref(Offer)]
 tag: DBref(Tag)
}

&lt;p&gt;unique index on boxes.tag&lt;/p&gt;

&lt;p&gt;Any help would be appreciated.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14952">MODM-170</key>
            <summary>Unique index on embedded 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="szymon.karnecki">Szymon Karnecki</reporter>
                        <labels>
                    </labels>
                <created>Wed, 15 May 2013 10:58:29 +0000</created>
                <updated>Wed, 15 May 2013 10:58:29 +0000</updated>
                                                                    <component>Persister</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-126] lessThanOrEq() renamed in lte()</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-126</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;The lessThanOrEq() function referenced in the documentation does not exist ay more, it was replaced by lte().&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/query-builder-api.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/query-builder-api.html&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="12413">MODM-126</key>
            <summary>lessThanOrEq() renamed in lte()</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</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="billybob">Billy Bob</reporter>
                        <labels>
                    </labels>
                <created>Tue, 22 Feb 2011 23:27:07 +0000</created>
                <updated>Tue, 22 Feb 2011 23:27:07 +0000</updated>
                                    <version>1.0.0BETA2</version>
                                <fixVersion>1.0.0BETA2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-127] Update queries : update() required ?</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-127</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;In the documentation exemples for update queries : &lt;br/&gt;
&lt;a href=&quot;http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/query-builder-api.html#update-queries&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/query-builder-api.html#update-queries&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;it doesn&apos;t mention a update() function call any more in update queries.&lt;/p&gt;

&lt;p&gt;Did I miss something?&lt;/p&gt;
</description>
                <environment></environment>
            <key id="12414">MODM-127</key>
            <summary>Update queries : update() required ?</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</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="billybob">Billy Bob</reporter>
                        <labels>
                    </labels>
                <created>Wed, 23 Feb 2011 00:04:26 +0000</created>
                <updated>Wed, 23 Feb 2011 00:04:26 +0000</updated>
                                    <version>1.0.0BETA2</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-130] @ChangeTrackingPolicy notation is ignored in @MappedSuperclass</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-130</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;I am not sure if it&apos;s supposed to be that @MappedSuperclass document can define @ChangeTrackingPolicy for multiple documents but in fact it does not work.&lt;/p&gt;

&lt;p&gt;In other words in the case below:&lt;br/&gt;
===================================================&lt;/p&gt;

&lt;p&gt;/**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@MappedSuperclass&lt;/li&gt;
	&lt;li&gt;@InheritanceType(&quot;COLLECTION_PER_CLASS&quot;)&lt;/li&gt;
	&lt;li&gt;@ChangeTrackingPolicy(&quot;DEFERRED_EXPLICIT&quot;)&lt;br/&gt;
 */&lt;br/&gt;
abstract class MappedDocument&lt;br/&gt;
{&lt;br/&gt;
}&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;/**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@Document(collection=&quot;chart&quot;)&lt;br/&gt;
 */&lt;br/&gt;
class Chart extends MappedDocument&lt;br/&gt;
{&lt;br/&gt;
}&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;===================================================&lt;/p&gt;

&lt;p&gt;class Chart &lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;has InheritanceType = INHERITANCE_TYPE_COLLECTION_PER_CLASS which is expected&lt;/li&gt;
	&lt;li&gt;but  ChangeTrackingPolicy = CHANGETRACKING_DEFERRED_IMPLICIT (value by default) which is NOT expected.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;At the same time if to define ChangeTrackingPolicy in the Chart class instead of MappedDocument it works as expected.&lt;/p&gt;
</description>
                <environment>CentOS 5.5, PHP 5.3</environment>
            <key id="12443">MODM-130</key>
            <summary>@ChangeTrackingPolicy notation is ignored in @MappedSuperclass</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="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="vkaplich">Vitaliy Kaplich</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 Mar 2011 10:56:24 +0000</created>
                <updated>Wed, 2 Mar 2011 10:56:24 +0000</updated>
                                    <version>1.0.0BETA1</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-144] Bi-Directional References Feature</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-144</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;I cant&#180;t reproduce the Bi-Directional References with my own example or the example of the documentation.&lt;br/&gt;
Perhaps the documentation is not up to date or their ist a bug.&lt;/p&gt;

&lt;p&gt;BlogPost.php&lt;br/&gt;
&amp;lt;?php&lt;/p&gt;

&lt;p&gt;/** @Document */&lt;br/&gt;
class BlogPost&lt;br/&gt;
{&lt;br/&gt;
    /** @Id */&lt;br/&gt;
    public $id;&lt;/p&gt;

&lt;p&gt;    /** @String */&lt;br/&gt;
    public $title;&lt;/p&gt;

&lt;p&gt;    /** @String */&lt;br/&gt;
    public $content;&lt;/p&gt;

&lt;p&gt;    /** @String */&lt;br/&gt;
    public $createtime;&lt;/p&gt;

&lt;p&gt;    /** @String */&lt;br/&gt;
    public $updatetime;&lt;/p&gt;

&lt;p&gt;    /** @ReferenceMany(targetDocument=&quot;PostComment&quot;, mappedBy=&quot;post&quot;) */&lt;br/&gt;
    private $comments;&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;PostComment.php&lt;br/&gt;
&amp;lt;?php&lt;/p&gt;

&lt;p&gt;/** @Document */&lt;br/&gt;
class PostComment&lt;br/&gt;
{&lt;br/&gt;
    /** @Id */&lt;br/&gt;
    public $id;&lt;/p&gt;

&lt;p&gt;    /** @String */&lt;br/&gt;
    public $name;&lt;/p&gt;

&lt;p&gt;    /** @String */&lt;br/&gt;
    public $mail;&lt;/p&gt;

&lt;p&gt;    /** @String */&lt;br/&gt;
    public $content;&lt;/p&gt;

&lt;p&gt;    /** @String */&lt;br/&gt;
    public $createtime;&lt;/p&gt;

&lt;p&gt;    /** @String */&lt;br/&gt;
    public $updatetime;&lt;/p&gt;

&lt;p&gt;    /** @ReferenceOne(targetDocument=&quot;BlogPost&quot;, inversedBy=&quot;comments&quot;) */&lt;br/&gt;
    private $post;&lt;br/&gt;
}&lt;/p&gt;


&lt;p&gt;CommentController.php&lt;br/&gt;
        // Save the Post&lt;br/&gt;
        $post = new BlogPost();&lt;br/&gt;
        $post-&amp;gt;setTitle = &apos;testtitle&apos;;&lt;br/&gt;
        //$post-&amp;gt;content = &apos;testcontent&apos;;&lt;br/&gt;
        //$post-&amp;gt;createdate = time();&lt;/p&gt;

&lt;p&gt;        $comment1 = new PostComment();&lt;br/&gt;
        $comment1-&amp;gt;title = &apos;testcommenttitle1&apos;;&lt;/p&gt;

&lt;p&gt;        $comment2 = new PostComment();&lt;br/&gt;
        $comment2-&amp;gt;title = &apos;testcommenttitle2&apos;;&lt;/p&gt;

&lt;p&gt;        $comment3 = new PostComment();&lt;br/&gt;
        $comment3-&amp;gt;title = &apos;testcommenttitle3&apos;;&lt;/p&gt;

&lt;p&gt;        $dm-&amp;gt;persist($comment1);&lt;br/&gt;
        $dm-&amp;gt;persist($comment2);&lt;br/&gt;
        $dm-&amp;gt;persist($comment3);&lt;br/&gt;
        $dm-&amp;gt;flush();&lt;/p&gt;

&lt;p&gt;        echo $post-&amp;gt;id;&lt;/p&gt;

&lt;p&gt;        /*$posts = $dm-&amp;gt;createQueryBuilder(&apos;BlogPost&apos;)&lt;br/&gt;
                        -&amp;gt;getQuery();*/&lt;/p&gt;

&lt;p&gt;        $post = $dm-&amp;gt;getRepository(&apos;BlogPost&apos;)-&amp;gt;find(&apos;4dd45739f563724c23000002&apos;);&lt;/p&gt;

&lt;p&gt;        Zend_Debug::dump($post);&lt;br/&gt;
        $comments = $post-&amp;gt;getComments();&lt;/p&gt;

&lt;p&gt;------------------------&lt;br/&gt;
In the documentation the example is&lt;br/&gt;
$post1-&amp;gt;setUser($user);&lt;br/&gt;
But the only working for me is:&lt;br/&gt;
$post-&amp;gt;setTitle = &apos;testtitle&apos;;&lt;/p&gt;

&lt;p&gt;Anyway, I can&#180;t get the Comments from the mongodb.&lt;br/&gt;
I always get this error.&lt;br/&gt;
Fatal error: Call to undefined method BlogPost::getComments()&lt;br/&gt;
This is a correct error message because BlogPost really dont have a getComments()&lt;br/&gt;
method. How do I get my Comments then?&lt;br/&gt;
Any help would be great.&lt;/p&gt;

&lt;p&gt;Greetings tronga&lt;/p&gt;</description>
                <environment>Zend Framework 1.11.6</environment>
            <key id="12647">MODM-144</key>
            <summary>Bi-Directional References Feature</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="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="tronga">Jan Gantzert</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 May 2011 23:49:19 +0000</created>
                <updated>Wed, 18 May 2011 23:49:19 +0000</updated>
                                    <version>1.0.0BETA3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-145] QueryBuilder references() to does not support references on embedded objects&apos; fields</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-145</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;I noticed that the &lt;tt&gt;references()&lt;/tt&gt; method does not support fields on embedded objects, as the argument to the preceding &lt;tt&gt;field()&lt;/tt&gt; method will be passed into &lt;tt&gt;getFieldMapping()&lt;/tt&gt; and trigger an exception. I suppose a solution would require multiple calls to &lt;tt&gt;getFieldMapping()&lt;/tt&gt; in order to dive into the embedded object&apos;s class metadata.&lt;/p&gt;

&lt;p&gt;To demonstrate, below is an example of a &lt;tt&gt;UserRepository&lt;/tt&gt; class. The &lt;tt&gt;User&lt;/tt&gt; document contains an &lt;tt&gt;embeddedObject&lt;/tt&gt; that itself references another &lt;tt&gt;User&lt;/tt&gt;:&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 UserRepository &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; DocumentRepository
{ 
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function findByEmbeddedObjectReference(User $user)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;createQueryBuilder()
            -&amp;gt;field(&apos;embeddedObject.user.$id&apos;)-&amp;gt;equals($user-&amp;gt;getId())
&lt;span class=&quot;code-comment&quot;&gt;//          -&amp;gt;field(&apos;embeddedObject.user&apos;)-&amp;gt;references($user)
&lt;/span&gt;            -&amp;gt;getQuery()
            -&amp;gt;execute();
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Using &lt;tt&gt;field()/equals()&lt;/tt&gt; works fine as an alternative to &lt;tt&gt;references()&lt;/tt&gt;, so there is no urgent need for this feature.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12661">MODM-145</key>
            <summary>QueryBuilder references() to does not support references on embedded objects&apos; fields</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</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="jmikola">Jeremy Mikola</reporter>
                        <labels>
                    </labels>
                <created>Mon, 23 May 2011 16:22:55 +0000</created>
                <updated>Tue, 25 Oct 2011 13:56:55 +0000</updated>
                                                                    <component>Query Builder</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16696" author="neekobus" created="Tue, 25 Oct 2011 13:55:13 +0000"  >&lt;p&gt;Hi&lt;/p&gt;

&lt;p&gt;It seems that we have a problem with the temporary solution proposed :&lt;br/&gt;
Doctrine remove the &quot;$id&quot; part in our 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;   obj-&amp;gt;field(&apos;embedded.referenced.$id&apos;)-&amp;gt;equals($reference-&amp;gt;getId())
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;will generate the query without &quot;$id&quot;. &lt;br/&gt;
There is no problem when the reference is directly in the requested object.&lt;/p&gt;

&lt;p&gt;Did someone experience this issue ?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-163] @ReferenceMany and Inheritance</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-163</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;@ReferenceMany doesn&apos;t seem to work when used within a child class unless I specify @InheritanceType(&quot;CLASS_PER_COLLECTION&quot;) (which is fine b/c that works for our architecture)&lt;/p&gt;

&lt;p&gt;Here is an example from our code: &lt;/p&gt;

&lt;p&gt;//Parent Class&lt;/p&gt;

&lt;p&gt;use Doctrine\Common\Collections\ArrayCollection;&lt;/p&gt;

&lt;p&gt;/**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@Document(collection=&quot;homepages&quot;)&lt;/li&gt;
	&lt;li&gt;@ChangeTrackingPolicy(&quot;DEFERRED_IMPLICIT&quot;)&lt;/li&gt;
	&lt;li&gt;@Indexes({&lt;/li&gt;
	&lt;li&gt;@Index(keys=
{&quot;vertical&quot;=&quot;asc&quot;,&quot;ts&quot;=&quot;desc&quot;}
&lt;p&gt;, safe=&quot;true&quot;),&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;@Index(keys=
{&quot;ts&quot;=&quot;desc&quot;}
&lt;p&gt;, safe=&quot;true&quot;)&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;})&lt;br/&gt;
 */&lt;br/&gt;
class Homepage extends MappedDocument&lt;br/&gt;
{&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;//** References&lt;br/&gt;
	/**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@ReferenceMany(targetDocument=&quot;Post&quot;)&lt;/li&gt;
	&lt;li&gt;@var	list&amp;lt;Post&amp;gt;&lt;br/&gt;
	 */&lt;br/&gt;
	protected $touts;&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;}&lt;/p&gt;


&lt;p&gt;//Child Class&lt;br/&gt;
/**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@Document(collection=&quot;readmes&quot;)&lt;/li&gt;
	&lt;li&gt;@ChangeTrackingPolicy(&quot;DEFERRED_IMPLICIT&quot;)&lt;/li&gt;
	&lt;li&gt;@Indexes({&lt;/li&gt;
	&lt;li&gt;@Index(keys=
{&quot;vertical&quot;=&quot;asc&quot;}
&lt;p&gt;, safe=&quot;true&quot;)&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;})&lt;br/&gt;
 */&lt;br/&gt;
class Readme extends Homepage
{

//** References
	/**
	 * @ReferenceMany(targetDocument=&quot;Post&quot;)
	 * @var	list&amp;lt;Post&amp;gt;
	 */
	protected $more_touts;

}&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;If I don&apos;t add the @InheritanceType annotation the $more_touts data never gets persisted into the DB.&lt;br/&gt;
Other types such as @ReferenceOne all work just fine&lt;/p&gt;
</description>
                <environment>php 5.3 macosx 10.7.3   mongodb-odm 1.0 mongodb v2.0.2</environment>
            <key id="13485">MODM-163</key>
            <summary>@ReferenceMany and Inheritance</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="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="jsommerville">julie sommerville</reporter>
                        <labels>
                    </labels>
                <created>Thu, 1 Mar 2012 18:07:13 +0000</created>
                <updated>Thu, 1 Mar 2012 18:07:13 +0000</updated>
                                                                    <component>Persister</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-168] Can&apos;t Use Custom Repository Class for Embedded Doc When Using YAML Driver</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-168</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;When using the Yaml driver the ClassMetadata generation process won&apos;t create and use the indicated custom repository class for an embedded document. From what I can see digging into the actual code, it will work when using the Annotations or XML drivers, but in the Yaml driver the call to setCustomRepositoryClass is inside of a conditional that only gets entered if the document type is &apos;document&apos;.&lt;/p&gt;

&lt;p&gt;I&apos;m not completely sure, but from what I can see elsewhere in the code, it looks like mapped superclasses should also be able to have a custom repository class, but can&apos;t when using the Yaml driver. &lt;/p&gt;

&lt;p&gt;So I reckon what would work would be to change the code as indicated below:&lt;/p&gt;

&lt;p&gt;&amp;lt;&amp;lt;EXISTING CODE&amp;gt;&amp;gt;&lt;br/&gt;
//Doctrine/ODM/MongoDb/Mapping/Driver/YamlDriver.php, line 66&lt;br/&gt;
       if ($element&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;type&amp;#39;&amp;#93;&lt;/span&gt; == &apos;document&apos;) {&lt;br/&gt;
            if (isset($element&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;repositoryClass&amp;#39;&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
                $class-&amp;gt;setCustomRepositoryClass($element[&apos;repositoryClass&apos;]);
            }
&lt;p&gt;        } elseif ($element&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;type&amp;#39;&amp;#93;&lt;/span&gt; === &apos;mappedSuperclass&apos;) &lt;/p&gt;
{
            $class-&amp;gt;isMappedSuperclass = true;
        }
&lt;p&gt; elseif ($element&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;type&amp;#39;&amp;#93;&lt;/span&gt; === &apos;embeddedDocument&apos;) &lt;/p&gt;
{
            $class-&amp;gt;isEmbeddedDocument = true;
        }

&lt;p&gt;&amp;lt;&amp;lt;TO THIS&amp;gt;&amp;gt;&lt;br/&gt;
        if (isset($documentAnnot-&amp;gt;repositoryClass)) &lt;/p&gt;
{
            $class-&amp;gt;setCustomRepositoryClass($element[&apos;repositoryClass&apos;]);
        }</description>
                <environment></environment>
            <key id="13896">MODM-168</key>
            <summary>Can&apos;t Use Custom Repository Class for Embedded Doc When Using YAML Driver</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="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="isac1984">Isaac Foster</reporter>
                        <labels>
                    </labels>
                <created>Sun, 29 Jul 2012 23:42:17 +0000</created>
                <updated>Sun, 29 Jul 2012 23:42:17 +0000</updated>
                                                                    <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[MODM-169] Filter API is not unified between ODM and ORM</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-169</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I&apos;m implementing some functionality around filters which will ideally work for both ORM and ODM. The API for managing filters is different on `Doctrine\ORM\EntityManager` and `Doctrine\ODM\MongoDB\DocumentManager`, while the CouchDB implementation of ODM has no filter concept.&lt;/p&gt;

&lt;p&gt;For example, ORM EntityManager has getFilters(), hasFilters(), while ODM MongoDB DocumentManager has getFilterCollection().&lt;/p&gt;

&lt;p&gt;I was wondering what your thoughts were on defining the filter API in an interface, to improve consistency when implementing cross-library functionality?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Craig&lt;/p&gt;</description>
                <environment></environment>
            <key id="14301">MODM-169</key>
            <summary>Filter API is not unified between ODM and ORM</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</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="craigmarvelley">Craig Marvelley</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Dec 2012 14:42:18 +0000</created>
                <updated>Mon, 10 Dec 2012 14:42:18 +0000</updated>
                                                                    <component>Document Manager</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>