<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu Jun 20 00:59:03 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+filtering&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+filtering</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="3" total="3"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DDC-2226] addFilterConstraint is called with wrong ClassMetadata, if Entity uses inheritance</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2226</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When using the filter system to modify the generated SQL the addFilterConstraint method always receives the metadata of the parent object. Both for Joined and Single Table Inheritance, which is not helpful if you want to do something based on the entity, but for example the parent entity does not fulfill the prequisites.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14363">DDC-2226</key>
            <summary>addFilterConstraint is called with wrong ClassMetadata, if Entity uses inheritance</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="pdobrigkeit">Philipp Dobrigkeit</reporter>
                        <labels>
                        <label>filtering</label>
                    </labels>
                <created>Wed, 9 Jan 2013 08:55:43 +0000</created>
                <updated>Sun, 13 Jan 2013 15:58:02 +0000</updated>
                    <resolved>Sun, 13 Jan 2013 08:39:26 +0000</resolved>
                            <version>2.3.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="19261" author="ocramius" created="Wed, 9 Jan 2013 08:59:24 +0000"  >&lt;p&gt;Can you add some example code?&lt;/p&gt;</comment>
                    <comment id="19262" author="pdobrigkeit" created="Wed, 9 Jan 2013 10:13:00 +0000"  >&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;ParentClass.php&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
namespace Entities;

/**
 * @Entity @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;parent_class&quot;&lt;/span&gt;)
 * @InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;SINGLE_TABLE&quot;&lt;/span&gt;)
 * @DiscriminatorColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;discr&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
 * @DiscriminatorMap({&lt;span class=&quot;code-quote&quot;&gt;&quot;parentclass&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;ParentClass&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;childclass&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;ChildClass&quot;&lt;/span&gt;})
 **/
class ParentClass {

    /**
     * @Id @GeneratedValue @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;
     **/
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;

}
&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;ChildClass.php&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
namespace Entities;

/**
 * @Entity
 **/
class ChildClass &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; ParentClass {

    /**
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     **/
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $foo;

}
&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;filter.php&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\ORM\Mapping\ClassMetaData,
    Doctrine\ORM\Query\Filter\SQLFilter;

class TestFilter &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; SQLFilter
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
    {
        print_r($targetEntity);
        exit;

        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &quot;&quot;;
    }
}
&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;index.php&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

require_once &lt;span class=&quot;code-quote&quot;&gt;&quot;vendor/autoload.php&quot;&lt;/span&gt;;

&lt;span class=&quot;code-comment&quot;&gt;// Create a simple &lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;&quot;&lt;/span&gt; Doctrine ORM configuration &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; XML Mapping
&lt;/span&gt;$isDevMode = &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;

$config = Setup::createAnnotationMetadataConfiguration(array(__DIR__.&lt;span class=&quot;code-quote&quot;&gt;&quot;/Entities&quot;&lt;/span&gt;), $isDevMode);
&lt;span class=&quot;code-comment&quot;&gt;//$config = Setup::createYAMLMetadataConfiguration(array(__DIR__.&lt;span class=&quot;code-quote&quot;&gt;&quot;/config/yaml&quot;&lt;/span&gt;), $isDevMode);
&lt;/span&gt;
&lt;span class=&quot;code-comment&quot;&gt;// database configuration parameters
&lt;/span&gt;$conn = array(
    &apos;driver&apos; =&amp;gt; &apos;pdo_sqlite&apos;,
    &apos;path&apos; =&amp;gt; __DIR__ . &apos;/db.sqlite&apos;,
);

&lt;span class=&quot;code-comment&quot;&gt;// obtaining the entity manager
&lt;/span&gt;$entityManager = \Doctrine\ORM\EntityManager::create($conn, $config);

require_once &lt;span class=&quot;code-quote&quot;&gt;&quot;Entities/ParentClass.php&quot;&lt;/span&gt;;
require_once &lt;span class=&quot;code-quote&quot;&gt;&quot;Entities/ChildClass.php&quot;&lt;/span&gt;;
require_once &lt;span class=&quot;code-quote&quot;&gt;&quot;filter.php&quot;&lt;/span&gt;;

$config-&amp;gt;addFilter(&lt;span class=&quot;code-quote&quot;&gt;&quot;test&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;TestFilter&quot;&lt;/span&gt;);

$filter = $entityManager-&amp;gt;getFilters()-&amp;gt;enable(&lt;span class=&quot;code-quote&quot;&gt;&quot;test&quot;&lt;/span&gt;);

$entityManager-&amp;gt;find(&apos;Entities\ChildClass&apos;, 1);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When doing this the filter is called, but with the ParentClass metadata. Looking into the source-code, both the SingleTablePersister:158 as well as the JoinedSubclassPersister:386 explicity change the metadata for the filter to the RootEntitiy, but there is no indication why this is done?! If there is a reason for doing so, it should also pass the child metadata, so the filter can actually work based on the queried entity, not the root entity only.&lt;/p&gt;</comment>
                    <comment id="19285" author="beberlei" created="Sat, 12 Jan 2013 09:03:06 +0000"  >&lt;p&gt;This is not a bug, its by design, see the documentation of filters.&lt;/p&gt;

