<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Fri May 24 18:56:55 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+MODM+AND+resolution+%3D+Unresolved+AND+component+%3D+Persister+ORDER+BY+priority+DESC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://www.doctrine-project.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Doctrine Project</title>
        <link>http://www.doctrine-project.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+MODM+AND+resolution+%3D+Unresolved+AND+component+%3D+Persister+ORDER+BY+priority+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="5" total="5"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<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-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-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-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-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>
</channel>
</rss>