<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sun May 19 19:22:37 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+10032+AND+labels+%3D+collection&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+10032+AND+labels+%3D+collection</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="4" total="4"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DDC-2303] @param wrong in Doctrine\ORM\PersistentCollection::__constructor Edit</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2303</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When  i try to generate a new PersistentCollection like this: &lt;br/&gt;
###############################################&lt;br/&gt;
     $collection = new ArrayCollection();&lt;br/&gt;
     new \Doctrine\ORM\PersistentCollection(&lt;br/&gt;
				$this-&amp;gt;getEntityManager(),&lt;br/&gt;
				new ClassMetadata(&apos;&apos;),&lt;br/&gt;
				 $collection&lt;br/&gt;
			);&lt;br/&gt;
###############################################&lt;br/&gt;
i get an typ hinting error like &lt;br/&gt;
&lt;b&gt;&quot;Expected array, got &quot;Doctrine\Common\Collections\ArrayCollection&quot;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;This could be fixed by changing the type hinting for the Doctrine\ORM\PersistentCollection::__constructor  &lt;br/&gt;
_&lt;em&gt;From:&lt;/em&gt;_&lt;br/&gt;
###############################################&lt;br/&gt;
     /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Creates a new persistent collection.&lt;br/&gt;
     *&lt;/li&gt;
	&lt;li&gt;@param EntityManager $em    The EntityManager the collection will be associated with.&lt;/li&gt;
	&lt;li&gt;@param ClassMetadata $class The class descriptor of the entity type of this collection.&lt;/li&gt;
	&lt;li&gt;@param array       $coll  The collection elements.&lt;br/&gt;
     */&lt;br/&gt;
    public function __construct(EntityManager $em, $class, $coll)&lt;br/&gt;
    {
	&lt;ol&gt;
		&lt;li&gt;
		&lt;ol&gt;
			&lt;li&gt;
			&lt;ol&gt;
				&lt;li&gt;
				&lt;ol&gt;
					&lt;li&gt;
					&lt;ol&gt;
						&lt;li&gt;
						&lt;ol&gt;
							&lt;li&gt;
							&lt;ol&gt;
								&lt;li&gt;
								&lt;ol&gt;
									&lt;li&gt;
									&lt;ol&gt;
										&lt;li&gt;
										&lt;ol&gt;
											&lt;li&gt;
											&lt;ol&gt;
												&lt;li&gt;
												&lt;ol&gt;
													&lt;li&gt;
													&lt;ol&gt;
														&lt;li&gt;
														&lt;ol&gt;
															&lt;li&gt;
															&lt;ol&gt;
																&lt;li&gt;
																&lt;ol&gt;
																	&lt;li&gt;
																	&lt;ol&gt;
																		&lt;li&gt;
																		&lt;ol&gt;
																			&lt;li&gt;
																			&lt;ol&gt;
																				&lt;li&gt;
																				&lt;ol&gt;
																					&lt;li&gt;
																					&lt;ol&gt;
																						&lt;li&gt;
																						&lt;ol&gt;
																							&lt;li&gt;
																							&lt;ol&gt;
																								&lt;li&gt;
																								&lt;ol&gt;
																									&lt;li&gt;
																									&lt;ol&gt;
																										&lt;li&gt;
																										&lt;ol&gt;
																											&lt;li&gt;
																											&lt;ol&gt;
																												&lt;li&gt;
																												&lt;ol&gt;
																													&lt;li&gt;
																													&lt;ol&gt;
																														&lt;li&gt;
																														&lt;ol&gt;
																															&lt;li&gt;
																															&lt;ol&gt;
																																&lt;li&gt;
																																&lt;ol&gt;
																																	&lt;li&gt;
																																	&lt;ol&gt;
																																		&lt;li&gt;
																																		&lt;ol&gt;
																																			&lt;li&gt;
																																			&lt;ol&gt;
																																				&lt;li&gt;
																																				&lt;ol&gt;
																																					&lt;li&gt;
																																					&lt;ol&gt;
																																						&lt;li&gt;
																																						&lt;ol&gt;
																																							&lt;li&gt;
																																							&lt;ol&gt;
																																								&lt;li&gt;
																																								&lt;ol&gt;
																																									&lt;li&gt;
																																									&lt;ol&gt;
																																										&lt;li&gt;
																																										&lt;ol&gt;
																																											&lt;li&gt;
																																											&lt;ol&gt;
																																												&lt;li&gt;
																																												&lt;ol&gt;
																																													&lt;li&gt;
																																													&lt;ol&gt;
																																														&lt;li&gt;
																																														&lt;ol&gt;
																																															&lt;li&gt;&lt;p&gt;_&lt;em&gt;To:&lt;/em&gt;_&lt;br/&gt;
###############################################&lt;br/&gt;
     /**&lt;/p&gt;&lt;/li&gt;
																																														&lt;/ol&gt;
																																														&lt;/li&gt;
																																													&lt;/ol&gt;
																																													&lt;/li&gt;
																																												&lt;/ol&gt;
																																												&lt;/li&gt;
																																											&lt;/ol&gt;
																																											&lt;/li&gt;
																																										&lt;/ol&gt;
																																										&lt;/li&gt;
																																									&lt;/ol&gt;
																																									&lt;/li&gt;
																																								&lt;/ol&gt;
																																								&lt;/li&gt;
																																							&lt;/ol&gt;
																																							&lt;/li&gt;
																																						&lt;/ol&gt;
																																						&lt;/li&gt;
																																					&lt;/ol&gt;
																																					&lt;/li&gt;
																																				&lt;/ol&gt;
																																				&lt;/li&gt;
																																			&lt;/ol&gt;
																																			&lt;/li&gt;
																																		&lt;/ol&gt;
																																		&lt;/li&gt;
																																	&lt;/ol&gt;
																																	&lt;/li&gt;
																																&lt;/ol&gt;
																																&lt;/li&gt;
																															&lt;/ol&gt;
																															&lt;/li&gt;
																														&lt;/ol&gt;
																														&lt;/li&gt;
																													&lt;/ol&gt;
																													&lt;/li&gt;
																												&lt;/ol&gt;
																												&lt;/li&gt;
																											&lt;/ol&gt;
																											&lt;/li&gt;
																										&lt;/ol&gt;
																										&lt;/li&gt;
																									&lt;/ol&gt;
																									&lt;/li&gt;
																								&lt;/ol&gt;
																								&lt;/li&gt;
																							&lt;/ol&gt;
																							&lt;/li&gt;
																						&lt;/ol&gt;
																						&lt;/li&gt;
																					&lt;/ol&gt;
																					&lt;/li&gt;
																				&lt;/ol&gt;
																				&lt;/li&gt;
																			&lt;/ol&gt;
																			&lt;/li&gt;
																		&lt;/ol&gt;
																		&lt;/li&gt;
																	&lt;/ol&gt;
																	&lt;/li&gt;
																&lt;/ol&gt;
																&lt;/li&gt;
															&lt;/ol&gt;
															&lt;/li&gt;
														&lt;/ol&gt;
														&lt;/li&gt;
													&lt;/ol&gt;
													&lt;/li&gt;
												&lt;/ol&gt;
												&lt;/li&gt;
											&lt;/ol&gt;
											&lt;/li&gt;
										&lt;/ol&gt;
										&lt;/li&gt;
									&lt;/ol&gt;
									&lt;/li&gt;
								&lt;/ol&gt;
								&lt;/li&gt;
							&lt;/ol&gt;
							&lt;/li&gt;
						&lt;/ol&gt;
						&lt;/li&gt;
					&lt;/ol&gt;
					&lt;/li&gt;
				&lt;/ol&gt;
				&lt;/li&gt;
			&lt;/ol&gt;
			&lt;/li&gt;
		&lt;/ol&gt;
		&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
	&lt;li&gt;Creates a new persistent collection.&lt;br/&gt;
     *&lt;/li&gt;
	&lt;li&gt;@param EntityManager $em    The EntityManager the collection will be associated with.&lt;/li&gt;
	&lt;li&gt;@param ClassMetadata $class The class descriptor of the entity type of this collection.&lt;/li&gt;
	&lt;li&gt;@param \ArrayAccess $coll  The collection elements.&lt;br/&gt;
     */&lt;br/&gt;
    public function __construct(EntityManager $em, $class, $coll)&lt;br/&gt;
    {&lt;br/&gt;
###############################################&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
            <key id="14494">DDC-2303</key>
            <summary>@param wrong in Doctrine\ORM\PersistentCollection::__constructor Edit</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="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="datkind">Torsten Granek</reporter>
                        <labels>
                        <label>collection</label>
                    </labels>
                <created>Mon, 18 Feb 2013 15:27:10 +0000</created>
                <updated>Tue, 26 Feb 2013 08:47:07 +0000</updated>
                    <resolved>Tue, 26 Feb 2013 08:47:07 +0000</resolved>
                                                            <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19559" author="datkind" created="Mon, 18 Feb 2013 15:30:28 +0000"  >&lt;p&gt; When  i try to generate a new PersistentCollection like this: &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;

     $collection = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ArrayCollection();
     &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\ORM\PersistentCollection(
				$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getEntityManager(),
				&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ClassMetadata(&apos;&apos;),
				 $collection
			);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I get an typ hinting error like &lt;br/&gt;
&lt;b&gt;&quot;Expected array, got &quot;Doctrine\Common\Collections\ArrayCollection&quot;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;This could be fixed by changing the type hinting for the Doctrine\ORM\PersistentCollection::__constructor  &lt;br/&gt;
_&lt;em&gt;From:&lt;/em&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;
     /**
     * Creates a &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; persistent collection.
     *
     * @param EntityManager $em    The EntityManager the collection will be associated with.
     * @param ClassMetadata $class The class descriptor of the entity type of &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; collection.
     * @param array       $coll  The collection elements.
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __construct(EntityManager $em, $class, $coll)
    {
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;_&lt;em&gt;To:&lt;/em&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;
     /**
     * Creates a &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; persistent collection.
     *
     * @param EntityManager $em    The EntityManager the collection will be associated with.
     * @param ClassMetadata $class The class descriptor of the entity type of &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; collection.
     * @param \ArrayAccess $coll  The collection elements.
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __construct(EntityManager $em, $class, $coll)
    {

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="19564" author="stof" created="Mon, 18 Feb 2013 22:34:49 +0000"  >&lt;p&gt;There is no typehint in the PersistentCollection constructor. So the issue cannot come from this place (the phpdoc is wrong btw, it expects a Collection, not an array)&lt;/p&gt;

&lt;p&gt;Please give the full error, i.e. the message &lt;b&gt;and the location&lt;/b&gt; so that we can know where it happens.&lt;/p&gt;</comment>
                    <comment id="19570" author="datkind" created="Wed, 20 Feb 2013 07:53:14 +0000"  >&lt;p&gt;There error is not in the function declaration, it is in the @param in the doc block of the constructor.&lt;/p&gt;

&lt;p&gt;Using PHPStorm as IDE i got this error thrown by the IDE it self, not php. (Screenshot will be attached)&lt;/p&gt;

&lt;p&gt;Using ZF2 the error is on line 121 at:&lt;br/&gt;
vendor/doctrine/orm/lib/Doctrine/ORM/PersistentCollection.php &lt;/p&gt;</comment>
                    <comment id="19571" author="datkind" created="Wed, 20 Feb 2013 07:54:35 +0000"  >&lt;p&gt;Using PHPStorm as IDE i got &quot;Expected array, got &quot;Doctrine\Common\Collections\ArrayCollection&quot; thrown by the IDE it self, not php.&lt;/p&gt;</comment>
                    <comment id="19572" author="datkind" created="Wed, 20 Feb 2013 07:56:41 +0000"  >&lt;p&gt;Using PHPStorm as IDE i got &quot;Expected array, got &quot;Doctrine\Common\Collections\ArrayCollection&quot; thrown by the IDE it self, not php.&lt;/p&gt;</comment>
                    <comment id="19689" author="ocramius" created="Tue, 26 Feb 2013 08:47:07 +0000"  >&lt;p&gt;The correct type hint here is `Doctrine\Common\Collections\Collection`.&lt;/p&gt;

&lt;p&gt;I&apos;m closing this as invalid, since you shouldn&apos;t instantiate a persistent collection on your own. Consider opening a pull request at &lt;a href=&quot;https://github.com/doctrine/doctrine2&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2&lt;/a&gt; instead if you want to fix the typehint.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11381" name="screenshot-1.jpg" size="22940" author="datkind" created="Wed, 20 Feb 2013 07:56:41 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2255] [Doctrine-Bridge][Console] Entity, Getters and Setters Generating Bug detected in Symfony 2 Framework</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2255</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;h3&gt;&lt;a name=&quot;BugfoundwhengenerationtheEntity%2CGettersandSettersbyusingtheCommand%3A&quot;&gt;&lt;/a&gt;Bug found when generation the Entity, Getters and Setters by using the Command:&lt;/h3&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;
&amp;gt; php app/console doctrine:generate:entities YourBundleBundle:YourEntity 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In the situation you have a &lt;b&gt;OneToMany&lt;/b&gt; relation in the Entity and you did implement the &lt;b&gt;__construct()&lt;/b&gt;, then the Console &lt;b&gt;Wont&lt;/b&gt; generate the &lt;b&gt;ArrayCollection()&lt;/b&gt; !&lt;br/&gt;
In the case you did not implement the &lt;b&gt;__construct()&lt;/b&gt;, then everything will goes fine when generating them,&lt;br/&gt;
Example:&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;
/**
 * @ORM\OneToMany(targetEntity=&quot; YourBundleBundle \Entity\ YourEntity &quot;, mappedBy=&quot; YourEntity &quot;)
 */
private $YourAttribut;

public function __construct()
{
  $this-&amp;gt; YourAttribut = new \Doctrine\Common\Collections\ArrayCollection();
} 
// But in the case you did implement the __construct() before using the Command, let say like this:

public function __construct()
{
  $this-&amp;gt; YourOtherAttribut = a_value;
} 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In this case, when using the Command to generate Entity, Getters and Setters, the Console &lt;b&gt;Wont&lt;/b&gt; generate the &lt;b&gt;ArrayCollection()&lt;/b&gt; of the &lt;b&gt;OneToMany&lt;/b&gt; relations in the &lt;b&gt;__construct()&lt;/b&gt; !&lt;/p&gt;</description>
                <environment></environment>
            <key id="14408">DDC-2255</key>
            <summary>[Doctrine-Bridge][Console] Entity, Getters and Setters Generating Bug detected in Symfony 2 Framework</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="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="nayzo">Ala Eddine Khefifi</reporter>
                        <labels>
                        <label>collection</label>
                    </labels>
                <created>Thu, 24 Jan 2013 11:38:03 +0000</created>
                <updated>Thu, 24 Jan 2013 13:24:22 +0000</updated>
                    <resolved>Thu, 24 Jan 2013 12:26:39 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19398" author="ocramius" created="Thu, 24 Jan 2013 12:26:39 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=nayzo&quot; class=&quot;user-hover&quot; rel=&quot;nayzo&quot;&gt;Ala Eddine Khefifi&lt;/a&gt; This is expected behavior, since the generator should not change already existing methods&lt;/p&gt;</comment>
                    <comment id="19399" author="nayzo" created="Thu, 24 Jan 2013 12:50:41 +0000"  >&lt;p&gt;but it could override them and add missing instruction that should be added within the code, otherwise it leads to a dis-function and non stable relations !! &lt;/p&gt;</comment>
                    <comment id="19402" author="ocramius" created="Thu, 24 Jan 2013 13:24:22 +0000"  >&lt;p&gt;No, that is not up to the generator. Entity generation and fixing your broken existing code are different things. You should not rely on the generator to handle this kind of problems, the generator just gives you a kick-start, but after that, you are on your own.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2220] Add joins to Collection Filtering API</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2220</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The recently added collection filtering API only goes half way in achieving a full fledged solution to filter huge collections. It still lacks joins. Look at the next two snippets:&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;
    $criteria = Criteria::create()
        -&amp;gt;where(Criteria::expr()-&amp;gt;eq(&apos;storeId&apos;, $store-&amp;gt;getId()))
        -&amp;gt;andWhere(Criteria::expr()-&amp;gt;eq(&apos;Category&apos;, 20))
        -&amp;gt;orderBy(array(&apos;popularity&apos; =&amp;gt; &apos;DESC&apos;));
    &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;BrandCategories-&amp;gt;matching($criteria);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This piece of code works but what if there is a need to filter the BrandCategories collection by Categories with some extra criteria:&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;
    $criteria = Criteria::create()
        -&amp;gt;where(Criteria::expr()-&amp;gt;eq(&apos;storeId&apos;, $store-&amp;gt;getId()))
        -&amp;gt;andWhere(Criteria::expr()-&amp;gt;eq(&apos;Category&apos;, 20))
        -&amp;gt;andWhere(Criteria::expr()-&amp;gt;eq(&apos;Category.name&apos;, &apos;Electronics&apos;))
        -&amp;gt;orderBy(array(&apos;popularity&apos; =&amp;gt; &apos;DESC&apos;));
    &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;BrandCategories-&amp;gt;matching($criteria);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;That would not work.&lt;/p&gt;

&lt;p&gt;Ideally we should have a possibility to join other entities, the Category entity in our case here:&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;
    $criteria = Criteria::create()
        -&amp;gt;where(Criteria::expr()-&amp;gt;eq(&apos;storeId&apos;, $store-&amp;gt;getId()))
        -&amp;gt;andWhere(Criteria::expr()-&amp;gt;eq(&apos;Category&apos;, 20))
        -&amp;gt;innerJoin(Criteria::expr()-&amp;gt;field(&apos;Category&apos;, &apos;Category&apos;))
        -&amp;gt;andWhere(Criteria::expr()-&amp;gt;eq(&apos;Category.name&apos;, &apos;Electronics&apos;))
        -&amp;gt;orderBy(array(&apos;popularity&apos; =&amp;gt; &apos;DESC&apos;));
    &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;BrandCategories-&amp;gt;matching($criteria);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;What do you think about it, does it make sense to add such functionality?&lt;/p&gt;
</description>
                <environment></environment>
            <key id="14344">DDC-2220</key>
            <summary>Add joins to Collection Filtering API</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="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/inprogress.png">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="deatheriam">Oleg Namaka</reporter>
                        <labels>
                        <label>api</label>
                        <label>collection</label>
                        <label>filtering</label>
                    </labels>
                <created>Thu, 3 Jan 2013 01:46:59 +0000</created>
                <updated>Thu, 3 Jan 2013 20:21:21 +0000</updated>
                                    <version>2.3.1</version>
                                                        <due></due>
                    <votes>2</votes>
                        <watches>3</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2185] Better explain DQL &quot;WITH&quot; and implications for the collection filtering API</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2185</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Available documentation is a bit thin regarding the &quot;WITH&quot; clause on JOIN expressions. Only a single example is provided in&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://docs.doctrine-project.org/en/2.1/reference/dql-doctrine-query-language.html#dql-select-examples&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/en/2.1/reference/dql-doctrine-query-language.html#dql-select-examples&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WITH seems to allow to only &quot;partially&quot; load a collection, so the collection in memory does not fully represent the associations available in the database.&lt;/p&gt;