&lt;p&gt;We cannot pass the child class, since there are common cases where using fields of the children will break the complete query.&lt;/p&gt;</comment>
                    <comment id="19289" author="pdobrigkeit" created="Sat, 12 Jan 2013 10:19:50 +0000"  >&lt;p&gt;I just read the documentation again.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Throughout this document the example MyLocaleFilter class will be used to illustrate how the filter feature works. A filter class must extend the base Doctrine\ORM\Query\Filter\SQLFilter class and implement the addFilterConstraint method. The method receives the ClassMetadata of the filtered entity and the table alias of the SQL table of the entity.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;it states that the method receives the ClassMetadata of the filtered entity, which the above shows is not true. My Filter is supposed to add security constraints and it is not possible to have explicit differences between for example the different &quot;Roles&quot;: &quot;Admin&quot; and &quot;User&quot;, because I would only get the ClassMetadata of &quot;Role&quot;.&lt;/p&gt;

&lt;p&gt;Would you be ok if there was an optional third parameter to the addFilterConstraint that passes the actual metadata and then I can check if that parameter is present?&lt;/p&gt;</comment>
                    <comment id="19290" author="pdobrigkeit" created="Sat, 12 Jan 2013 10:20:13 +0000"  >&lt;p&gt;See my comment&lt;/p&gt;</comment>
                    <comment id="19296" author="beberlei" created="Sun, 13 Jan 2013 08:39:26 +0000"  >&lt;p&gt;No that is not possible.&lt;/p&gt;

&lt;p&gt;As for the documentation, i fixed it in the following commit:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/orm-documentation/commit/47043a54a535941f5cdcdacb4a9dd2bb5de887c1&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/orm-documentation/commit/47043a54a535941f5cdcdacb4a9dd2bb5de887c1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I was pretty sure Alexander added that paragraph before, sorry to point you to the docs without rechecking first.&lt;/p&gt;</comment>
                    <comment id="19297" author="dershao" created="Sun, 13 Jan 2013 11:44:35 +0000"  >&lt;p&gt;Can you please be more specific or provide an example? Saying &quot;there are some edge cases&quot; does not clarify things. There seems to be a valid reason why the root is used instead of the entity, but it would be very helpful to know this for writing custom filters. &lt;/p&gt;</comment>
                    <comment id="19298" author="dershao" created="Sun, 13 Jan 2013 11:55:14 +0000"  >&lt;p&gt;And just to emphasise the importance: Afaik all filters (which I know) rely on the entity and not the root entity, like f.ex. the commonly used DoctrineExtensions: &lt;a href=&quot;https://github.com/l3pp4rd/DoctrineExtensions/blob/master/lib/Gedmo/SoftDeleteable/Filter/SoftDeleteableFilter.php&quot; class=&quot;external-link&quot;&gt;https://github.com/l3pp4rd/DoctrineExtensions/blob/master/lib/Gedmo/SoftDeleteable/Filter/SoftDeleteableFilter.php&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19299" author="asm89" created="Sun, 13 Jan 2013 13:08:03 +0000"  >&lt;p&gt;The problem is that with for example Joined Table Inheritance the tables of the child classes are outer/left joined. Adding a filter for those tables will result in filtering away the data of the joined table, not of the whole entity. Based on this we decided to implement only filtering on the root entity of the inheritance tree.&lt;/p&gt;

&lt;p&gt;Does this answer your question?&lt;/p&gt;</comment>
                    <comment id="19300" author="pdobrigkeit" created="Sun, 13 Jan 2013 13:20:17 +0000"  >&lt;p&gt;At least to some bit. But aren&apos;t the filters completely in user-land code and I would be responsible for making sure what I am doing? I. e. checking if I have a child entity at hand? You guys cannot be responsible for every mistake your users make and limiting the functionality in one of the (already) few extension points makes things harder for the developer. &lt;/p&gt;

&lt;p&gt;I understand that there might be cases when people implement a bad filter and things break down, but that can happen. &lt;/p&gt;

&lt;p&gt;For us this thing is related to the security of our complete application and it makes a huge difference if a user must be allowed to view every entity of a inheritance hierarchy or I can define on a much more granular level. And for using a filter to limit the result returned from the DB is the logical place to do so. &lt;/p&gt;

&lt;p&gt;I also would be happy to hear some kind of suggestion what I could do instead, not only a &quot;will not fix, not my problem&quot; kind of response &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/wink.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; &lt;/p&gt;

&lt;p&gt;Are there any filters implemented in the main ORM project?&lt;/p&gt;</comment>
                    <comment id="19301" author="beberlei" created="Sun, 13 Jan 2013 15:58:02 +0000"  >&lt;p&gt;No, that is not our opinion. The ORM is complicated and we don&apos;t make it even more complicated by allowing users to practically do everything they want. &lt;/p&gt;

&lt;p&gt;Filters and inheritance are common enough problems that we think this would occur relatively often and by the way this bug occurs it wouldn&apos;t even be apparent to probably most people. Thats a very dangerous setup we avoid by restricing the usage of this feature.&lt;/p&gt;

&lt;p&gt;Inheritance is overused in OOP applications and composition is much better in most cases anyways. With a model that is not using inheritance, you would not have this problem. With inheritance, you can still do filtering as long as the filtered properties are on the root of the inheritance hierachy.&lt;/p&gt;

&lt;p&gt;There are no filters in the main ORM.&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>