<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Wed Jun 19 04:08:29 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+%22Document+Manager%22+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+%22Document+Manager%22+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-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-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-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-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-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>