&lt;p&gt;The resulting collection is marked as &quot;initialized&quot; and it seems there is no way to tell later on whether/how (with which expression) the collection has been initialized.&lt;/p&gt;

&lt;p&gt;When using the collection filtering API, the &quot;initialized&quot; flag on the collection will lead to in-memory processing. If a collection has been loaded WITH a restricting clause and another filter is applied later, results may not be what one might expect.&lt;/p&gt;

&lt;p&gt;I assume this is by design (no idea how the collection could be &quot;partially&quot; loaded and behave correctly under all conditions), so filing it as a documentation issue.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14291">DDC-2185</key>
            <summary>Better explain DQL &quot;WITH&quot; and implications for the collection filtering API</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="mpdude">Matthias Pigulla</reporter>
                        <labels>
                        <label>collection</label>
                        <label>documentation</label>
                        <label>dql</label>
                        <label>filtering</label>
                    </labels>
                <created>Tue, 4 Dec 2012 11:35:02 +0000</created>
                <updated>Mon, 17 Dec 2012 14:07:03 +0000</updated>
                                    <version>2.2</version>
                                                <component>Documentation</component>
                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19153" author="mpdude" created="Mon, 17 Dec 2012 14:07:03 +0000"  >&lt;p&gt;An additional observation:&lt;/p&gt;

&lt;p&gt;If you eager-load a collection using WITH, for the resulting entities that collection is marked as initialized as described above.&lt;/p&gt;

&lt;p&gt;Should you happen to come across the same entity during hydration in another (later) context where you explicitly eager load the same association &lt;b&gt;without&lt;/b&gt; the WITH restriction (or with another one), the collection on that (existing) entity won&apos;t be re-initialized and still contains the associated objects found during the first query.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>