<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu May 23 12:50:07 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://doctrine-project.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+DDC+AND+resolution+%3D+Unresolved+ORDER+BY+updated+DESC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://doctrine-project.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Doctrine Project</title>
        <link>http://doctrine-project.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+DDC+AND+resolution+%3D+Unresolved+ORDER+BY+updated+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="366" total="366"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DDC-2467] Incorrect work with default values, indexes, autoincrement (patch attached)</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2467</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;If you use in your MySQL database default values, indexes or string primary key, you get incorrect mapping by mapping generator. For get it - just use in database one or more from listed abilities, generate mapping for that and then try to dump-sql with schema-tool:update.&lt;/p&gt;

&lt;p&gt;Hope you fix it. Tnx! &lt;img class=&quot;emoticon&quot; src=&quot;http://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;</description>
                <environment></environment>
            <key id="14982">DDC-2467</key>
            <summary>Incorrect work with default values, indexes, autoincrement (patch attached)</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="and">And</reporter>
                        <labels>
                    </labels>
                <created>Thu, 23 May 2013 07:18:52 +0000</created>
                <updated>Thu, 23 May 2013 07:33:00 +0000</updated>
                                    <version>2.3.4</version>
                                                <component>Mapping Drivers</component>
                <component>ORM</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20425" author="ocramius" created="Thu, 23 May 2013 07:33:00 +0000"  >&lt;p&gt;Marked as minor improvement - thank you for the patch!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11610" name="ORM.patch" size="5763" author="and" created="Thu, 23 May 2013 07:18:52 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2445] [GH-665] oo 	Add Null in ScalarExpression </title>
                <link>http://doctrine-project.org/jira/browse/DDC-2445</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of vahid-sohrabloo:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="14943">DDC-2445</key>
            <summary>[GH-665] oo 	Add Null in ScalarExpression </summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Sun, 12 May 2013 10:40:41 +0000</created>
                <updated>Wed, 22 May 2013 04:21:32 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20416" author="doctrinebot" created="Wed, 22 May 2013 04:21:32 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-665&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/665&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/665&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2464] useless index for the middle table of many-to-many relationship</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2464</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have entity A and B, the relationship between A and B is many-to-many. which means Doctrine2 will generate a middle table called AB for me.&lt;/p&gt;

&lt;p&gt;entity A:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
class Station {
    /**
     * @ORM\ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Fun&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;stations&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $funs;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;entity B:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
class Fun {
    /**
     * @ORM\ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Station&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;funs&quot;&lt;/span&gt;)
     * @ORM\JoinTable(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;stations_have_funs&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $stations;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;the schema of middle table stations_have_funs:&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;
CREATE TABLE `stations_have_funs` (
  `fun_id` &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(11) NOT NULL,
  `station_id` &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(11) NOT NULL,
  PRIMARY KEY (`fun_id`,`station_id`),
  KEY `IDX_45C921911CA4BE49` (`fun_id`),
  KEY `IDX_45C9219121BDB235` (`station_id`),
  CONSTRAINT `FK_45C921911CA4BE49` FOREIGN KEY (`fun_id`) REFERENCES `funs` (`id`) ON DELETE CASCADE,
  CONSTRAINT `FK_45C9219121BDB235` FOREIGN KEY (`station_id`) REFERENCES `stations` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;I noticed that there are 2 useless index(fun_id and station_id). Since fun_id and station_id are the primary key of this table. Do we really need 2 extra/duplicated index ?&lt;/p&gt;</description>
                <environment></environment>
            <key id="14975">DDC-2464</key>
            <summary>useless index for the middle table of many-to-many relationship</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="scourgen">scourgen</reporter>
                        <labels>
                        <label>ddl</label>
                        <label>schematool</label>
                    </labels>
                <created>Tue, 21 May 2013 09:34:54 +0000</created>
                <updated>Tue, 21 May 2013 09:44:10 +0000</updated>
                                    <version>Git Master</version>
                                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2462] [GH-674] Shortcut for force</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2462</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of TorbenBr:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="14970">DDC-2462</key>
            <summary>[GH-674] Shortcut for force</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Mon, 20 May 2013 08:07:09 +0000</created>
                <updated>Mon, 20 May 2013 15:44:48 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2463] [GH-675] Implementation for &apos;IsNot&apos;-Comparison</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2463</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of pmattmann:&lt;/p&gt;

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

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

&lt;p&gt;See PR (&lt;a href=&quot;https://github.com/doctrine/collections/pull/11&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/collections/pull/11&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;This is the required implementation for &apos;IsNotNull&apos;-Filters in Collection-Filtering.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14972">DDC-2463</key>
            <summary>[GH-675] Implementation for &apos;IsNot&apos;-Comparison</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Mon, 20 May 2013 11:19:03 +0000</created>
                <updated>Mon, 20 May 2013 11:19:03 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2461] [GH-673] Namespace based command names</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2461</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of hell0w0rd:&lt;/p&gt;

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

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

&lt;p&gt;Symfony console supports auto completion:&lt;br/&gt;
``orm:generate:entities`` could called ``o:g:e``&lt;/p&gt;</description>
                <environment></environment>
            <key id="14969">DDC-2461</key>
            <summary>[GH-673] Namespace based command names</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="4" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Fri, 17 May 2013 22:12:50 +0000</created>
                <updated>Fri, 17 May 2013 23:01:44 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20397" author="doctrinebot" created="Fri, 17 May 2013 22:17:25 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-673&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/673&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/673&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20398" author="ocramius" created="Fri, 17 May 2013 22:17:42 +0000"  >&lt;p&gt;BC break without advantages&lt;/p&gt;</comment>
                    <comment id="20399" author="doctrinebot" created="Fri, 17 May 2013 22:55:30 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-673&amp;#93;&lt;/span&gt; was reopened:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/673&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/673&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2460] [GH-672] Simplification example</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2460</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of hell0w0rd:&lt;/p&gt;

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

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

&lt;p&gt;Remove doctrine class loader, one bootstrap file&lt;/p&gt;</description>
                <environment></environment>
            <key id="14968">DDC-2460</key>
            <summary>[GH-672] Simplification example</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Fri, 17 May 2013 21:46:17 +0000</created>
                <updated>Fri, 17 May 2013 21:46:17 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2459] ANSI compliant quote strategy.</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2459</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In order to simplify and speed up the sql generation&lt;br/&gt;
an ANSI quote strategy would be useful.&lt;/p&gt;

&lt;p&gt;The implementation would be something like :&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;
&amp;lt;?php
class AnsiQuoteStrategy &lt;span class=&quot;code-keyword&quot;&gt;implements&lt;/span&gt; \Doctrine\ORM\Mapping\QuoteStrategy
{
    /**
     * {@inheritdoc}
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getColumnName($fieldName, ClassMetadata $class, AbstractPlatform $platform)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $class-&amp;gt;fieldMappings[$fieldName][&apos;columnName&apos;];
    }

    /**
     * {@inheritdoc}
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getTableName(ClassMetadata $class, AbstractPlatform $platform)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $class-&amp;gt;table[&apos;name&apos;];
    }

    /**
     * {@inheritdoc}
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getSequenceName(array $definition, ClassMetadata $class, AbstractPlatform $platform)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $definition[&apos;sequenceName&apos;];
    }

    /**
     * {@inheritdoc}
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getJoinColumnName(array $joinColumn, ClassMetadata $class, AbstractPlatform $platform)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $joinColumn[&apos;name&apos;];
    }

    /**
     * {@inheritdoc}
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getReferencedJoinColumnName(array $joinColumn, ClassMetadata $class, AbstractPlatform $platform)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $joinColumn[&apos;referencedColumnName&apos;];
    }

    /**
     * {@inheritdoc}
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getJoinTableName(array $association, ClassMetadata $class, AbstractPlatform $platform)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $association[&apos;joinTable&apos;][&apos;name&apos;];
    }

    /**
     * {@inheritdoc}
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getIdentifierColumnNames(ClassMetadata $class, AbstractPlatform $platform)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $class-&amp;gt;identifier;
    }

    /**
     * {@inheritdoc}
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getColumnAlias($columnName, $counter, AbstractPlatform $platform, ClassMetadata $class = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $platform-&amp;gt;getSQLResultCashing($columnName . $counter);
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14967">DDC-2459</key>
            <summary>ANSI compliant quote strategy.</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="fabio.bat.silva">Fabio B. Silva</reporter>
                        <labels>
                    </labels>
                <created>Fri, 17 May 2013 17:31:41 +0000</created>
                <updated>Fri, 17 May 2013 17:35:45 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2456] [GH-669] Fixed generating column names for self referencing entity.</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2456</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of hason:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="14964">DDC-2456</key>
            <summary>[GH-669] Fixed generating column names for self referencing entity.</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Fri, 17 May 2013 10:11:02 +0000</created>
                <updated>Fri, 17 May 2013 10:11:02 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2454] To-Many OrderBy mechanism should allow many-to-one associations</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2454</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
class ProductCategory
{
    /**
     * Store
     *
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Store
     *
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Store&quot;&lt;/span&gt;)
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;store_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;store_id&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $Store;

    /**
     * storeId (&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ordering in Product::ProductCategories only)
     *
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; integer
     *
     * @ORM\Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;store_id&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $storeId;
...

class Product
{
    /**
     * Associated categories
     *
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; \Doctrine\Common\Collections\Collection
     *
     * @ORM\OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;ProductCategory&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;Product&quot;&lt;/span&gt;)
     * @ORM\OrderBy({&lt;span class=&quot;code-quote&quot;&gt;&quot;storeId&quot;&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;ASC&quot;&lt;/span&gt;})
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $ProductCategories;
}
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;If it is possible now to sort the ProductCategories collection by the storeId field, it should also be possible to sort them by the Store association. Currently a set of two fields is required: Store as a regular Many-To-One association and if a need arises to be able to use it to sort the One-To-Many collections then storeId needs to be added to the ProductCategory entity. In that case the ProductCategory entity does not pass the schema validation but is perfectly usable.&lt;/p&gt;

&lt;p&gt;This should be allowed:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
class Product
{
    /**
     * Associated categories
     *
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; \Doctrine\Common\Collections\Collection
     *
     * @ORM\OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;ProductCategory&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;Product&quot;&lt;/span&gt;)
     * @ORM\OrderBy({&lt;span class=&quot;code-quote&quot;&gt;&quot;Store&quot;&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;ASC&quot;&lt;/span&gt;})
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $ProductCategories;
}

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14961">DDC-2454</key>
            <summary>To-Many OrderBy mechanism should allow many-to-one associations</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="deatheriam">Oleg Namaka</reporter>
                        <labels>
                        <label>association</label>
                        <label>orderBy</label>
                    </labels>
                <created>Thu, 16 May 2013 16:55:59 +0000</created>
                <updated>Thu, 16 May 2013 17:27:53 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2455] Setting classes in the entity manager</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2455</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am creating my own bundle in Sf2 which will be used for third libraries, but I need to provide some simple and complex queries from this. &lt;br/&gt;
For simple queries i have no problem because I set the repository with the class from the third library.&lt;br/&gt;
Something like this:&lt;/p&gt;

&lt;p&gt;    $this-&amp;gt;repository = $this-&amp;gt;em-&amp;gt;getRepository($className);&lt;br/&gt;
    $result = $this-&amp;gt;repository&lt;br/&gt;
                -&amp;gt;createQueryBuilder(&quot;c&quot;)&lt;br/&gt;
                -&amp;gt;select(&apos;c, d, e&apos;)&lt;br/&gt;
                -&amp;gt;join(&quot;c.groups&quot;, &quot;d&quot;)&lt;br/&gt;
                -&amp;gt;join(&quot;d.users&quot;, &quot;e&quot;)&lt;br/&gt;
                -&amp;gt;where(&quot;e.id = :userId&quot;)&lt;br/&gt;
                -&amp;gt;setParameter(&quot;userId&quot;, $userId);&lt;/p&gt;

&lt;p&gt;    return $result-&amp;gt;getQuery()-&amp;gt;getResult();&lt;/p&gt;

&lt;p&gt;But when I need complex queries i have to work with the Entity Manager instead of working with the Repository. So tables are named as MyBundle (Group), but not how the third library named (sf_group). As a consequence the SQL throws an error saying that my table does not exist.&lt;br/&gt;
This is how I am trying to retrieve:&lt;/p&gt;

&lt;p&gt;    $query = $this-&amp;gt;em-&amp;gt;createQuery(&quot;SELECT p FROM Groups p&quot;);&lt;/p&gt;

&lt;p&gt;I sent the className as the entity to avoid this. Something like:&lt;/p&gt;

&lt;p&gt;    $query = $this-&amp;gt;em-&amp;gt;createQuery(&quot;SELECT p FROM &quot;.$this-&amp;gt;className.&quot; p&quot;);&lt;/p&gt;

&lt;p&gt;However i need a lot of queries with JOINs, so i would have to change every entity name, which is not convenient.&lt;/p&gt;

&lt;p&gt;What another way could I implemment this?&lt;/p&gt;

&lt;p&gt;Thanks for your help.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14962">DDC-2455</key>
            <summary>Setting classes in the entity manager</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="pcastrotigre">Petter Castro</reporter>
                        <labels>
                        <label>entitymanager</label>
                    </labels>
                <created>Thu, 16 May 2013 17:02:30 +0000</created>
                <updated>Thu, 16 May 2013 17:02:30 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2452] Additional `WITH` condition in joins between JTI roots cause invalid SQL to be produced</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2452</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Given a simple Joined Table Inheritance like following:&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;
/**
 * @Entity @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;foo&quot;&lt;/span&gt;) @InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;JOINED&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;foo&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;DDC2452Foo&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;bar&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;DDC2452Bar&quot;&lt;/span&gt;})
 */
class DDC2452Foo
{
    /** @Id @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;) @GeneratedValue */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $id;
}

/** @Entity @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;bar&quot;&lt;/span&gt;) */
class DDC2452Bar &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; DDC2452Foo
{
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Following DQL&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;SELECT foo1 FROM DDC2452Foo foo1 JOIN DDC2452Foo foo2 WITH 1=1&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Will produce broken SQL:&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;SELECT
    f0_.id AS id0, f0_.discr AS discr1 
FROM 
    foo f0_ 
LEFT JOIN bar b1_ 
    ON f0_.id = b1_.id 
LEFT JOIN foo f2_ 
LEFT JOIN bar b3_ 
    ON f2_.id = b3_.id 
    ON (1 = 1)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;(please note the duplicate `ON` in the SQL)&lt;/p&gt;

&lt;p&gt;That is caused because of the SQL walker producing the JTI filter with already the `ON` clause in it.&lt;/p&gt;

&lt;p&gt;That happens because the JTI join conditions are added in &lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/2.4.0-BETA2/lib/Doctrine/ORM/Query/SqlWalker.php#L823-L825&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/2.4.0-BETA2/lib/Doctrine/ORM/Query/SqlWalker.php#L823-L825&lt;/a&gt; (`walkRangeVariableDeclaration`), while the additional defined `WITH` conditions are considered in `walkJoinAssociationDeclaration` later on.&lt;/p&gt;

&lt;p&gt;Added a test case and fix at &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/668&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/668&lt;/a&gt;&lt;/p&gt;</description>
                <environment>irrelevant</environment>
            <key id="14958">DDC-2452</key>
            <summary>Additional `WITH` condition in joins between JTI roots cause invalid SQL to be produced</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="ocramius">Marco Pivetta</reporter>
                        <labels>
                        <label>dql</label>
                        <label>sql-walker</label>
                    </labels>
                <created>Thu, 16 May 2013 14:05:48 +0000</created>
                <updated>Thu, 16 May 2013 16:23:40 +0000</updated>
                                    <version>Git Master</version>
                                <fixVersion>2.4</fixVersion>
                                <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2449] Amazon Redshift Support</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2449</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It would be nice to get doctrine compatible with Amazon Redshift. It uses a Postgres connector but there are some differences. I&apos;m currently facing an issue with the primary id, in Redshift the generation of an id is different from Postgres and so I&apos;m getting errors associated with generating an id.&lt;/p&gt;

&lt;p&gt;Here are some references that might be useful:&lt;br/&gt;
node-orm faced the same issue and seems like they figured it out: &lt;a href=&quot;https://github.com/dresende/node-orm2/issues/39&quot; class=&quot;external-link&quot;&gt;https://github.com/dresende/node-orm2/issues/39&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Amazon Manual:&lt;br/&gt;
&lt;a href=&quot;http://awsdocs.s3.amazonaws.com/redshift/latest/redshift-dg.pdf&quot; class=&quot;external-link&quot;&gt;http://awsdocs.s3.amazonaws.com/redshift/latest/redshift-dg.pdf&lt;/a&gt;&lt;/p&gt;</description>
                <environment>Amazon Redshift</environment>
            <key id="14955">DDC-2449</key>
            <summary>Amazon Redshift Support</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="10000" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="kfuchs">Kirill F</reporter>
                        <labels>
                    </labels>
                <created>Wed, 15 May 2013 23:08:21 +0000</created>
                <updated>Wed, 15 May 2013 23:09:12 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2052] Custom tree walkers are not allowed to add new components to the query</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2052</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Custom tree walkers have freedom in modifying the AST but when you try to add a new query component (i.e. new join in walkSelectStatement() ) to the AST then the SqlWalker throws an exception because it does not has the new component in its _queryComponents array. I see two possible ways to resolve this:&lt;br/&gt;
1. Modify the Parser class in order to allow tree walkers to modify queryComponents and pass changed queryComponents to the SqlWalker&lt;br/&gt;
2. Improve SqlWalker so it can extract and prepare needed information about queryComponent based on AST when it does not have them.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14085">DDC-2052</key>
            <summary>Custom tree walkers are not allowed to add new components to the query</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="4" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="chives">&#321;ukasz Cybula</reporter>
                        <labels>
                        <label>dql</label>
                    </labels>
                <created>Tue, 2 Oct 2012 13:30:45 +0000</created>
                <updated>Tue, 14 May 2013 18:18:10 +0000</updated>
                                    <version>2.3</version>
                                <fixVersion>2.4</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="18789" author="beberlei" created="Sat, 6 Oct 2012 09:07:58 +0000"  >&lt;p&gt;Ok this is much more complicated to allow then i thought. The problem is that the QueryComponents are passed by value, as an array, not by reference. That prevents changing them because this change wouldn&apos;t be visible in the output walker.&lt;/p&gt;

&lt;p&gt;I can add a method to allow this in the OutputWalker for now, but generally this requires a bigger refactoring on the Query Components.&lt;/p&gt;</comment>
                    <comment id="18790" author="beberlei" created="Sat, 6 Oct 2012 09:15:39 +0000"  >&lt;p&gt;Added setQueryComponent() in SQL Walker to allow modification in output walker.&lt;/p&gt;</comment>
                    <comment id="18805" author="chives" created="Mon, 8 Oct 2012 10:47:08 +0000"  >&lt;p&gt;I&apos;m afraid that this doesn&apos;t solve the initial problem at all. I&apos;ll try to describe it in more details to show what I mean. Suppose we have two doctrine extensions each of which contain its own tree walker. Each of these tree walkers need to modify AST and add new component to it (joined with some component already existing in the query). The first problem is that each tree walker has its own queryComponents array which is not passed between them, although they not necessary need to use queryComponents - they could use only AST. The second, bigger problem is that the Parser class does not know anything about modifications of queryComponents in tree walkers and cannot pass modified version to the OutputWalker. The goal of submitting this issue was to allow adding new components to the query in tree walkers which is not achievable by your fix. I think it may be the first step in the right direction. Maybe TreeWalkerAdapter should have public method getQueryComponents() which would be used by the Parser to pass modified queryComponents between different tree walkers and finally to the OutputWalker ? This would not break backward compatibility and solve this issue. What do you think about it?&lt;/p&gt;</comment>
                    <comment id="18806" author="chives" created="Mon, 8 Oct 2012 13:43:37 +0000"  >&lt;p&gt;I&apos;ve tried to implement the solution mentioned in previous comment but it&apos;s also not so clean and easy as I thought. Each tree walker (including TreeWalkerChain) would have to implement getQueryComponents() and setQueryComponent($alias, array $component) methods. The same with SqlWalker, so the TreeWalker interface should have these methods, which would break BC in some way (walkers that do not inherit from SqlWalker or TreeWalkerAdapter will fail to compile). So maybe my first solution (PR #464) is not so bad for now? In the future queryComponents could be replaced by a special object or could be passed by a reference to allow modifications.&lt;/p&gt;</comment>
                    <comment id="20247" author="beberlei" created="Thu, 9 May 2013 15:32:15 +0000"  >&lt;p&gt;Marked as improvement as its not a bug.&lt;/p&gt;

&lt;p&gt;A solution might probably implement an object holding all the QueryComponent, implementing ArrayAccess. So that way the state can be shared.&lt;/p&gt;</comment>
                    <comment id="20379" author="ocramius" created="Tue, 14 May 2013 18:02:22 +0000"  >&lt;p&gt;Just hit this while developing an ast walker... Will look into it too since I need it more than soon.&lt;/p&gt;</comment>
                    <comment id="20380" author="ocramius" created="Tue, 14 May 2013 18:17:26 +0000"  >&lt;p&gt;As a VERY UGLY workaround, I used a static variable and a custom sql walker in combination with my AST walker.&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;

namespace Comcom\Versioning\ORM\Query;


use Doctrine\ORM\Query\SqlWalker;

class WorkaroundSqlWalker &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; SqlWalker
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __construct($query, $parserResult, array $queryComponents)
    {
        parent::__construct($query, $parserResult, $queryComponents);

        foreach (VersionWalker::$additionalAliases as $alias =&amp;gt; $value) {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;setQueryComponent($alias, $value);
        }
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2448] orm:schema-tool:update reports already updated NUMERIC fields</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2448</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have a table defined in this way:&lt;/p&gt;

&lt;p&gt;CREATE TABLE `my_table` (&lt;br/&gt;
  `id` int(10) NOT NULL AUTO_INCREMENT,&lt;br/&gt;
  `subtotal` decimal(10,2) DEFAULT NULL,&lt;br/&gt;
  PRIMARY KEY (`id`)&lt;br/&gt;
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;&lt;/p&gt;

&lt;p&gt;When I run&lt;br/&gt;
    php doctrine.php  orm:schema-tool:update --dump-sql&lt;/p&gt;

&lt;p&gt;I get&lt;br/&gt;
ALTER TABLE my_table CHANGE subtotal subtotal NUMERIC(10, 2) DEFAULT NULL;&lt;/p&gt;

&lt;p&gt;While of course the field is already updated. The same happens in SQL Server 2008 and Postgres 9.&lt;/p&gt;</description>
                <environment>PHP 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli) (built: Mar 11 2013 14:31:48) &lt;br/&gt;
Mysql version: 5.5.31-0ubuntu0.12.04.1 (Ubuntu)</environment>
            <key id="14948">DDC-2448</key>
            <summary>orm:schema-tool:update reports already updated NUMERIC fields</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="osvi">Francesco Montefoschi</reporter>
                        <labels>
                    </labels>
                <created>Tue, 14 May 2013 09:09:13 +0000</created>
                <updated>Tue, 14 May 2013 09:09:13 +0000</updated>
                                    <version>2.3.4</version>
                                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2429] Association-Override Problem in XSD Mapping?</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2429</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;From a mailinglist entry:&lt;/p&gt;

&lt;p&gt;I use Doctrine 2.3 in Symfony 2.1.8&lt;/p&gt;

&lt;p&gt;I&apos;m using association-overrides in the XML format between several entities. Eclipse shows up several errors.&lt;/p&gt;

&lt;p&gt;The first error message is shown in every Doctrine file when I declare the file format as such (for example: &lt;a href=&quot;https://github.com/thewholelifetolearn/Social-Library/blob/master/src/SocialLibrary/ReadBundle/Resources/config/doctrine/GraphicNovel.orm.xml&quot; class=&quot;external-link&quot;&gt;https://github.com/thewholelifetolearn/Social-Library/blob/master/src/SocialLibrary/ReadBundle/Resources/config/doctrine/GraphicNovel.orm.xml&lt;/a&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;
&amp;lt;?xml version=&lt;span class=&quot;code-quote&quot;&gt;&quot;1.0&quot;&lt;/span&gt; encoding=&lt;span class=&quot;code-quote&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;?&amp;gt;
&amp;lt;doctrine-mapping xmlns=&lt;span class=&quot;code-quote&quot;&gt;&quot;http:&lt;span class=&quot;code-comment&quot;&gt;//doctrine-project.org/schemas/orm/doctrine-mapping&quot;&lt;/span&gt;
&lt;/span&gt;                  xmlns:xsi=&lt;span class=&quot;code-quote&quot;&gt;&quot;http:&lt;span class=&quot;code-comment&quot;&gt;//www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;
&lt;/span&gt;                  xsi:schemaLocation=&quot;http:&lt;span class=&quot;code-comment&quot;&gt;//doctrine-project.org/schemas/orm/doctrine-mapping
&lt;/span&gt;                  http:&lt;span class=&quot;code-comment&quot;&gt;//doctrine-project.org/schemas/orm/doctrine-mapping.xsd&quot;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Eclipse shows this error : &lt;br/&gt;
White spaces are required between  publicId and systemId&lt;/p&gt;

&lt;p&gt;The error points to the &quot;doctrine-mapping&quot; line&lt;/p&gt;



&lt;p&gt;The second error comes up when I change the doctype to (file example: &lt;a href=&quot;https://gist.github.com/thewholelifetolearn/5462057&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/thewholelifetolearn/5462057&lt;/a&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;
&amp;lt;?xml version=&lt;span class=&quot;code-quote&quot;&gt;&quot;1.0&quot;&lt;/span&gt; encoding=&lt;span class=&quot;code-quote&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;?&amp;gt;
&amp;lt;doctrine-mapping xmlns=&lt;span class=&quot;code-quote&quot;&gt;&quot;http:&lt;span class=&quot;code-comment&quot;&gt;//doctrine-project.org/schemas/orm/doctrine-mapping&quot;&lt;/span&gt;
&lt;/span&gt;                  xmlns:xsi=&lt;span class=&quot;code-quote&quot;&gt;&quot;http:&lt;span class=&quot;code-comment&quot;&gt;//www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;
&lt;/span&gt;                  xsi:schemaLocation=&quot;http:&lt;span class=&quot;code-comment&quot;&gt;//doctrine-project.org/schemas/orm/doctrine-mapping
&lt;/span&gt;                  https:&lt;span class=&quot;code-comment&quot;&gt;//raw.github.com/doctrine/doctrine2/master/doctrine-mapping.xsd&quot;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But then this error is shown:&lt;br/&gt;
cvc-complex-type.2.4.b: The content of element &apos;association-overrides&apos; is not complete. One of &apos;&lt;/p&gt;
{&quot;http://doctrine-project.org/schemas/orm/doctrine-mapping&quot;:association-override, WC[##other:&quot;http://doctrine-project.org/schemas/orm/doctrine-mapping&quot;]}
&lt;p&gt;&apos; is expected.&lt;/p&gt;

&lt;p&gt;The error points on &quot;&amp;lt;association-overrides&amp;gt;&quot; in Novel.orm.xml (line 8)&lt;/p&gt;


&lt;p&gt;Could someone explain me the errors that show up? The first error doesn&apos;t seem to disturb Symfony2 but the second messes around the console commands. But it still generates the database.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14831">DDC-2429</key>
            <summary>Association-Override Problem in XSD Mapping?</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 5 May 2013 16:44:40 +0000</created>
                <updated>Mon, 13 May 2013 16:26:27 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2446] [GH-666] [DDC-2429] Fix xsd definition</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2446</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of FabioBatSilva:&lt;/p&gt;

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

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

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2429&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2429&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14944">DDC-2446</key>
            <summary>[GH-666] [DDC-2429] Fix xsd definition</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Mon, 13 May 2013 14:14:11 +0000</created>
                <updated>Mon, 13 May 2013 14:14:11 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1970] DiscriminatorMap recursion when using self-reference</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1970</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;ve ran into a problem with self-referencing entity. When fetching an entity, recursion occurs, fetching every related entity defined by ManyToOne relation&lt;br/&gt;
(in this example $sponsor), ignoring LAZY or EXTRA_LAZY fetch mode - it executes numerous queries.&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;
/**
 * @ORM\Entity(repositoryClass=&lt;span class=&quot;code-quote&quot;&gt;&quot;Acme\Bundle\UserBundle\Entity\Repository\UserRepository&quot;&lt;/span&gt;)
 * @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;f_user&quot;&lt;/span&gt;)
 * @ORM\InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;JOINED&quot;&lt;/span&gt;)
 * @ORM\DiscriminatorColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
 * @ORM\DiscriminatorMap({&lt;span class=&quot;code-quote&quot;&gt;&quot;user_person&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;UserPerson&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;user_company&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;UserCompany&quot;&lt;/span&gt;})
 */
&lt;span class=&quot;code-keyword&quot;&gt;abstract&lt;/span&gt; class UserBase &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; FOSUser

/* .... */

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; UserBase
     *
     * @ORM\OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;UserBase&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;sponsor&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $referrals;

    /**
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;UserBase&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;referrals&quot;&lt;/span&gt;)
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;sponsor_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $sponsor;

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13942">DDC-1970</key>
            <summary>DiscriminatorMap recursion when using self-reference</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="kolah">Krzysztof Kolasiak</reporter>
                        <labels>
                    </labels>
                <created>Mon, 6 Aug 2012 18:54:11 +0000</created>
                <updated>Fri, 10 May 2013 15:29:53 +0000</updated>
                                    <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="18504" author="asm89" created="Tue, 14 Aug 2012 20:17:31 +0000"  >&lt;p&gt;I have changed this into a feature request because you have hit the limitations of using inheritance and self referencing entities.&lt;/p&gt;

&lt;p&gt;Doctrine2 cannot currently lazy load UserBase#$sponsor because we don&apos;t know which proxy we have to insert. It can either be UserPerson or UserCompany. In order to know this Doctrine2 &lt;em&gt;has&lt;/em&gt; to query the actual object to determine its type. The current strategy is then to load the actual entity because we have all data anyway.&lt;/p&gt;

&lt;p&gt;In order to implement this feature we need to insert a proxy instead of the actual entity. If we do that there should be no recursion happening.&lt;/p&gt;</comment>
                    <comment id="19577" author="ocramius" created="Thu, 21 Feb 2013 09:55:30 +0000"  >&lt;p&gt;Reduced priority&lt;/p&gt;</comment>
                    <comment id="20266" author="notprathap" created="Fri, 10 May 2013 15:29:53 +0000"  >&lt;p&gt;It&apos;d be great if this is a configurable option.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1884] leftJoin via composite key part not hydrated if joining table solely consists of identifiers</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1884</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Suppose I have the following entities:
&lt;br class=&quot;atl-forced-newline&quot; /&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;/**
 * @ORM\Entity
 * @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;driver&quot;&lt;/span&gt;)
 */
class Driver
{
    /**
     * @ORM\Id
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     * @ORM\GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;AUTO&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;
    
    /**
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, length=255);
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $name;
    
    /**
     * @ORM\OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;DriverRide&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;driver&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $driverRides;
}
&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;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * @ORM\Entity
 * @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;driver_ride&quot;&lt;/span&gt;)
 */
class DriverRide
{
    /**
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Driver&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;driverRides&quot;&lt;/span&gt;)
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;driver_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $driver;
    
    /**
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Car&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;carRides&quot;&lt;/span&gt;)
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;car&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;brand&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $car;
}
&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;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * @ORM\Entity
 * @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;car&quot;&lt;/span&gt;)
 */
class Car
{
    /**
     * @ORM\Id
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, length=25)
     * @ORM\GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;NONE&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $brand;
    
    /**
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, length=255);
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $model;
    
    /**
     * @ORM\OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;DriverRide&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;car&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $carRides;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And want to query for Cars that a Driver drove in:
&lt;br class=&quot;atl-forced-newline&quot; /&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;$qb = $em-&amp;gt;createQueryBuilder();

$qb-&amp;gt;select(&apos;d, dr, c&apos;)
   -&amp;gt;from(&apos;Driver&apos;, &apos;d&apos;)
   -&amp;gt;leftJoin(&apos;d.driverRides&apos;, &apos;dr&apos;)
   -&amp;gt;leftJoin(&apos;dr.car&apos;, &apos;c&apos;)
   -&amp;gt;where(&apos;d.id = ?1&apos;) /* some Driver id */
   -&amp;gt;getQuery()-&amp;gt;getArrayResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;b&gt;Expected results:&lt;/b&gt;&lt;br/&gt;
I expect to get an array with an index &apos;driverRides&apos; with an array of Cars (depending on the data of course).&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Actual result:&lt;/b&gt;&lt;br/&gt;
Just an array with Driver data.&lt;/p&gt;

&lt;p&gt;When I started doing some testing I found out I get a different result when I add a third column to the DriverRide table that isn&apos;t part of the composite primary key.&lt;br/&gt;
Now I did get a &apos;driverRides&apos; array, but with just a single row and not three as I expected to get in my case.&lt;/p&gt;

&lt;p&gt;When I removed the composite key and used an auto-generated id-column, everything worked as expected.&lt;/p&gt;

&lt;p&gt;Some test data you might want to use:&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;INSERT INTO `car` (`brand`, `model`) VALUES
(&apos;BMW&apos;, &apos;7 Series&apos;),
(&apos;Crysler&apos;, &apos;300&apos;),
(&apos;Mercedes&apos;, &apos;C-&lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt;&apos;),
(&apos;Volvo&apos;, &apos;XC90&apos;);

INSERT INTO `driver` (`id`, `name`) VALUES
(1, &apos;John Doe&apos;),
(2, &apos;Foo Bar&apos;);

INSERT INTO `driver_ride` (`driver_id`, `car`) VALUES
(1, &apos;Crysler&apos;),
(1, &apos;Mercedes&apos;),
(1, &apos;Volvo&apos;),
(2, &apos;BMW&apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>MAMP</environment>
            <key id="13791">DDC-1884</key>
            <summary>leftJoin via composite key part not hydrated if joining table solely consists of identifiers</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://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="scoolen">Sander Coolen</reporter>
                        <labels>
                    </labels>
                <created>Wed, 20 Jun 2012 15:06:08 +0000</created>
                <updated>Thu, 9 May 2013 22:14:27 +0000</updated>
                                    <version>2.2.0-RC1</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18195" author="beberlei" created="Thu, 5 Jul 2012 19:11:27 +0000"  >&lt;p&gt;Can you update to at least 2.2.1 and try again, because this fix here &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1652&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1652&lt;/a&gt; look like it could be related to your problem.&lt;/p&gt;</comment>
                    <comment id="18224" author="scoolen" created="Sat, 7 Jul 2012 14:46:47 +0000"  >&lt;p&gt;We&apos;re already using the 2.2.x-dev package. It does look similar to &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1652&quot; title=&quot;ArrayHydrator with composite primary key&quot;&gt;&lt;del&gt;DDC-1652&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18241" author="scoolen" created="Sun, 8 Jul 2012 12:34:57 +0000"  >&lt;p&gt;Added testcase on 2.1.x (not the right one unfortunately) branch: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/395&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/395&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;BTW I was adding said testcase on master and got an error similar to &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-979&quot; title=&quot;ArrayHydrator::updateResultPointer() must be an array, string given&quot;&gt;&lt;del&gt;DDC-979&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20261" author="beberlei" created="Thu, 9 May 2013 22:14:27 +0000"  >&lt;p&gt;I upgraded the testcase to master locally, and it seems to fail on Array hydration only now, with a notice:&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;Exception: [PHPUnit_Framework_Error] Argument 1 passed to Doctrine\ORM\Internal\Hydration\ArrayHydrator::updateResultPointer() must be of the type array, string given, called in /home/benny/code/php/workspace/doctrine2/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php on line 196 and defined
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I remember fixing something similar for ObjectHydration (which works for your testcases). Will investigate more when I have time.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2441] Incorrect SQL Query being generated</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2441</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The following DQL :&lt;/p&gt;

&lt;p&gt;SELECT s,ba,c,mno,ss,sws,ccs,cns,cws FROM WLCoreBundle:SIM s INNER JOIN s.billingAccount ba LEFT JOIN s.connection c INNER JOIN s.status ss LEFT JOIN s.workflowStatus sws INNER JOIN c.customerStatus ccs INNER JOIN c.networkStatus cns LEFT JOIN c&lt;br/&gt;
.workflowStatus cws INNER JOIN s.mno mno ORDER BY c.msisdn ASC&lt;/p&gt;

&lt;p&gt;Produces the following SQL :&lt;/p&gt;

&lt;p&gt;SELECT * FROM (SELECT c0_.id AS id0, c0_.iccid AS iccid1, c0_.created AS created2, c0_.updated AS updated3, c0_.spreference AS spreference4, c1_.id ASid5, c1_.account_number AS account_number6, c1_.name AS name7, c1_.address1 AS address18, c1_.address2 AS address29, c1_.address3 AS address310, c1_.address4 AS address411, c1_.address5 AS address512, c1_.address6 AS address613, c1_.email_address AS email_address14, c1_.spreference AS spreference15, c2_.id AS id16, c2_.msisdn AS msisdn17, c2_.local AS local18, c2_.imsi AS imsi19, c2_.data AS data20, c2_.fax AS fax21, c2_.api AS api22, c2_.activation_date AS activation_date23, c2_.contract_end_date AS contract_end_date24, c2_.created AS created25, c2_.updated AS updated26, c2_.spreference AS spreference27, c3_.id AS id28, c3_.ident AS ident29, c3_.label AS label30, c3_.description AS description31, c4_.id AS id32, c4_.ident AS ident33, c4_.label AS label34, c4_.description AS description35, c4_.customer_label AS customer_label36, c4_.customer_description AS customer_description37, c5_.id AS id38, c5_.ident AS ident39, c5_.label AS label40, c5_.description AS description41, c6_.id AS id42, c6_.ident AS ident43, c6_.label AS label44, c6_.description AS description45, c7_.id AS id46, c7_.ident AS ident47, c7_.label AS label48, c7_.description AS description49, c7_.customer_label AS customer_label50, c7_.customer_description AS customer_description51, c8_.id AS id52, c8_.name AS name53, c8_.email_address AS email_address54, c8_.is_active AS is_active55, c8_.spreference AS spreference56, c0_.billing_account AS billing_account57, c0_.customerHierarchy AS customerHierarchy58, c0_.mno AS mno59, c0_.status AS status60, c0_.workflow_status AS workflow_status61, c1_.customer_hierarchy AS customer_hierarchy62, c1_.country AS country63, c1_.tax_rate AS tax_rate64, c1_.currency AS currency65, c1_.status AS status66, c1_.priority AS priority67, c2_.sim AS sim68, c2_.customer_status AS customer_status69, c2_.network_status AS network_status70, c2_.workflow_status AS workflow_status71, ROW_NUMBER() OVER (ORDER BY msisdn17 ASC) AS doctrine_rownum FROM core_sim c0_ WITH (NOLOCK) INNER JOIN core_billing_account c1_ ON c0_.billing_account = c1_.id LEFT JOIN core_connection c2_ ON c0_.id = c2_.sim INNER JOIN core_sim_status c3_ ON c0_.status = c3_.id LEFT JOIN core_sim_workflow_status c4_ ON c0_.workflow_status = c4_.id INNER JOIN core_connection_customer_status c5_ ON c2_.customer_status = c5_.id INNER JOIN core_connection_network_status c6_ ON c2_.network_status = c6_.id LEFT JOIN core_connection_workflow_status c7_ ON c2_.workflow_status = c7_.id INNER JOIN core_mno c8_ ON c0_.mno = c8_.id) AS doctrine_tbl WHERE doctrine_rownum BETWEEN 1 AND 10&lt;/p&gt;

&lt;p&gt;Which returns an error :&lt;/p&gt;

&lt;p&gt; SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;42S22&amp;#93;&lt;/span&gt;: &lt;span class=&quot;error&quot;&gt;&amp;#91;Microsoft&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;SQL Server Native Client 11.0&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;SQL Server&amp;#93;&lt;/span&gt;Invalid column name &apos;msisdn17&apos;.&lt;/p&gt;

&lt;p&gt;Same query works fine in Doctrine 2.3&lt;/p&gt;</description>
                <environment>Using Doctrine in Symfony 2.2.1 on Windows Platform</environment>
            <key id="14847">DDC-2441</key>
            <summary>Incorrect SQL Query being generated</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="1" iconUrl="http://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="manseuk">Paul Mansell</reporter>
                        <labels>
                    </labels>
                <created>Thu, 9 May 2013 16:31:03 +0000</created>
                <updated>Thu, 9 May 2013 21:33:34 +0000</updated>
                                    <version>2.4</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2281] Validation against database-first generated xml requires that the column order within a composite primary key match the order the columns are in in mapping xml</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2281</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In using a database-first approach utilizing orm:convert-mapping to generate xml, the validation and schema-tool reports that my composite primary key (ex. Columns A, C, B) be dropped and added in the order in which the mapping appears in the xml (ex. Columns A, B, C).&lt;/p&gt;

&lt;p&gt;These columns are not auto-increment and are simply a mixture of int and varchar.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14460">DDC-2281</key>
            <summary>Validation against database-first generated xml requires that the column order within a composite primary key match the order the columns are in in mapping xml</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="10000" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="mcaden">Aaron Moore</reporter>
                        <labels>
                    </labels>
                <created>Wed, 6 Feb 2013 18:26:47 +0000</created>
                <updated>Thu, 9 May 2013 16:30:08 +0000</updated>
                                    <version>2.3.2</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20253" author="beberlei" created="Thu, 9 May 2013 16:20:59 +0000"  >&lt;p&gt;Is the composite key a mix of association and field types?&lt;/p&gt;</comment>
                    <comment id="20254" author="mcaden" created="Thu, 9 May 2013 16:30:08 +0000"  >&lt;p&gt;I&apos;m trying to remember the usage as it was a short term project but I believe it is.&lt;/p&gt;

&lt;p&gt;For example a user has a userid.&lt;/p&gt;

&lt;p&gt;The table in question might have a primary key consisting of the userid and an int representing a year..&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2339] [GH-605] DDC-2338 Added failing test for composite foreign key persistance</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2339</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of alex88:&lt;/p&gt;

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

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

&lt;p&gt;I&apos;ve added this test regarding ticket &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-2338&quot; title=&quot;Entity with composite foreign keys identifiers should be persisted after related entities without exception&quot;&gt;DDC-2338&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14675">DDC-2339</key>
            <summary>[GH-605] DDC-2338 Added failing test for composite foreign key persistance</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Mar 2013 09:40:17 +0000</created>
                <updated>Thu, 9 May 2013 15:23:13 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20246" author="beberlei" created="Thu, 9 May 2013 15:23:13 +0000"  >&lt;p&gt;This is documented behavior and would just be an improvement&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2190] findBy() support finding by a single DateTime but not by multiple DateTime</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2190</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The following code works:&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;$repository-&amp;gt;findBy(array(&apos;date&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \DateTime()))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;but the following code fails as it does not apply the conversion of the &lt;tt&gt;date&lt;/tt&gt; type for each element:&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;$repository-&amp;gt;findBy(array(&apos;date&apos; =&amp;gt; array(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \DateTime(), &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \DateTime(&apos;tomorrow&apos;)))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14297">DDC-2190</key>
            <summary>findBy() support finding by a single DateTime but not by multiple DateTime</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="stof">Christophe Coevoet</reporter>
                        <labels>
                    </labels>
                <created>Thu, 6 Dec 2012 17:39:00 +0000</created>
                <updated>Thu, 9 May 2013 12:47:37 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19228" author="beberlei" created="Sun, 6 Jan 2013 09:48:39 +0000"  >&lt;p&gt;This is actually very hard to implement, the problem is that we only have ARRAY constants for PDO::PARAM_INT and PDO::PARAM_STR - all the other types would require special handling.&lt;/p&gt;</comment>
                    <comment id="20241" author="beberlei" created="Thu, 9 May 2013 12:47:37 +0000"  >&lt;p&gt;Attaching failing testcase.&lt;/p&gt;

&lt;p&gt;The idea is to have something like &quot;datetime[]&quot; as type and detect this in the SQLParserUtils of DBAL.&lt;/p&gt;

&lt;p&gt;Another approach would be to convert the values in the ORM already, before passing to the DBAL.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11526" name="DDC2190Test.php" size="569" author="beberlei" created="Thu, 9 May 2013 12:47:37 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2411] Null values get reset when rehydrating an already managed entity</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2411</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Scenario:&lt;/p&gt;

&lt;p&gt;1) You have an entity with a ManyToOne relation (and probably other kinds too, but this is all I have tested) to another entity which is nullable. For example, let&apos;s say you have a Book entity which has an &quot;illustrator&quot; field which refers to a Person entity, representing the person who illustrated the book. If the book is not illustrated then you set the field to null.&lt;/p&gt;

&lt;p&gt;2) You fetch a Book (by ID) which has its illustrator set to a particular Person.&lt;/p&gt;

&lt;p&gt;3) You set that Book&apos;s illustrator to null.&lt;/p&gt;

&lt;p&gt;4) Without flushing, you fetch the Book again, using different criteria: for example, by title. Because entities are Identity Mapped, this will run a query but then locate the same instance in memory, and try to hydrate that instance with the old data it just fetched.&lt;/p&gt;

&lt;p&gt;5) Any fields on the instance that have modified values retain their new values (for example, if we changed the illustrator to a different Person, this would be retained), BUT any fields on the instance which are null get overwritten with the old data (so if we previously set the illustrator to null, without flushing, it would now be reset to the Person value that it had before).&lt;/p&gt;

&lt;p&gt;There seems to be a mistaken assumption here that null values are fields that have not been hydrated, when this is not necessarily the case. Is this the intended behaviour?&lt;/p&gt;

&lt;p&gt;The code that causes this behaviour is here: &lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/e561f47cb2205565eb873f0643637477bfcfc2ff/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php#L471&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/e561f47cb2205565eb873f0643637477bfcfc2ff/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php#L471&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are wondering why anybody would want to fetch the entity again in step 4, my use case for this is the Symfony Validator (but I presume there could be others).&lt;/p&gt;

&lt;p&gt;If there are any unique constraints (Symfony ones, not Doctrine ones) on the entity, e.g. if we had a unique constraint on the Book title field, then when validating the Book the Symfony Validator would check if there are already any Book entities with the same title as the Book we&apos;re validating. It will find the Book that we are working with, and because entities are identity mapped, it will act upon the same instance, and the situation above occurs.&lt;/p&gt;

&lt;p&gt;Code example:&lt;/p&gt;

&lt;p&gt;&amp;lt;?php&lt;/p&gt;

&lt;p&gt;// Create some entities&lt;/p&gt;

&lt;p&gt;$john = new Person();&lt;br/&gt;
$john-&amp;gt;setName(&apos;John Smith&apos;);&lt;/p&gt;

&lt;p&gt;$jane = new Person();&lt;br/&gt;
$jane-&amp;gt;setName(&apos;Jane Jones&apos;);&lt;/p&gt;

&lt;p&gt;$joe = new Person();&lt;br/&gt;
$joe-&amp;gt;setName(&apos;Joe Bloggs&apos;);&lt;/p&gt;

&lt;p&gt;$book = new Book();&lt;br/&gt;
$book-&amp;gt;setId(123);&lt;br/&gt;
$book-&amp;gt;setTitle(&apos;Book Title&apos;);&lt;br/&gt;
$book-&amp;gt;setIllustrator($john);&lt;br/&gt;
$book-&amp;gt;setAuthor($jane);&lt;/p&gt;

&lt;p&gt;$em-&amp;gt;persist($john);&lt;br/&gt;
$em-&amp;gt;persist($jane);&lt;br/&gt;
$em-&amp;gt;persist($joe);&lt;br/&gt;
$em-&amp;gt;persist($book);&lt;br/&gt;
$em-&amp;gt;flush();&lt;/p&gt;

&lt;p&gt;// Now let&apos;s try modifying the book&lt;/p&gt;

&lt;p&gt;$book = $bookRepository-&amp;gt;find(123);&lt;br/&gt;
$book-&amp;gt;getIllustrator(); // returns Person &quot;John Smith&quot;&lt;br/&gt;
$book-&amp;gt;getAuthor(); // returns Person &quot;Jane Jones&quot;&lt;/p&gt;

&lt;p&gt;// make some changes&lt;br/&gt;
$book-&amp;gt;setIllustrator(null); // illustrator is now null&lt;br/&gt;
$book-&amp;gt;setAuthor($joe); // author is now &quot;Joe Bloggs&quot;&lt;/p&gt;

&lt;p&gt;// now validate our changes with Symfony Validator&lt;br/&gt;
// note: the same effect can also be observed with&lt;br/&gt;
//     $test = $bookRepository-&amp;gt;findBy(&apos;title&apos;, &apos;Book Title&apos;);&lt;br/&gt;
$validator-&amp;gt;validate($book);&lt;/p&gt;

&lt;p&gt;// what happened to our book??&lt;br/&gt;
$book-&amp;gt;getIllustrator(); // returns Person &quot;John Smith&quot; &amp;lt;- should be null&lt;br/&gt;
$book-&amp;gt;getAuthor(); // returns Person &quot;Joe Bloggs&quot; &amp;lt;- correctly retains the new value&lt;/p&gt;</description>
                <environment></environment>
            <key id="14801">DDC-2411</key>
            <summary>Null values get reset when rehydrating an already managed entity</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="sgarner">Simon Garner</reporter>
                        <labels>
                        <label>hydration</label>
                    </labels>
                <created>Tue, 23 Apr 2013 12:37:56 +0000</created>
                <updated>Thu, 9 May 2013 10:31:16 +0000</updated>
                                    <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="20100" author="fabio.bat.silva" created="Wed, 24 Apr 2013 18:48:14 +0000"  >&lt;p&gt;Hi Simon,&lt;/p&gt;

&lt;p&gt;Could you please try to write a &lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1509Test.php&quot; class=&quot;external-link&quot;&gt;failing test case&lt;/a&gt; or paste your entities ?&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;</comment>
                    <comment id="20235" author="beberlei" created="Thu, 9 May 2013 10:31:16 +0000"  >&lt;p&gt;Verified by code review that this issue exists, but it will be very tricky to fix, because the null check is there for other reasons as well.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2147] Custom annotation in MappedSuperclass</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2147</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When you try use custom annotation in mappedsuperclass like here &lt;a href=&quot;http://pastebin.com/YMxKvcLk&quot; class=&quot;external-link&quot;&gt;http://pastebin.com/YMxKvcLk&lt;/a&gt; and then i try get metadata for class i get this error &lt;br/&gt;
Undefined index: fieldName&lt;br/&gt;
ClassMetadataInfo.php  function addInheritedFieldMapping&lt;br/&gt;
Problem is that custom annotation doesnt have fieldName. &lt;br/&gt;
Quick fix is add condition to test if fieldName isset. &lt;/p&gt;</description>
                <environment>Linux 3.6.6-1.fc17.x86_64</environment>
            <key id="14227">DDC-2147</key>
            <summary>Custom annotation in MappedSuperclass</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="10000" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="kluk">kluk</reporter>
                        <labels>
                    </labels>
                <created>Thu, 15 Nov 2012 07:46:38 +0000</created>
                <updated>Tue, 7 May 2013 21:24:53 +0000</updated>
                                    <version>2.2.1</version>
                                                <component>Mapping Drivers</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="18988" author="kluk" created="Thu, 15 Nov 2012 09:24:39 +0000"  >&lt;p&gt;error log from orm:validate-schema&lt;/p&gt;</comment>
                    <comment id="19373" author="ocramius" created="Wed, 23 Jan 2013 21:47:56 +0000"  >&lt;p&gt;Copying from pastebin:&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;
use \Doctrine\ORM\Mapping as ORM;
use \xxx\Doctrine\Annotation\Entity as re;
use \xxx\Doctrine\Annotation\Forms as rf;
use \Doctrine\Common\Collections;
 
/**
 * @ORM\Entity
 */
class EventPicture &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; \Picture
{
 
    /**
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Event&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;eventPicture&quot;&lt;/span&gt;)
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;FK_Event&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $event;
 
}
&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;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
use \Doctrine\ORM\Mapping as ORM;
use \xxx\Doctrine\Annotation\Entity as re;
use \xxx\Doctrine\Annotation\Forms as rf;
use \Doctrine\Common\Collections;
 
/** @ORM\MappedSuperclass */
class Picture &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; \xxx\Doctrine\Entity\BaseEntity
{
 
    /**
     * @ORM\Id
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     * @ORM\GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;IDENTITY&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; type
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;
 
    /**
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;,unique=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     *  @rf\FileUpload(fileSize=&lt;span class=&quot;code-quote&quot;&gt;&quot;php&quot;&lt;/span&gt;,uploadType=&lt;span class=&quot;code-quote&quot;&gt;&quot;local&quot;&lt;/span&gt;,fieldName=&lt;span class=&quot;code-quote&quot;&gt;&quot;link&quot;&lt;/span&gt;,formControl=&lt;span class=&quot;code-quote&quot;&gt;&quot;FileUploadField&quot;&lt;/span&gt;,image=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
     *
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $link;
 
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=kluk&quot; class=&quot;user-hover&quot; rel=&quot;kluk&quot;&gt;kluk&lt;/a&gt; does this happen also with any other simple custom annotation? For example following:&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;
/**
 * @Annotation 
 * @Target({&lt;span class=&quot;code-quote&quot;&gt;&quot;PROPERTY&quot;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&quot;ANNOTATION&quot;&lt;/span&gt;})
 */
&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; class Entity &lt;span class=&quot;code-keyword&quot;&gt;implements&lt;/span&gt; Annotation
{
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $value;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="19438" author="kluk" created="Wed, 30 Jan 2013 08:28:42 +0000"  >&lt;p&gt;the same error when using simple annotation.&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; 
&amp;lt;?php

use \Doctrine\ORM\Mapping as ORM;
use \xxx\Doctrine\Annotation\Entity as re;
use \xxx\Doctrine\Annotation\Forms as rf;
use \Doctrine\Common\Collections;

/** @ORM\MappedSuperclass */
class Picture extends \xxx\Doctrine\Entity\BaseEntity {

    /**
     * @ORM\Id
     * @ORM\Column(type=&quot;integer&quot;)
     * @ORM\GeneratedValue(strategy=&quot;IDENTITY&quot;)
     * @var type
     */
    protected $id;

   
    /**
     * @ORM\Column(type=&quot;integer&quot;)
     * @rf\SetClass({&quot;class&quot;,&quot;hide&quot;})
     */
    public $value;

    /**
     * @ORM\Column(type=&quot;string&quot;,unique=true, nullable=true)
     * @rf\FileUpload(fileSize=&quot;php&quot;,uploadType=&quot;local&quot;,fieldName=&quot;link&quot;,formControl=&quot;FileUploadField&quot;,image=true)
     *
     */
    protected $link;

}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 


&lt;p&gt;When i remove $value , $picture from class everything goes ok.&lt;br/&gt;
Easy fix for me is change ClassMetadataInfo.&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;
    /**
     * INTERNAL:
     * Adds a field mapping without completing/validating it.
     * This is mainly used to add inherited field mappings to derived classes.
     *
     * @param array $fieldMapping
     *
     * @return void
     */
    public function addInheritedFieldMapping(array $fieldMapping)
    {
        if(isset($fieldMapping[&apos;fieldName&apos;])){
        $this-&amp;gt;fieldMappings[$fieldMapping[&apos;fieldName&apos;]] = $fieldMapping;
        $this-&amp;gt;columnNames[$fieldMapping[&apos;fieldName&apos;]] = $fieldMapping[&apos;columnName&apos;];
        $this-&amp;gt;fieldNames[$fieldMapping[&apos;columnName&apos;]] = $fieldMapping[&apos;fieldName&apos;];
        }
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;But i dont know if this fix can break another part of doctrine.&lt;/p&gt;</comment>
                    <comment id="20211" author="beberlei" created="Sat, 4 May 2013 12:31:51 +0000"  >&lt;p&gt;Can you put the code of your annotations online? I can&apos;t seem to understand why this happens.&lt;/p&gt;</comment>
                    <comment id="20226" author="kluk" created="Tue, 7 May 2013 21:24:53 +0000"  >&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unable to find source-code formatter for language: php.&lt;/span&gt; Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml&lt;/div&gt;&lt;pre&gt; 
namespace libs\Doctrine\Annotation\Entity;
use Doctrine\Common\Annotations\Annotation;

/** @Annotation */
class CustomMapping &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Annotation
{
    /**
     *
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $className;
    /**
     * 
     * 
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; IQueryable| string
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $dataSource;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; </comment>
                </comments>
                    <attachments>
                    <attachment id="11349" name="error.log" size="2364" author="kluk" created="Thu, 15 Nov 2012 09:24:39 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2424] Removing an inherited entity via a delete cascade constraint does not remove the parent row</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2424</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;For a parent class:&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;
/**
 * @ORM\Entity
 * @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;Base&quot;&lt;/span&gt;)
 * @ORM\InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;JOINED&quot;&lt;/span&gt;)
 * @ORM\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;)
 * @ORM\DiscriminatorMap({&lt;span class=&quot;code-quote&quot;&gt;&quot;child1&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;Child1&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;child2&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;Child2&quot;&lt;/span&gt;})
 */
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and simple Child1 &amp;amp; Child2 entities.&lt;/p&gt;

&lt;p&gt;With another entity (let&apos;s call it ExternalEntity) having a bidirectional OneToOne relation owned by Child1:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
class Child1 &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Base
{
  /**
   * @ORM\OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;ExternalEntity&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;xxx&quot;&lt;/span&gt;)
   * @ORM\JoinColumn(onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
   */
   &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; theForeignKey;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Enough for the context.&lt;br/&gt;
The symptoms:&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;$em-&amp;gt;remove(instanceOfExternalEntity);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt; removes the ExternalEntity row and the Child1 row. But a dangling row in the Base table is still there for the now inexistent Child1 instance.&lt;/p&gt;

&lt;p&gt;Though, a manual delete of either the associated Child1 OR Base row and then the ExternalEntity works.&lt;/p&gt;

&lt;p&gt;The problem with the cascading deletion of the parent seems to be only present when deleting through a MYSQL cascading delete from another row which has a foreign key on a child. (Not tested with a foreign key on the parent though)&lt;/p&gt;
</description>
                <environment>Mysql 5.1.66 / Symfony 2.2.1</environment>
            <key id="14824">DDC-2424</key>
            <summary>Removing an inherited entity via a delete cascade constraint does not remove the parent row</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="10000" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="xaapyks">Bruno Jacquet</reporter>
                        <labels>
                    </labels>
                <created>Thu, 2 May 2013 13:59:55 +0000</created>
                <updated>Mon, 6 May 2013 10:19:39 +0000</updated>
                                    <version>2.3.3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20201" author="beberlei" created="Sat, 4 May 2013 10:51:03 +0000"  >&lt;p&gt;Can you show the CREATE TABLE and FOREIGN KEY statements of all the tables involved? It seems the cascade of the foreign keys is not propagated between multiple tables?&lt;/p&gt;</comment>
                    <comment id="20220" author="xaapyks" created="Mon, 6 May 2013 10:09:45 +0000"  >&lt;p&gt;CREATE TABLE Base (id INT AUTO_INCREMENT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;&lt;br/&gt;
CREATE TABLE Child1 (id INT NOT NULL, foreignKey INT NOT NULL, UNIQUE INDEX UNIQ_179B6E88E992F5A (foreignKey), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;&lt;/p&gt;

&lt;p&gt;ALTER TABLE Child1 ADD CONSTRAINT FK_179B6E88E992F5A FOREIGN KEY (foreignKey) REFERENCES ExternalEntity (id) ON DELETE CASCADE;&lt;br/&gt;
ALTER TABLE Child1 ADD CONSTRAINT FK_179B6E8BF396750 FOREIGN KEY (id) REFERENCES Base (id) ON DELETE CASCADE;&lt;/p&gt;</comment>
                    <comment id="20221" author="xaapyks" created="Mon, 6 May 2013 10:14:48 +0000"  >&lt;p&gt;The problem is that, the SQL model never explicitely tells the DB to delete the corresponding Base when Child1 gets removed. It looks like it is handled by the doctrine entity manager layer and not the actual DB engine (Base has no on delete cascade nor foreign key to its children). &lt;br/&gt;
So only doctrine can add the logic here because it knows the entity schema. But in this case, when it is deleted from another table, it looks like the special treatment is not triggered.&lt;/p&gt;</comment>
                    <comment id="20222" author="xaapyks" created="Mon, 6 May 2013 10:19:39 +0000"  >&lt;p&gt;Maybe using &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;cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;remove&quot;&lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;, instead of &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;onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt; to force the cascading process to be handled by doctrine would workaround the bug... But I prefer to have my DB do the logic work as much as possible.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2319] [GH-590] DQL Query: process ArrayCollection values to ease development</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2319</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of michaelperrin:&lt;/p&gt;

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

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

&lt;p&gt;I added some code to ease &quot;where in&quot; parameter binding.&lt;/p&gt;

&lt;p&gt;As you know, when a where condition is added, the object itself can be passed as a parameter and it&apos;s id is automatically retrieved:&lt;/p&gt;

&lt;p&gt;```php&lt;br/&gt;
$queryBuilder = $this&lt;br/&gt;
    -&amp;gt;where(&apos;model.category = :category&apos;)&lt;br/&gt;
    -&amp;gt;setParameter(&apos;category&apos;, $category)&lt;br/&gt;
;&lt;br/&gt;
```&lt;br/&gt;
Where `$category` is an object.&lt;/p&gt;

&lt;p&gt;But it doesn&apos;t work for collections:&lt;br/&gt;
```php&lt;br/&gt;
$queryBuilder = $this&lt;br/&gt;
    -&amp;gt;where(&apos;model.category IN (:categories)&apos;)&lt;br/&gt;
    -&amp;gt;setParameter(&apos;categories&apos;, $categories)&lt;br/&gt;
;&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;Where categories is an `ArrayCollection` object (retrieved from a many to one relation for instance).&lt;/p&gt;

&lt;p&gt;This doesn&apos;t work in the current version of Doctrine, and my PR solved that.&lt;/p&gt;

&lt;p&gt;So far, the only solution is to do the following:&lt;/p&gt;

&lt;p&gt;```php&lt;br/&gt;
$categoryIds = array();&lt;/p&gt;

&lt;p&gt;foreach ($categories as $category) &lt;/p&gt;
{
    $categoryIds[] = $category-&amp;gt;getId();
}

&lt;p&gt;$queryBuilder = $this&lt;br/&gt;
    -&amp;gt;where(&apos;model.category IN (:category_ids)&apos;)&lt;br/&gt;
    -&amp;gt;setParameter(&apos;category_ids&apos;, $categoryIds)&lt;br/&gt;
;&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;And this is pretty borring when you have to do it several times for several entities.&lt;/p&gt;

&lt;p&gt;Note that I didn&apos;t add any unit test for this feature. Can you explain me where I should add the test?&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;</description>
                <environment></environment>
            <key id="14550">DDC-2319</key>
            <summary>[GH-590] DQL Query: process ArrayCollection values to ease development</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 25 Feb 2013 16:03:47 +0000</created>
                <updated>Sat, 4 May 2013 12:52:29 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2316] [GH-588] ClassMetadataInfo: use reflection for creating new instance (on PHP &gt;=5.4)</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2316</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Majkl578:&lt;/p&gt;

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

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

&lt;p&gt;On PHP &amp;gt;=5.4, use proper way for instantiating classes without invoking constructor.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14545">DDC-2316</key>
            <summary>[GH-588] ClassMetadataInfo: use reflection for creating new instance (on PHP &gt;=5.4)</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 23 Feb 2013 18:04:25 +0000</created>
                <updated>Sat, 4 May 2013 12:12:14 +0000</updated>
                                                    <fixVersion>3.0</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20209" author="beberlei" created="Sat, 4 May 2013 12:12:14 +0000"  >&lt;p&gt;Scheduling this for 3.0, when we move to php 5.4 or higher requirement&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2254] Exporting and restoring a query.</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2254</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When you have a queryBuilder and you want to break it down using getDQLParts, You can&apos;t restore it by looping over the parts and adding them.&lt;/p&gt;

&lt;p&gt;This is what I am doing:&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;
$parts = $qb-&amp;gt;getDQLParts();

&lt;span class=&quot;code-comment&quot;&gt;// save the parts and use them in a different environment.
&lt;/span&gt;
$newQb = $em-&amp;gt;createQueryBuilder();
foreach ($parts as $name =&amp;gt; $part) {
  $newQb-&amp;gt;add($name, $part);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>OSX</environment>
            <key id="14406">DDC-2254</key>
            <summary>Exporting and restoring a query.</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="nousefreak">Dries De Peuter</reporter>
                        <labels>
                        <label>dql</label>
                        <label>rebuild</label>
                        <label>restore</label>
                        <label>save</label>
                    </labels>
                <created>Wed, 23 Jan 2013 20:02:34 +0000</created>
                <updated>Sat, 4 May 2013 11:43:53 +0000</updated>
                                    <version>Git Master</version>
                <version>2.3.2</version>
                                                <component>Documentation</component>
                <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19363" author="nousefreak" created="Wed, 23 Jan 2013 20:21:11 +0000"  >&lt;p&gt;I wrote a test showing the issue.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/NoUseFreak/doctrine2/commit/8574b79fd3d245532bbe7e310c5cbe083892057a&quot; class=&quot;external-link&quot;&gt;https://github.com/NoUseFreak/doctrine2/commit/8574b79fd3d245532bbe7e310c5cbe083892057a&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20205" author="beberlei" created="Sat, 4 May 2013 11:43:53 +0000"  >&lt;p&gt;This is not a bug, because restoring queries is not yet a feature of the QueryBuilder. Marking as possible improvement for future.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2167] [GH-522] [DDC-2166] Refactor identity hash generation</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2167</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of beberlei:&lt;/p&gt;

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

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

&lt;p&gt;This work prepares for the merge of GH-232, allowing more complex and robust identifier hash generation.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14269">DDC-2167</key>
            <summary>[GH-522] [DDC-2166] Refactor identity hash generation</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 25 Nov 2012 17:57:03 +0000</created>
                <updated>Wed, 1 May 2013 21:33:53 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2133] Issue with Query::iterate and query mixed results</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2133</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Consider this code:&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;
$dql = &quot;
    SELECT Page, Product.name
    FROM Dlayer\\Entity\\Page Page
    INNER JOIN Page.Product Product
    &quot;;
$q = ($em-&amp;gt;createQuery($dql));
foreach ($q-&amp;gt;iterate() as $entry) {
  $page = $entry[0][0];
  $name = $entry[0][&apos;name&apos;];
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This results with undefined index: &apos;name&apos; for the second entry.&lt;/p&gt;

&lt;p&gt;First result keys are (notice just one array element with index 0):&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;
0
array(2) {
  [0] =&amp;gt;
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(0)
  [1] =&amp;gt;
  string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
} 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;but all others are different (notice two array elements with index 0 and the other one that is incrementing):&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;
the second one:
0
array(1) {
  [0] =&amp;gt;
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(0)
}
1
array(1) {
  [0] =&amp;gt;
  string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
} 
the third one:
0
array(1) {
  [0] =&amp;gt;
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(0)
}
2
array(1) {
  [0] =&amp;gt;
  string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
} 

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;What&apos;s wrong with this approach? Is it a bug or mixed results should not be used with the iterate method?&lt;/p&gt;</description>
                <environment></environment>
            <key id="14206">DDC-2133</key>
            <summary>Issue with Query::iterate and query mixed results</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="deatheriam">Oleg Namaka</reporter>
                        <labels>
                    </labels>
                <created>Fri, 9 Nov 2012 01:45:16 +0000</created>
                <updated>Wed, 1 May 2013 21:26:21 +0000</updated>
                                    <version>2.2.1</version>
                                <fixVersion>3.0</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="18968" author="beberlei" created="Mon, 12 Nov 2012 14:16:28 +0000"  >&lt;p&gt;This is a known issue that we don&apos;t have found a BC fix for and as I understand &lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=guilhermeblanco&quot; class=&quot;user-hover&quot; rel=&quot;guilhermeblanco&quot;&gt;Guilherme Blanco&lt;/a&gt; requires considerable refactoring. &lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="12890">DDC-1314</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-349] Add support for specifying precedence in joins in DQL</title>
                <link>http://doctrine-project.org/jira/browse/DDC-349</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This request is in followup to my doctrine-user message &quot;Doctrine 2.0: Nested joins&apos;.&lt;br/&gt;
I am a bit surprised by the responses in that defining precedences in joins by placing parenthesis around join expressions is not well-known. Although not in the original SQL92 specification it is a major and important feature offered by all the RDBMS&apos;s that Doctrine 2 supports, and oftenly performs better than using subselects or alike. Doctrine 1 did not support it, but imho Doctrine 2 should support it to be a mature allround ORM.&lt;/p&gt;

&lt;p&gt;As a short example the following is a SQL statement with a nested join, where the nesting is absolutely necessary to return only a&apos;s together with either both b&apos;s and c&apos;s or no b&apos;s and c&apos;s at all:&lt;/p&gt;

&lt;p&gt;SELECT *&lt;br/&gt;
  FROM a A&lt;br/&gt;
  LEFT JOIN (&lt;br/&gt;
    b B&lt;br/&gt;
    INNER JOIN c C ON C.b_id = B.id&lt;br/&gt;
  ) ON B.a_id = A.id&lt;/p&gt;

&lt;p&gt;In order for Doctrine 2 to support this the BNF should be something like:&lt;br/&gt;
Join ::= [&quot;LEFT&quot; &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;OUTER&amp;quot;&amp;#93;&lt;/span&gt; | &quot;INNER&quot;] &quot;JOIN&quot; ( &quot;(&quot; JoinAssociationPathExpression &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;AS&amp;quot;&amp;#93;&lt;/span&gt; AliasIdentificationVariable Join &quot;)&quot; | JoinAssociationPathExpression &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;AS&amp;quot;&amp;#93;&lt;/span&gt; AliasIdentificationVariable ) &lt;span class=&quot;error&quot;&gt;&amp;#91;(&amp;quot;ON&amp;quot; | &amp;quot;WITH&amp;quot;) ConditionalExpression&amp;#93;&lt;/span&gt;&lt;br/&gt;
instead of the current:&lt;br/&gt;
Join ::= [&quot;LEFT&quot; &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;OUTER&amp;quot;&amp;#93;&lt;/span&gt; | &quot;INNER&quot;] &quot;JOIN&quot; JoinAssociationPathExpression &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;AS&amp;quot;&amp;#93;&lt;/span&gt; AliasIdentificationVariable &lt;span class=&quot;error&quot;&gt;&amp;#91;(&amp;quot;ON&amp;quot; | &amp;quot;WITH&amp;quot;) ConditionalExpression&amp;#93;&lt;/span&gt; &lt;/p&gt;

&lt;p&gt;This would allow DQL like:&lt;/p&gt;

&lt;p&gt;SELECT A, B, C&lt;br/&gt;
  FROM a A&lt;br/&gt;
  LEFT JOIN (&lt;br/&gt;
    A.b B&lt;br/&gt;
    INNER JOIN B.c C&lt;br/&gt;
  ) WITH B.something = &apos;value&apos; AND C.something = &apos;othervalue&apos;&lt;/p&gt;

&lt;p&gt;What further needs to be done is that the DQL parser loosly couples the ConditionalExpression to any of the previously parsed JoinAssociationPathExpression&apos;s instead of tieing it explicitely to the JoinAssociationPathExpression that preceedes it according to the old BNF notation. The new BNF should however not require any changes to the hydrator. Therefore I have the feeling that improving the DQL parser for nested joins does not require extensive work, while the benefit of running these kind of queries is considerable.&lt;/p&gt;

&lt;p&gt;As an extra substantiation here are links to (BNF) FROM clause documentations of the RDBMS&apos;s that Doctrine 2 supports, they all show support for nested joins:&lt;br/&gt;
MySQL: &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/join.html&quot; class=&quot;external-link&quot;&gt;http://dev.mysql.com/doc/refman/5.0/en/join.html&lt;/a&gt;&lt;br/&gt;
PostgreSQL: &lt;a href=&quot;http://www.postgresql.org/docs/8.4/interactive/sql-select.html#SQL-FROM&quot; class=&quot;external-link&quot;&gt;http://www.postgresql.org/docs/8.4/interactive/sql-select.html#SQL-FROM&lt;/a&gt; and &lt;a href=&quot;http://www.postgresql.org/docs/8.1/interactive/explicit-joins.html&quot; class=&quot;external-link&quot;&gt;http://www.postgresql.org/docs/8.1/interactive/explicit-joins.html&lt;/a&gt;&lt;br/&gt;
MSSQL: &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms177634.aspx&quot; class=&quot;external-link&quot;&gt;http://msdn.microsoft.com/en-us/library/ms177634.aspx&lt;/a&gt;&lt;br/&gt;
Oracle: &lt;a href=&quot;http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/statements_10002.htm#CHDDCHGF&quot; class=&quot;external-link&quot;&gt;http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/statements_10002.htm#CHDDCHGF&lt;/a&gt;&lt;br/&gt;
SQLite: &lt;a href=&quot;http://www.sqlite.org/syntaxdiagrams.html#single-source&quot; class=&quot;external-link&quot;&gt;http://www.sqlite.org/syntaxdiagrams.html#single-source&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I surely hope you will consider implementing this improvement because it would save me and others from the hassle of writing raw SQL queries or executing multiple (thus slow) queries in DQL for doing the same. Thanks anyway for the great product so far!&lt;/p&gt;</description>
                <environment></environment>
            <key id="10915">DDC-349</key>
            <summary>Add support for specifying precedence in joins in DQL</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="dennis.verspuij">Dennis Verspuij</reporter>
                        <labels>
                    </labels>
                <created>Thu, 18 Feb 2010 09:52:45 +0000</created>
                <updated>Wed, 1 May 2013 18:46:53 +0000</updated>
                                    <version>2.0-ALPHA4</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="12650" author="guilhermeblanco" created="Tue, 13 Apr 2010 00:04:10 +0000"  >&lt;p&gt;This seems to be a valid issue to me.&lt;/p&gt;

&lt;p&gt;This implementation is the actual solution to associations retrieval that are inherited (type joined).&lt;/p&gt;

&lt;p&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-java&quot;&gt;/** Joined */
class Base {}

class Foo &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Base {}

class Bar {
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $foo;
}

&lt;span class=&quot;code-comment&quot;&gt;// This causes the CTI to link as INNER JOIN, which makes the result become 0
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// il &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; you have no Foo&apos;s defined (although it should ignore &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;)
&lt;/span&gt;$q = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;createQuery(&apos;SELECT b, f FROM Bar b LEFT JOIN b.foo f&apos;); 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="12654" author="romanb" created="Tue, 13 Apr 2010 04:40:05 +0000"  >&lt;p&gt;Yes, this is a possible solution for &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-512&quot; title=&quot;LEFT JOIN of extended null entity cause empty result [testcase included]&quot;&gt;&lt;del&gt;DDC-512&lt;/del&gt;&lt;/a&gt; but on the &lt;b&gt;SQL level&lt;/b&gt;. I still don&apos;t see this as appropriate for DQL, it just doesnt make sense to me, DQL joins object associations, there is no precedence.&lt;/p&gt;</comment>
                    <comment id="12656" author="romanb" created="Tue, 13 Apr 2010 05:46:00 +0000"  >&lt;p&gt;So, no, this has nothing to do with &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-512&quot; title=&quot;LEFT JOIN of extended null entity cause empty result [testcase included]&quot;&gt;&lt;del&gt;DDC-512&lt;/del&gt;&lt;/a&gt;. &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-512&quot; title=&quot;LEFT JOIN of extended null entity cause empty result [testcase included]&quot;&gt;&lt;del&gt;DDC-512&lt;/del&gt;&lt;/a&gt; can even be fixed differently as outlined in my comments there.&lt;/p&gt;</comment>
                    <comment id="12657" author="romanb" created="Tue, 13 Apr 2010 05:52:20 +0000"  >&lt;p&gt;On a side note I would still like to know/see the following for this issue:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Some realisitic DQL examples where this feature would be essential, i.e. there is no other way to do it.&lt;br/&gt;
   This also means explaining what the impact on the resulting object graph is and why it makes sense.&lt;/li&gt;
	&lt;li&gt;Which other ORMs support this on the OQL/Criteria level?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;So far, my stance on this issue is:&lt;/p&gt;

&lt;p&gt; 1) It doesnt make sense (semantically) in DQL&lt;br/&gt;
 2) Its rarely needed&lt;br/&gt;
 3) When you really need it you can use a NativeQuery anyway and use this nesting in SQL, where it probably belongs and makes more sense&lt;br/&gt;
 4) It would (unnecessarily) complicate DQL&lt;/p&gt;

&lt;p&gt;Thus I am currently leaning towards &quot;Wont fix&quot; for this issue.&lt;/p&gt;</comment>
                    <comment id="12662" author="dennis.verspuij" created="Tue, 13 Apr 2010 13:53:13 +0000"  >&lt;p&gt;Hi Roman. I understand your doubts, and I have been breaking my head over&lt;br/&gt;
creating a realistic example the last few hours that would hopefully convince&lt;br/&gt;
you for implementing this feature. But actually I cannot find one that you wouldn&apos;t&lt;br/&gt;
consider to be trivial. I do have a number of very complex optimized queries written&lt;br/&gt;
for sportskickoff dot com (using Doctrine 1.2) but they are probably hard to understand&lt;br/&gt;
because they may not be selfdescribing. Below is one example literally ripped from&lt;br/&gt;
the application. Still they often can be broken down to my example query in this&lt;br/&gt;
ticket&apos;s description, but applied grouping, additional other joins on the root component&lt;br/&gt;
and/or other criteria made them impossible to rewrite using subselects or choosing&lt;br/&gt;
another root component. Most often they just performed way best using the nested&lt;br/&gt;
syntax and saved me a number of additional queries.&lt;/p&gt;

&lt;p&gt;SELECT A.id, A.username, A.balance, COALESCE(SUM(B.stake), 0) AS sumstake, COUNT(B.id) AS nrbets&lt;br/&gt;
FROM account A&lt;br/&gt;
LEFT JOIN (&lt;br/&gt;
  bet B&lt;br/&gt;
  INNER JOIN game G ON G.id = :GAMEID AND B.timestampcompletion BETWEEN G.timestampstart AND G.timestampend&lt;br/&gt;
) ON B.accountid = A.id AND B.timestampcompletion IS NOT NULL&lt;br/&gt;
WHERE A.Status &amp;amp; :ACTIVEORDISQUALIFIED = :ACTIVE&lt;br/&gt;
GROUP BY A.id, A.username, A.balance&lt;br/&gt;
ORDER BY A.balance DESC, sumstake ASC, nrbets ASC, A.username ASC&lt;/p&gt;

&lt;p&gt;But let&apos;s put it another way. I would also like this feature to be supported in DQL&lt;br/&gt;
because I just do not want to use native queries. Why would I want to use native&lt;br/&gt;
queries if it can be done using DQL? In DQL I work with class names and field&lt;br/&gt;
names, and they may differ from the underlying table and column names. Doctrine&lt;br/&gt;
takes care of that mapping based on my schema/annotations and I do not&lt;br/&gt;
have to &quot;know&quot; these mappings. In native queries I suddenly do have to &quot;know&quot;&lt;br/&gt;
these mappings. I use Doctrine because it makes my application portable and&lt;br/&gt;
enables me to work with my database in an OOP way like I do in my model,&lt;br/&gt;
abstracting things. The need for native queries partly reverts the benefits Doctrine&lt;br/&gt;
offers in the first place.&lt;/p&gt;

&lt;p&gt;Btw, I recall to have successfully used the nested join syntax in HQL (.NET Hibernate)&lt;br/&gt;
but I cannot find examples on the web or a BNF notation.&lt;/p&gt;

&lt;p&gt;Furthermore, in reply to your stances:&lt;br/&gt;
1) It indeed doesnt make sense (semantically) in DQL, it only makes the result&lt;br/&gt;
  set different, but not the way data is hydrated into objects;&lt;br/&gt;
2) Its indeed rarely needed for inserting, updating and populating basic lists but&lt;br/&gt;
  it allows you to better select what combinations of associated rows are joined&lt;br/&gt;
  and which not in more optimized queries without having to use native queries,&lt;br/&gt;
  or because they perform better than using subseletcs and alike.&lt;br/&gt;
3) Not having to use native queries is just an extra reason for using Doctrine and&lt;br/&gt;
  maintains the abstraction the ORM provides througout on&apos;es whole application&lt;br/&gt;
4) Why would it complicate DQL, if people do not know about or understand&lt;br/&gt;
  the feature it wouldn&apos;t matter because not using parenthesises is the default&lt;br/&gt;
  way to specify joins?&lt;/p&gt;

&lt;p&gt;Well, this is it, can&apos;t find any more words to promote and make you enthusiastic.... lol.&lt;/p&gt;</comment>
                    <comment id="12663" author="dennis.verspuij" created="Tue, 13 Apr 2010 17:48:39 +0000"  >&lt;p&gt;Ok, I have not given up yet... &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;, here&apos;s a &quot;stupid&quot; example.&lt;/p&gt;

&lt;p&gt;Imagine a book store that sells books of various authors and keeps track of those sales.&lt;br/&gt;
Let&apos;s say you would have an admin page that lists all authors, and for each author&lt;br/&gt;
its also shows the books and their sales dates since january 1st, but only for those&lt;br/&gt;
books that were actually sold and contain an A in its name. An optimized SQL query&lt;br/&gt;
to fetch all the information at once would be something like:&lt;/p&gt;

&lt;p&gt;SELECT A.&lt;b&gt;, B.&lt;/b&gt;, S.*&lt;br/&gt;
  FROM author A&lt;br/&gt;
  LEFT JOIN (&lt;br/&gt;
    book B&lt;br/&gt;
    INNER JOIN sale S ON S.book_id = B.id AND S.dt &amp;gt;= &apos;2010-01-01&apos;&lt;br/&gt;
  ) ON B.author_id = A.id AND A.name LIKE &apos;%A%&apos;&lt;/p&gt;

&lt;p&gt;In DQL it would then be something like:&lt;/p&gt;

&lt;p&gt;SELECT A.&lt;b&gt;, B.&lt;/b&gt;, S.*&lt;br/&gt;
  FROM author A&lt;br/&gt;
  LEFT JOIN (&lt;br/&gt;
    book B&lt;br/&gt;
    INNER JOIN sale S WITH S.dt &amp;gt;= &apos;2010-01-01&apos;&lt;br/&gt;
  ) WITH A.name LIKE &apos;%A%&apos;&lt;/p&gt;

&lt;p&gt;If the database would contain thousands of books, but sales for just a&lt;br/&gt;
few books, this will definitely perform better than using subselects.&lt;br/&gt;
Off course one would like to fetch array graphs instead of objects for&lt;br/&gt;
further optimization, but this hopefully shows my point.&lt;/p&gt;

&lt;p&gt;I have attached a test casefor a similar query, though without the additional&lt;br/&gt;
join constraints for clarity. I surely hope you can consider it.&lt;/p&gt;

&lt;p&gt;One last note, you shouldn&apos;t be afraid that nesting joins is not in the&lt;br/&gt;
ansi SQL spec. Select queries are about record sets and products&lt;br/&gt;
between these sets, tables are just the basic means of providing record&lt;br/&gt;
sets to the query. This is an important terminological difference to think about.&lt;br/&gt;
Specifying precedence with parenthesis around joins is a logical and&lt;br/&gt;
natural evolution of the ansi sql standard. For example views are a good&lt;br/&gt;
proof of this concept, I could define book B INNER JOIN sale S as a view&lt;br/&gt;
and LEFT JOIN that to authors to get effectively the same result&lt;br/&gt;
set as the above example. The database server would internally perform the&lt;br/&gt;
same query (though may additionally take indexes on the view into account).&lt;br/&gt;
That said, rdbm&apos;s that support this syntax would certainly never drop the&lt;br/&gt;
feature, as its not a feature but just plain logical and smart querying!&lt;/p&gt;

&lt;p&gt;P.S. I had a hard time finding out how to run the test cases, I could not find&lt;br/&gt;
it in the Doctrine 2 documentation, development wiki, cookbook or any other&lt;br/&gt;
place, while finally it was as easy as running phpunit  Doctrine_Tests_AllTests&lt;br/&gt;
from within the tests/ directory, or just phpunit  Doctrine_Tests_ORM_Functional_Ticket_DDC349Test&lt;br/&gt;
for my test. Could you please add some info about this somewhere, it might&lt;br/&gt;
save others some googling.&lt;/p&gt;</comment>
                    <comment id="12664" author="dennis.verspuij" created="Tue, 13 Apr 2010 17:50:11 +0000"  >&lt;p&gt;Test case as SVN patch using a parenthesized join.&lt;br/&gt;
Just remove the parenthesises from the query to have it fail...&lt;/p&gt;</comment>
                    <comment id="13083" author="romanb" created="Sat, 29 May 2010 06:37:17 +0000"  >&lt;p&gt;@&quot;The need for native queries partly reverts the benefits Doctrine offers in the first place.&quot;&lt;/p&gt;

&lt;p&gt;That is something I hugely disagree with. Neither SQL abstraction, nor database vendor independence is the main purpose of an ORM like Doctrine 2.&lt;br/&gt;
It is the &lt;b&gt;state management of your objects, the transparent change tracking, lazy-loading and synchronization of the object state with the database state&lt;/b&gt; and nothing of this gets lost when using native queries.&lt;/p&gt;

&lt;p&gt;We could rip out DQL and any other querying mechanism except a basic find() (and lazy-loading, of course), only providing the native query facility and even only supporting MySQL and would still retain all the core ORM functionality.&lt;/p&gt;

&lt;p&gt;NativeQuery is one of the best and core &quot;features&quot; of the project. It is even the &lt;b&gt;foundation&lt;/b&gt; for DQL. A DQL query is nothing more than an additional (beautiful) abstraction but what comes out is a native query + a ResultSetMapping, the same thing you can build yourself in the first place, &lt;b&gt;even using the mapping metadata to construct the query&lt;/b&gt;. Nothing forces you to hardcode table and column names in native queries if you don&apos;t want that. Just use the mapping metadata, DQL does the same.&lt;/p&gt;

&lt;p&gt;SQL abstraction and database vendor independence is icing on the cake, not the heart of the ORM.&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="12797">DDC-1256</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                    <attachment id="10569" name="DDC349Test.patch" size="5354" author="dennis.verspuij" created="Tue, 13 Apr 2010 17:50:11 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2078] [GH-479] [WIP][Mapping] Ported some of the yaml driver to use Symfony config</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2078</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of kimhemsoe:&lt;/p&gt;

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

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

&lt;p&gt;Looking for some input. How much validation and normailization should i push to the configuration ? Should i use default values so we can remove alot of lines from the driver ?&lt;/p&gt;

&lt;p&gt;Is the way im allowing to extend the configuration good enough for Gedmo and others (untested)?&lt;/p&gt;</description>
                <environment></environment>
            <key id="14128">DDC-2078</key>
            <summary>[GH-479] [WIP][Mapping] Ported some of the yaml driver to use Symfony config</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 14 Oct 2012 23:46:55 +0000</created>
                <updated>Wed, 1 May 2013 12:57:35 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2406] Merging of new detached entities with PrePersist lifecycle callback breaks</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2406</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Merging of new detached entities with PrePersist lifecycle callback breaks:&lt;/p&gt;

&lt;p&gt;Code snippet:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    class A
    {
       /**
        *  @ORM\ManyToOne(targetEntity= ...
        *  @ORM\JoinColumn(name=&quot; ...
        */
        &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $b;
        
        &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getB()
        {
            &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;b;
        }
        
        &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setB($b)
        {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;b = $b;
        }
        
        /**
         *
         * @ORM\PrePersist
         *
         * @&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; void
         */
        &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function onPrePersist()
        {
           &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getB() === &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;) {
                &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Exception(&apos;B instance must be defined);
           }
           ....
        }
    }
    
    class B 
    {
    }
    
    $a = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; A();
    $b = $em-&amp;gt;find(&apos;B&apos;, 1);
    $a-&amp;gt;setB($b);
    $em-&amp;gt;persist($a); &lt;span class=&quot;code-comment&quot;&gt;// works fine as B instance is set
&lt;/span&gt;    $em-&amp;gt;detach($a);
    
    $a = $em-&amp;gt;merge($a) &lt;span class=&quot;code-comment&quot;&gt;// breaks in onPrePersist&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The reason it happens is that the merge operation is trying to persist a new entity created by uow::newInstance($class) without populating its properties first:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
 &lt;span class=&quot;code-comment&quot;&gt;// If there is no ID, it is actually NEW.
&lt;/span&gt;    ....
    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ( ! $id) {
        $managedCopy = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;newInstance($class);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;persistNew($class, $managedCopy);
    } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
	....
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This should happen first for the $managedCopy:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    &lt;span class=&quot;code-comment&quot;&gt;// Merge state of $entity into existing (managed) entity
&lt;/span&gt;    foreach ($class-&amp;gt;reflClass-&amp;gt;getProperties() as $prop) {
        ....
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14791">DDC-2406</key>
            <summary>Merging of new detached entities with PrePersist lifecycle callback breaks</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="deatheriam">Oleg Namaka</reporter>
                        <labels>
                        <label>merge,</label>
                        <label>prePersist</label>
                    </labels>
                <created>Fri, 19 Apr 2013 17:01:32 +0000</created>
                <updated>Wed, 1 May 2013 12:24:53 +0000</updated>
                                    <version>2.3.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="20123" author="fabio.bat.silva" created="Sun, 28 Apr 2013 20:57:08 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=beberlei&quot; class=&quot;user-hover&quot; rel=&quot;beberlei&quot;&gt;Benjamin Eberlei&lt;/a&gt;, Is this an expected behavior ?&lt;/p&gt;

&lt;p&gt;I mean.. This issue is about dispatch the event before copy the original values into the managed instance. &lt;br/&gt;
But overall, should &lt;b&gt;$em-&amp;gt;detach()&lt;/b&gt; trigger &lt;b&gt;@PrePersist&lt;/b&gt; events ?&lt;/p&gt;</comment>
                    <comment id="20137" author="beberlei" created="Wed, 1 May 2013 08:48:08 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=fabio.bat.silva&quot; class=&quot;user-hover&quot; rel=&quot;fabio.bat.silva&quot;&gt;Fabio B. Silva&lt;/a&gt; he talks about $em-&amp;gt;merge() on a detached entity calling pre persist. This should only happen on a NEW entity, not on a DETACHED one.&lt;/p&gt;</comment>
                    <comment id="20146" author="deatheriam" created="Wed, 1 May 2013 12:22:24 +0000"  >&lt;p&gt;I tend to disagree with the statement above about pre persist that should not happen on a detached entity being merged back in. If this event handler contains a business logic that this entity needs to be checked against and the detached entity was modified before the merge operation in a way that invalidates it in the prePersist than I will end up with the invalid entity in the identity map. If the merge operation calls persist it must run the prePersist event handler as well for consistency.&lt;/p&gt;

&lt;p&gt;If there is a logic that prevents persisting invalid entities why should it bypassed in the merge operation?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2420] [GH-656] [DDC-2235] Fix for using a LEFT JOIN onto an entity with single table inheritance</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2420</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of tarnfeld:&lt;/p&gt;

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

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

&lt;p&gt;Possible fix for the bug &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-2235&quot; title=&quot;Single table inheritance discriminator in WHERE when using arbitrary join syntax&quot;&gt;&lt;del&gt;DDC-2235&lt;/del&gt;&lt;/a&gt;. I&apos;d love to hear some opinions on whether this is the right way to go about this issue. I&apos;m not particularly familiar with the internals of doctrine so there may be a better solution.&lt;/p&gt;

&lt;p&gt;------&lt;/p&gt;

&lt;p&gt;The issue is when using DQL to perform a left join on an entity using single&lt;br/&gt;
table inheritance, doctrine tries to insert an `IN()` predicate into the `WHERE`&lt;br/&gt;
clause for all of the discriminator values. That makes sense and is valid, so&lt;br/&gt;
it would be wrong to remove that behaviour.&lt;/p&gt;

&lt;p&gt;However when using a &lt;b&gt;left&lt;/b&gt; join having an `IN()` in the main where clause makes&lt;br/&gt;
the `LEFT JOIN` pretty much useless, as it implicitly creates a `WHERE NOT NULL`&lt;br/&gt;
clause. This commit attempts to fix that by including an `OR IS NULL` in the&lt;br/&gt;
query if the join is a `LEFT JOIN`.&lt;/p&gt;

&lt;p&gt;I&apos;ve added some regression tests to ensure this bug never creeps back in. They fail on master (highlighting the bug) and pass after these commits have been applied. I&apos;ve also included a couple of other queries as tests to be sure only this one case has been affected.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14817">DDC-2420</key>
            <summary>[GH-656] [DDC-2235] Fix for using a LEFT JOIN onto an entity with single table inheritance</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Sun, 28 Apr 2013 23:09:35 +0000</created>
                <updated>Sun, 28 Apr 2013 23:09:35 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-776] Persisters use a fixed &quot;SELECT&quot; SQL statements</title>
                <link>http://doctrine-project.org/jira/browse/DDC-776</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am currently trying to work with BINARY columns with Doctrine 2 and MSSQL. In order to get my Entities working I had to create a custom Mapping Type for Binary columns. All went well in this case and I&apos;ve got it running.&lt;/p&gt;

&lt;p&gt;The problem arises when I am attempting to use Associative mapping (OneToOne/ManyToMany). The problem is, in order to do a select for an SQL column, I had to create a DQL function called &quot;CONVERT&quot; so that I use WHERE statements:&lt;/p&gt;

&lt;p&gt;            return $this-&amp;gt;createQueryBuilder(&apos;u&apos;)&lt;br/&gt;
                -&amp;gt;where(&quot;u.id = CONVERT(&apos;binary&apos;, :id, 1)&quot;)&lt;br/&gt;
                -&amp;gt;setParameter(&apos;id&apos;, $id)&lt;br/&gt;
                -&amp;gt;getQuery()&lt;br/&gt;
                -&amp;gt;getSingleResult();&lt;/p&gt;

&lt;p&gt;As you see, I must do this in order to get a result.&lt;/p&gt;

&lt;p&gt;However, when I&apos;m using associative mapping; this is what it does:&lt;/p&gt;

&lt;p&gt;        return &apos;SELECT &apos; . $this-&amp;gt;_getSelectColumnListSQL() &lt;br/&gt;
             . &apos; FROM &apos; . $this-&amp;gt;_class-&amp;gt;getQuotedTableName($this-&amp;gt;_platform) . &apos; &apos;&lt;br/&gt;
             . $this-&amp;gt;_getSQLTableAlias($this-&amp;gt;_class-&amp;gt;name)&lt;br/&gt;
             . $joinSql&lt;br/&gt;
             . ($conditionSql ? &apos; WHERE &apos; . $conditionSql : &apos;&apos;)&lt;br/&gt;
             . $orderBySql &lt;br/&gt;
             . $lockSql;&lt;/p&gt;

&lt;p&gt;As you can see, its some what hard coded and I cannot change it without changing the actual code in &lt;br/&gt;
Doctrine\ORM\Persisters\BasicEntityPersister.php&lt;/p&gt;

&lt;p&gt;So, I would first like to know if there was maybe a way you could allow us to customize the SELECT statement that the persisters use - or maybe (though I&apos;m not sure how this will be done) make them use user-defined repository functions?&lt;/p&gt;

&lt;p&gt;Like $myRepo-&amp;gt;find($identifier)&lt;/p&gt;

&lt;p&gt;Not entirely sure if I explained this properly and I do realize my circumstance is highly odd - but this does seem like a limitation and because of this I cannot use associative mapping.&lt;/p&gt;</description>
                <environment>Windows 7, Apache 2.2, MSSQL Server, PHP 5.3.3</environment>
            <key id="11845">DDC-776</key>
            <summary>Persisters use a fixed &quot;SELECT&quot; SQL statements</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="aarondm">Aaron DM</reporter>
                        <labels>
                    </labels>
                <created>Sun, 29 Aug 2010 13:52:27 +0000</created>
                <updated>Tue, 23 Apr 2013 12:09:39 +0000</updated>
                                    <version>2.0-BETA3</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20094" author="locs" created="Tue, 23 Apr 2013 12:09:39 +0000"  >&lt;p&gt;Hi, i try to make my custom type for binary field in MSSQL.&lt;br/&gt;
I don&apos;t find own, can you please show me your custom type binary?&lt;br/&gt;
Thks a lot.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2405] Changing strategy generates bad query.</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2405</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;For (unit, acceptance, functional) testing purpose I need to change the strategy of my GameStuff Entity class.&lt;/p&gt;

&lt;p&gt;In previous version is was using php instruction below, but since doctrine orm 2.3, it doesn&apos;t work anymore.&lt;/p&gt;

&lt;p&gt;$orm-&amp;gt;getClassMetaData(&apos;Entities\GameStuff&apos;)-&amp;gt;setIdGeneratorType(\Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_NONE);&lt;/p&gt;

&lt;p&gt;will trigger:&lt;/p&gt;

&lt;p&gt;Doctrine\DBAL\DBALException: An exception occurred while executing &apos;INSERT INTO vbank_accounts (game_id, updated_at, created_at) VALUES (?, ?, ?)&apos; with params &lt;/p&gt;
{&quot;1&quot;:1000010, &quot;2&quot;:0,&quot;3&quot;:&quot;2013-04-19 17:16:05&quot;,&quot;4&quot;:&quot;2013-04-19 17:16:05&quot;}
&lt;p&gt;:&lt;/p&gt;

&lt;p&gt;SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;HY093&amp;#93;&lt;/span&gt;: Invalid parameter number: number of bound variables does not match number of tokens&lt;/p&gt;</description>
                <environment></environment>
            <key id="14790">DDC-2405</key>
            <summary>Changing strategy generates bad query.</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="4" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="gedingun">Van Rotemberg</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Apr 2013 15:33:18 +0000</created>
                <updated>Sun, 21 Apr 2013 14:50:37 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="20070" author="beberlei" created="Sat, 20 Apr 2013 07:46:22 +0000"  >&lt;p&gt;The problem is that changing ClassMetadata after generating it from the cache is not really supported and depends on the Internal State of other classes. Have you tried creating a completly new EntityManager and then directly setting this? It could be that the SQL for the entity was already generated inside Doctrine, with the ID Generator information at IDENTITY_AUTO.&lt;/p&gt;</comment>
                    <comment id="20079" author="gedingun" created="Sun, 21 Apr 2013 11:29:49 +0000"  >&lt;p&gt;&amp;gt; The problem is that changing ClassMetadata after generating it from the cache is not really supported&lt;/p&gt;

&lt;p&gt;Yeah, it is a problem indeed, why set ticket status to resolved ?&lt;br/&gt;
Do you think it&apos;s normal to have a public method that trigger a fatal error ?&lt;/p&gt;

&lt;p&gt;Please fix it or put setIdGeneratorType as private, or AT LEAST add a context exception ...&lt;/p&gt;</comment>
                    <comment id="20080" author="ocramius" created="Sun, 21 Apr 2013 11:49:12 +0000"  >&lt;p&gt;Almost every interaction with metadata outside the `loadClassMetadata` event will cause unexpected problems. I don&apos;t think throwing an exception there helps in any way.&lt;/p&gt;</comment>
                    <comment id="20082" author="gedingun" created="Sun, 21 Apr 2013 14:49:26 +0000"  >&lt;p&gt;@marco pivetta&lt;/p&gt;

&lt;p&gt;The generation of the actual exception comes from DBALException on the query excetion and point a bad generated query (Invalid parameter number),&lt;br/&gt;
when the problem comes from setting ClassMetada, and concerns a problem of cache generated after loadClassMetadata.&lt;/p&gt;

&lt;p&gt;Adding an exception is just the fast way pointing where the problem comes from and that &quot;setting metadata after loadMetadata is not supported anymore&quot;. (It will spare developper&apos;s time that used to set metadata, but also help future contribution)&lt;/p&gt;

&lt;p&gt;&amp;gt; Please fix it or put setIdGeneratorType as private, or AT LEAST add a context exception ...&lt;br/&gt;
Note: BTW, my favorite solution would be to fix it (re-generate cache, or edit cache, or disable cache or whatever)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2401] INDEX BY not working on multiple columns</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2401</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;According to the docs on this page: &lt;br/&gt;
&lt;a href=&quot;http://docs.doctrine-project.org/en/latest/reference/dql-doctrine-query-language.html#using-index-by&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/en/latest/reference/dql-doctrine-query-language.html#using-index-by&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The following &quot;multi-dimensional index&quot; should be perfectly possible, with a default hydration mode:&lt;br/&gt;
SELECT b as business, p as product FROM Businesses b INDEX BY b.id JOIN Products p WITH b.id = p.businessid INDEX BY p.id&lt;/p&gt;

&lt;p&gt;However, b.id is completely ignored (it is a numeric primary key).&lt;/p&gt;

&lt;p&gt;I tried to go further, giving 2 products a matching barcode and indexing by barcode and then a (unique, numeric) productid. Only the barcode worked as a key and only one of the products with a matching barcode was selected. I used this query to test:&lt;br/&gt;
SELECT p FROM Products p INDEX BY p.barcode JOIN p.businessid b INDEX BY p.id&lt;/p&gt;

&lt;p&gt;I also flagged the docs, because I don&apos;t think a userid should/could be starting from 0.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14784">DDC-2401</key>
            <summary>INDEX BY not working on multiple columns</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="quintenvk">Quintenvk</reporter>
                        <labels>
                    </labels>
                <created>Tue, 16 Apr 2013 15:54:58 +0000</created>
                <updated>Thu, 18 Apr 2013 20:17:31 +0000</updated>
                                    <version>2.3.3</version>
                                                <component>Documentation</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20047" author="fabio.bat.silva" created="Thu, 18 Apr 2013 13:41:30 +0000"  >&lt;p&gt;Hi Quintenvk&lt;/p&gt;

&lt;p&gt;Could you please try to write a failing test case ?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                    <comment id="20054" author="quintenvk" created="Thu, 18 Apr 2013 18:40:34 +0000"  >&lt;p&gt;I added a testcase. Please note that the database settings are to be configured in Core/simplys/simplys.php, and that the dump is in dummy.sql.&lt;/p&gt;

&lt;p&gt;Apart from that all should run well immediately.&lt;/p&gt;</comment>
                    <comment id="20055" author="quintenvk" created="Thu, 18 Apr 2013 18:42:02 +0000"  >&lt;p&gt;Fabio,&lt;/p&gt;

&lt;p&gt;Please check the zip I just attached. I hope this helps you in finding the problem.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Quinten&lt;/p&gt;</comment>
                    <comment id="20056" author="fabio.bat.silva" created="Thu, 18 Apr 2013 19:28:37 +0000"  >&lt;p&gt;Thanks Quintenvk,&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;SELECT p.barcode, p.id, p.name FROM \core\Simplys\Entity\Products p INDEX BY p.barcode JOIN p.businessid b INDEX BY p.id&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In this DQL you are trying to index by scalar values, &lt;br/&gt;
I think we does not support that, and a single dimensional array is the expected result in this case.&lt;/p&gt;

&lt;p&gt;Also the &lt;a href=&quot;http://docs.doctrine-project.org/en/latest/reference/dql-doctrine-query-language.html#using-index-by&quot; class=&quot;external-link&quot;&gt;INDEX BY&lt;/a&gt; documentations seems wrong to me.&lt;/p&gt;


&lt;p&gt;The given DQL : &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; SELECT u.id, u.status, upper(u.name) nameUpper FROM User u INDEX BY u.idJOIN u.phonenumbers p INDEX BY p.phonenumber &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Show the following result :&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;array
  0 =&amp;gt;
    array
      1 =&amp;gt;
        object(stdClass)[299]
          &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &apos;__CLASS__&apos; =&amp;gt; string &apos;Doctrine\Tests\Models\CMS\CmsUser&apos; (length=33)
          &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &apos;id&apos; =&amp;gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; 1
          ..
      &apos;nameUpper&apos; =&amp;gt; string &apos;ROMANB&apos; (length=6)
  1 =&amp;gt;
    array
      2 =&amp;gt;
        object(stdClass)[298]
          &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &apos;__CLASS__&apos; =&amp;gt; string &apos;Doctrine\Tests\Models\CMS\CmsUser&apos; (length=33)
          &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &apos;id&apos; =&amp;gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; 2
          ...
      &apos;nameUpper&apos; =&amp;gt; string &apos;JWAGE&apos; (length=5)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Which IMHO represents another DQL, something like :&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; SELECT u, p , upper(u.name) nameUpper FROM User u INDEX BY u.id JOIN u.phonenumbers p INDEX BY p.phonenumber&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="20057" author="quintenvk" created="Thu, 18 Apr 2013 19:34:33 +0000"  >&lt;p&gt;Thanks for your reply Fabio. &lt;br/&gt;
Do you think there could be alternatives (apart from a foreach-loop) to achieve the expected result?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Quinten&lt;/p&gt;</comment>
                    <comment id="20058" author="fabio.bat.silva" created="Thu, 18 Apr 2013 19:47:06 +0000"  >&lt;p&gt;Not sure if it&apos;s exactly the result you need but you can try &lt;/p&gt;

&lt;p&gt;Something like :&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;SELECT p, b FROM \core\Simplys\Entity\Products p INDEX BY p.barcode JOIN p.businessid b INDEX BY p.id&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;or something like :&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;SELECT PARTIAL p.{id, barcode, name}, b.{id, attributesYouNeed} FROM \core\Simplys\Entity\Products p INDEX BY p.barcode JOIN p.businessid b INDEX BY p.id&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And than :&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;
$result = $query-&amp;gt;getArrayResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="20059" author="quintenvk" created="Thu, 18 Apr 2013 19:58:55 +0000"  >&lt;p&gt;Both produce the same result as the query I had. I think i&apos;ll move on to loops after a bit more research, too bad it can&apos;t be done (at least for now) though... Would&apos;ve been nice.&lt;/p&gt;

&lt;p&gt;Thanks for your help though!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11524" name="Testcase.zip" size="2020276" author="quintenvk" created="Thu, 18 Apr 2013 18:40:34 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1940] Doctrine DQL: erroneous sql generation from dql join with &quot;WITH&quot; or &quot;WHERE&quot; clause</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1940</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;m having big troubles while developing a quietly advanced DQL query for a tiny DMS: The schema: DmsObject is a superclass for which two subclasses exist (document and folder) UserRights and GroupRight (which are associative entities in the db, pointing respectively to user and group tables). User and Group represent (obvious) the dms &quot;actors&quot;.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
SELECT o, ur, gr 
from module\EDMS\business\DmsObject o 
join o.userRights ur 
join o.groupRights gr
WHERE o.ownerUser=ur.user
AND o.ownerGroup=gr.group
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;The WHERE condition is WRONG! Doctrine switches the two tables. I&apos;ve already checked the mapping (it&apos;s ok!) and checked also where the fk&apos;s point in the database (ok!).&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
...
LEFT JOIN dms_folder d1_ 
    ON d0_.id = d1_.id 
LEFT JOIN dms_document d2_ 
    ON d0_.id = d2_.id 
INNER JOIN dms_user_object_rights d3_ 
    ON d0_.id = d3_.document_id 
INNER JOIN dms_group_object_rights d4_ 
    ON d0_.id = d4_.document_id 
WHERE d0_.sys_group_owner = d3_.user_id 
    AND d0_.sys_user_owner = d4_.group_id
...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This seems to be a bug in the DQL translator.&lt;/p&gt;</description>
                <environment>LAMP, debian squeeze</environment>
            <key id="13875">DDC-1940</key>
            <summary>Doctrine DQL: erroneous sql generation from dql join with &quot;WITH&quot; or &quot;WHERE&quot; clause</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="noise085">Enea Bette</reporter>
                        <labels>
                    </labels>
                <created>Mon, 23 Jul 2012 11:38:08 +0000</created>
                <updated>Sun, 14 Apr 2013 15:27:06 +0000</updated>
                                    <version>2.2.2</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>7</watches>
                        <comments>
                    <comment id="18406" author="beberlei" created="Sun, 29 Jul 2012 09:33:35 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=noise085&quot; class=&quot;user-hover&quot; rel=&quot;noise085&quot;&gt;Enea Bette&lt;/a&gt; Can you attach the entities (stripped down to the fields we need here)?&lt;/p&gt;

&lt;p&gt;Can you check guilherme? This looks really weird.&lt;/p&gt;

&lt;p&gt;It should be:&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;
WHERE d0_.sys_user_owner = d3_.user_id AND d0_.sys_group_owner = d4_.group_id
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="18412" author="guilhermeblanco" created="Sun, 29 Jul 2012 15:49:59 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=noise085&quot; class=&quot;user-hover&quot; rel=&quot;noise085&quot;&gt;Enea Bette&lt;/a&gt; Can you please provide your entities?&lt;br/&gt;
I can try to reproduce the issue, but I need your entities as a base for a failing unit test.&lt;/p&gt;</comment>
                    <comment id="19982" author="hugohenrique" created="Thu, 11 Apr 2013 19:19:22 +0000"  >&lt;p&gt;I&apos;m having a similar problem with the query:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT um, p FROM Ciwwic\AppBundle\Entity\Provider p LEFT JOIN Ciwwic\UserBundle\Entity\UserMeta um WITH um.user = p.id WHERE p.id = 30&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When you run this query DQL she returns an empty array. &lt;br/&gt;
I getting solve my problem by adding WHERE clauses example as:&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;SELECT p, um FROM Ciwwic\AppBundle\Entity\Provider p LEFT JOIN Ciwwic\UserBundle\Entity\UserMeta um WHERE p.id = 30 AND um.user = 30&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="20011" author="fabio.bat.silva" created="Sun, 14 Apr 2013 15:27:06 +0000"  >&lt;p&gt;Hi Enea&lt;/p&gt;

&lt;p&gt;If i got it correctly&lt;br/&gt;
Your associations &lt;b&gt;DmsObject#ownerUser&lt;/b&gt; and &lt;b&gt;DmsObject#ownerGroup&lt;/b&gt; are flipped.&lt;br/&gt;
Note that &lt;b&gt;ownerUser&lt;/b&gt; points to &lt;b&gt;sys_group_owner&lt;/b&gt; and &lt;b&gt;ownerGroup&lt;/b&gt; to &lt;b&gt;sys_user_owner&lt;/b&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;/**
 * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;library\system\business\User&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;EAGER&quot;&lt;/span&gt;)
 * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;sys_group_owner&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;ID&quot;&lt;/span&gt;)
 */
&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $ownerUser;
/**
 * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;library\system\business\Group&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;EAGER&quot;&lt;/span&gt;)
 * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;sys_user_owner&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;ID&quot;&lt;/span&gt;)
 */
&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $ownerGroup;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It should be :&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;/**
 * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;library\system\business\User&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;EAGER&quot;&lt;/span&gt;)
 * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;sys_user_owner&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;ID&quot;&lt;/span&gt;)
 */
&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $ownerUser;

/**
 * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;library\system\business\Group&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;EAGER&quot;&lt;/span&gt;)
 * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;sys_group_owner&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;ID&quot;&lt;/span&gt;)
 */
&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $ownerGroup;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="14374">DDC-2235</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                    <attachment id="11213" name="Entities.rar" size="6730" author="noise085" created="Mon, 30 Jul 2012 07:06:28 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-93] It would be nice if we could have support for ValueObjects</title>
                <link>http://doctrine-project.org/jira/browse/DDC-93</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;class User {
	/**
	 * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $address;
	
	/**
	 * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $city;
	
	/**
	 * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $state;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We could have:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;class User {
	/**
	 * @Component(class=&lt;span class=&quot;code-quote&quot;&gt;&quot;Address&quot;&lt;/span&gt;)
	 */
	 &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $address;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It would my life a lot easier....&lt;/p&gt;

&lt;hr /&gt;

&lt;h2&gt;&lt;a name=&quot;Notesforimplementation&quot;&gt;&lt;/a&gt;Notes for implementation&lt;/h2&gt;

&lt;p&gt;Value objects can come in two forms: &lt;/p&gt;

&lt;p&gt;a) as embedded value objects&lt;br/&gt;
b) as collections of value objects&lt;/p&gt;

&lt;p&gt;An implementation should concentrate on a) first. The following things all concentrate on a).&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;DQLSupport&quot;&gt;&lt;/a&gt;DQL Support&lt;/h3&gt;

&lt;p&gt;&lt;b&gt;Conditions:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;1. &quot;select f from Foo f where f.embedded.value = ?1&quot; (setParameter(1, $scalarValue))&lt;br/&gt;
2. &quot;select f from Foo f where f.embedded = ?1&quot; (setParameter(1, $embeddedValueObject))&lt;/p&gt;

&lt;p&gt;At least Nr.1 &lt;b&gt;must&lt;/b&gt; be possible in a first implementation.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Selecting:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;1. &quot;select f from Foo f&quot; must explode embedded value objects in the SQL SELECT clause.&lt;br/&gt;
2. &quot;select f.embedded from Foo f&quot; must explode the columns of the embedded object in the SQL SELECT clause.&lt;/p&gt;

&lt;p&gt;At least Nr. 1 &lt;b&gt;must&lt;/b&gt; be possible in a first implementation, obviously.&lt;/p&gt;

&lt;p&gt;Components affected (among others): Parser, SqlWalker, ...&lt;/p&gt;


&lt;h3&gt;&lt;a name=&quot;Persisters&quot;&gt;&lt;/a&gt;Persisters&lt;/h3&gt;

&lt;p&gt;The persisters need to take embedded value objects into account when persisting as well as loading entities.&lt;/p&gt;

&lt;p&gt;Components affected (among others): Persisters, UnitOfWork, ...&lt;/p&gt;


&lt;h3&gt;&lt;a name=&quot;Metadata&quot;&gt;&lt;/a&gt;Metadata&lt;/h3&gt;

&lt;p&gt;ClassMetadataInfo needs to be extended with a field (probably an array) that contains the mappings of embedded values.&lt;br/&gt;
New annotations as well as XML/YAML elements are needed.&lt;/p&gt;

&lt;p&gt;Components affected (among others): ClassMetadataInfo, AnnotationDriver, YamlDriver, XmlDriver, doctrine-mapping.xsd, ...&lt;/p&gt;


&lt;h3&gt;&lt;a name=&quot;ChangeTracking&quot;&gt;&lt;/a&gt;Change Tracking&lt;/h3&gt;

&lt;p&gt;If value objects are supposed to be immutable this is easy and might require no or few changes. If, however, we want to track changes in mutable value objects it might get more complicated.&lt;/p&gt;

&lt;p&gt;Components affected (among others): UnitOfWork, ...&lt;/p&gt;

</description>
                <environment></environment>
            <key id="10295">DDC-93</key>
            <summary>It would be nice if we could have support for ValueObjects</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="ablock">Avi Block</reporter>
                        <labels>
                    </labels>
                <created>Sun, 1 Nov 2009 14:27:35 +0000</created>
                <updated>Sun, 14 Apr 2013 10:18:46 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>37</votes>
                        <watches>31</watches>
                        <comments>
                    <comment id="10511" author="beberlei" created="Thu, 5 Nov 2009 13:06:26 +0000"  >&lt;p&gt;formated snippets nicely&lt;/p&gt;</comment>
                    <comment id="11150" author="trashofmasters" created="Wed, 9 Dec 2009 17:59:53 +0000"  >&lt;p&gt;I need this feature too.&lt;/p&gt;

&lt;p&gt;But I would suggest using the same annotation used by JPA&lt;/p&gt;

&lt;p&gt;@Embeddable&lt;/p&gt;

&lt;p&gt;+1&lt;/p&gt;</comment>
                    <comment id="11215" author="alan" created="Thu, 17 Dec 2009 19:07:36 +0000"  >&lt;p&gt;You should also take into consideration different storage strategies of ValueObjects.&lt;/p&gt;

&lt;p&gt;Martin Fowler points out -  in &#8222;PoEAA&quot;  - two approaches: &lt;a href=&quot;http://martinfowler.com/eaaCatalog/embeddedValue.html&quot; class=&quot;external-link&quot;&gt;Embedded Value (which is the one presented above)&lt;/a&gt; and &lt;a href=&quot;http://martinfowler.com/eaaCatalog/serializedLOB.html&quot; class=&quot;external-link&quot;&gt;Serialized LOB&lt;/a&gt; .&lt;br/&gt;
Both have their pros and cons, that&apos;s why Doctrine2 should give developers choice of selecting the fittest solution.&lt;/p&gt;</comment>
                    <comment id="11216" author="ablock" created="Thu, 17 Dec 2009 19:09:27 +0000"  >&lt;p&gt;Of course technically we can similate a serialized LOB with a new Doctrine 2 type.&lt;/p&gt;</comment>
                    <comment id="11217" author="alan" created="Thu, 17 Dec 2009 19:44:31 +0000"  >&lt;p&gt;I don&apos;t like that idea - Its so not generic.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;VO as a pattern&lt;/b&gt; is important building block of &lt;em&gt;domain model&lt;/em&gt;, which clearly indicates that &lt;b&gt;VO as a feature of Doctrine2&lt;/b&gt; should be tailor-made.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;To anyone of dev-team reading this issue: without VOs Doctrine is not yet DDD-ready, please hurry &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.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;
</comment>
                    <comment id="11230" author="romanb" created="Fri, 18 Dec 2009 13:58:19 +0000"  >&lt;p&gt;Serialized LOB is not very useful IMHO and has lots of problems (many mentioned in PoEEA already).&lt;/p&gt;

&lt;p&gt;@Alan: I appreciate your nice reminder and I&apos;m sure you mean it in a friendly way, but please keep in mind that noone is paid to work on this project. It all happens in free/spare time and the current state of the project already consumed at least 1 1/2 years spending many hours weekly on this project from me alone. Not to speak of the others.&lt;/p&gt;

&lt;p&gt;Thus, there is no point in demanding something or telling us to hurry. The best way to get a feature in is to provide a (&lt;b&gt;good&lt;/b&gt;) patch that we find worth including.&lt;/p&gt;

&lt;p&gt;I started to add notes to this issue to collect all the things that need to be done for this feature.&lt;/p&gt;

&lt;p&gt;In the meantime, its not too hard/ugly to get a half-way decent embedded value yourself:&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;/** @Entity @HasLifecycleCallbacks */
class Foo {
    &lt;span class=&quot;code-comment&quot;&gt;// annotations not shown
&lt;/span&gt;    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $embedded;
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $value1; &lt;span class=&quot;code-comment&quot;&gt;// never reveal to &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;
&lt;/span&gt;    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $value2; &lt;span class=&quot;code-comment&quot;&gt;// never reveal to &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;
&lt;/span&gt;    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $value3; &lt;span class=&quot;code-comment&quot;&gt;// never reveal to &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;
&lt;/span&gt;
   &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getEmbedded() {
       &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;embedded;
   }

   &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setEmbedded($embedded) {
       $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;embedded = $embedded;
   }
   
   /** @PrePersist @PreUpdate */
   function _destructEmbedded() {
       &lt;span class=&quot;code-comment&quot;&gt;// destruct $embedded into $value1, $value2, $value3
&lt;/span&gt;   }

   /** @PostLoad */
   function _constructEmbedded() {
      &lt;span class=&quot;code-comment&quot;&gt;// construct $embedded from $value1, $value2, $value3 
&lt;/span&gt;   }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Several variations of this are possible, also with an external event listener instead of callbacks but in that case you might need to use reflection to get at the values.&lt;/p&gt;</comment>
                    <comment id="11295" author="alan" created="Fri, 25 Dec 2009 12:10:42 +0000"  >&lt;p&gt;I want to share my thoughts on possible VOs collections implementations.&lt;/p&gt;

&lt;p&gt;1. As it was mentioned earlier &lt;em&gt;serialized (C)LOB&lt;/em&gt; is one solution. Implementation of storing/retrieving object graphs alone is quite simple, but it&apos;s complex in terms of SELECTs with conditions.&lt;br/&gt;
Composing SQL condition would result in some nasty constructions e.g. &lt;tt&gt;vo_collection_column LIKE &apos;%foo%bar%&apos;&lt;/tt&gt; which output format would depend on serialization target (CSV, XML, YAML, PHP serialized objects etc.). Also in most cases it would be impossible to obtain eligible result.&lt;/p&gt;

&lt;p&gt;I&apos;m not taking Regexp or XPath operators into consideration as only few RDBMS support them.&lt;/p&gt;

&lt;p&gt;2. The second solution is to break VOs graph into separate related table... or tables if we consider that &lt;b&gt;VO can contain another VO(s)&lt;/b&gt;. It&apos;s not so fast as &lt;em&gt;serialized LOB&lt;/em&gt; but more flexible and it utilize power of RDMS,&lt;br/&gt;
But there is one catch: Doctrine2 must preserve nature of VO. To make it happen during Entities persisting - if any change in dependant VOs graph has been made - all associated VOs rows in database should be deleted and the new/changed VOs graph should be inserted in their place.&lt;br/&gt;
I know it could be inefficient while dealing with large object graphs, yet faster than comparing VOs one-by-one.&lt;/p&gt;

&lt;p&gt;In conclusion:&lt;br/&gt;
&lt;em&gt;serialized LOB&lt;/em&gt; is extremely fast in CRUD-like operations on aggregates, however very search unfriendly.  &lt;br/&gt;
Separate ValueObjects tables are better where  &lt;em&gt;serialized LOB&lt;/em&gt; lacks, but slower in exploitation.&lt;/p&gt;

&lt;p&gt;I can&apos;t tell which approach is superior, because each of them is valid under different circumstances.&lt;/p&gt;

&lt;p&gt;Hope this helps.&lt;/p&gt;

&lt;p&gt;&lt;cite&gt;@Alan: I appreciate your nice reminder and I&apos;m sure you mean it in a friendly way  &lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt;&lt;/cite&gt;&lt;/p&gt;

&lt;p&gt;Of course I do.&lt;/p&gt;</comment>
                    <comment id="12131" author="beberlei" created="Sat, 13 Mar 2010 06:20:04 +0000"  >&lt;p&gt;It would be easy to implement value objects in userland using the XML capabilities of many RDBMS:&lt;/p&gt;

&lt;p&gt;1. Implement an Xpath function on the Dql Parser&lt;br/&gt;
2. Implement a User-Defined Type for each value object that handles the translation from and to XML.&lt;/p&gt;

&lt;p&gt;The second point can be heavily optimized when value objects are immutable with an own identiy map of value types inside the Type flyweight instance.&lt;/p&gt;</comment>
                    <comment id="12139" author="ablock" created="Sat, 13 Mar 2010 19:54:54 +0000"  >&lt;p&gt;I more or less suggested something similar above.&lt;/p&gt;</comment>
                    <comment id="12141" author="beberlei" created="Sun, 14 Mar 2010 04:47:41 +0000"  >&lt;p&gt;ah, my bad - i must have overseen this &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.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;</comment>
                    <comment id="12978" author="jkleijn" created="Sun, 16 May 2010 11:50:31 +0000"  >&lt;p&gt;+1&lt;/p&gt;

&lt;p&gt;This would be awesome.&lt;/p&gt;</comment>
                    <comment id="14689" author="mpdude" created="Tue, 9 Nov 2010 05:48:24 +0000"  >&lt;p&gt;Don&apos;t forget (especially with regard to SLOBs) that values might in turn contain references to Entities.&lt;/p&gt;

&lt;p&gt;Example: An &quot;Order&quot; might be an @Entity and might have a field (an array) of OrderLineItems as value. Each OrderLineItem might e. g. carry quantity or disconunt and references a Product (@Entity).&lt;/p&gt;

&lt;p&gt;So even if you don&apos;t need the traversal from Product to all the Orders it is contained in, serializing the OrderLineItems needs a way to &quot;cut off&quot; the object graph at the transition towards the Product &lt;b&gt;but&lt;/b&gt; must place some kind of referral there so that upon unserialization (of the OrderLineItem list, that is, during Order load) the Product references in every OrderLineItem are at least initialized with proxies again.&lt;/p&gt;

&lt;p&gt;Don&apos;t know whether/how referential integrity (OrderLineItems &amp;lt;-&amp;gt; Products) would make sense or could be implemented here.&lt;/p&gt;</comment>
                    <comment id="15002" author="beberlei" created="Fri, 24 Dec 2010 04:24:27 +0000"  >&lt;p&gt;Pushed back to 2.x, this feature is probably the largest feature request we have and we&apos;d rather focus on small improvements for 2.1&lt;/p&gt;</comment>
                    <comment id="15124" author="zampano" created="Tue, 11 Jan 2011 10:45:33 +0000"  >&lt;p&gt;Several thinks to consider/not to oversee here:&lt;/p&gt;

&lt;p&gt;1) There are value objects with identity. I know that is not DDD-conform but only at first sight. It means they are technically entities but are treated like VOs.&lt;br/&gt;
Common examples are Zipcode or country. As they have identity (e.g. Zipcode: de-40723) they are entities but are created and interchanged like normal VOs.&lt;br/&gt;
On the google DDD-List they were often referenced aS Lookup Entities.&lt;/p&gt;


&lt;p&gt;2) In virtually all (business) cases a collection of VO is an Entity. How else could you reference (add or remove) single elements of that list?&lt;br/&gt;
There are exceptions here like a undefinded number of VOs in a collection, but in that case you can only add or remove a quantity of it.&lt;br/&gt;
As a true collection (say 3 addresses for a client = Entity ClientAdresses) you would have to give them some kind of identity, even if it is only having &lt;br/&gt;
a sequential number in that collection.&lt;/p&gt;

&lt;p&gt;@Matthias: OrderLineItems is an example of actually being an Entity.&lt;/p&gt;</comment>
                    <comment id="15906" author="else" created="Fri, 3 Jun 2011 19:17:58 +0000"  >&lt;p&gt;Hi guys. I face this in my own way. Hope you won&apos;t wake up your neighbours with loud laugh.&lt;/p&gt;

&lt;p&gt;Every @Entity extends my BaseEntity object which provide kind of wrap for value with ValueBase object. So when want to get/set value from entity you call $entity-&amp;gt;getData() where you won&apos;t get value  &quot;data&quot; but wrapping ValueBase for value &quot;data&quot;. Then you can get bare value by getValue(). Name of value class is in annotation and would be child of ValueBase. &lt;/p&gt;

&lt;p&gt;There&apos;s also parent class Base for EntityBase and ValueBase. In my case class Base is something like HTML element. So in the end you can use $entity-&amp;gt;renderHtml() or $value-&amp;gt;renderHtml() no matter if you&apos;re rendering value or @Entity. There&apos;s more features like validation, filtering and hydration value/entity from HTML forms, but it&apos;s extra.&lt;/p&gt;

&lt;p&gt;Implementation:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;&quot;Base.php&quot;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
 /* @MappedSuperclass */
&lt;span class=&quot;code-keyword&quot;&gt;abstract&lt;/span&gt; class Base {
  /* there&apos;re methods like _getParent(), _getPropertyName(), etc. used in code behind */
}
&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;&quot;ValueBase.php&quot;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
&lt;span class=&quot;code-keyword&quot;&gt;abstract&lt;/span&gt; class ValueBase &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Base { 
   &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getValue() {
        &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;_getParent()-&amp;gt;{$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_getPropertyName()};
   }
   
   &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setValue($value) {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_getParent()-&amp;gt;{$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_getPropertyName()} = $value;
   }
}
&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;&quot;EntityBase.php&quot;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
/** @MappedSuperclass */
&lt;span class=&quot;code-keyword&quot;&gt;abstract&lt;/span&gt; class EntityBase &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Base {
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __call($name, $arguments) {
        /* get property object */
        $pattern = &apos;/^get(.*)$/u&apos;;
        preg_match($pattern, $name, $matches);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($matches[1])) {
            $propertyName = lcfirst($matches[1]);
            &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;get($propertyName);
        }

        /* set entity */
        $pattern = &apos;/^set(.*)$/u&apos;;
        preg_match($pattern, $name, $matches);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($matches[1])) {
            $propertyName = lcfirst($matches[1]);
            &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;set($propertyName, $arguments[0]);
        }
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function get($propertyName) {
	    $property = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_getElementProperty($propertyName);

	    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($property == &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
		&lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Exception(sprintf(&lt;span class=&quot;code-quote&quot;&gt;&quot;There isn&apos;t property like &apos;%s&apos;.&quot;&lt;/span&gt;, $propertyName));

	    /* &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; collections and entities */
	    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($property[&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;] == &lt;span class=&quot;code-quote&quot;&gt;&quot;collection&quot;&lt;/span&gt; || $property[&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;] == &lt;span class=&quot;code-quote&quot;&gt;&quot;entity&quot;&lt;/span&gt;) {
		$element = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;{$propertyName};
		&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($element != &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;) {
		    $element-&amp;gt;_setParent($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;);
		    $element-&amp;gt;_setPropertyName($propertyName);
		} elseif ($property[&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;] == &lt;span class=&quot;code-quote&quot;&gt;&quot;entity&quot;&lt;/span&gt;) {
		    $element = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; $property[&lt;span class=&quot;code-quote&quot;&gt;&quot;class&quot;&lt;/span&gt;];
		    $element-&amp;gt;_setParent($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;);
		    $element-&amp;gt;_setPropertyName($propertyName);
		    $element-&amp;gt;_setNullEntity();
		    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;{$propertyName} = $element;
		}
		&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $element;
	    }
	    &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
	    /* &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; values */
		&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!isset($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_loadedEntities[$propertyName])) {
		    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_loadedEntities[$propertyName] = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; $property[&lt;span class=&quot;code-quote&quot;&gt;&quot;class&quot;&lt;/span&gt;]($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;, $propertyName);
		}
		&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;_loadedEntities[$propertyName];
	    }
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function set($propertyName, $value) {
        $property = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_getElementProperty($propertyName);

        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($property == &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
            &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Exception(sprintf(&lt;span class=&quot;code-quote&quot;&gt;&quot;There isn&apos;t property like &apos;%s&apos;.&quot;&lt;/span&gt;, $propertyName));

        /* &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; collections and entities */
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($property[&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;] == &lt;span class=&quot;code-quote&quot;&gt;&quot;collection&quot;&lt;/span&gt; || $property[&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;] == &lt;span class=&quot;code-quote&quot;&gt;&quot;entity&quot;&lt;/span&gt;) {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;{$propertyName} = $value;
        }
        /* &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; values */ &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
            &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Exception(sprintf(&lt;span class=&quot;code-quote&quot;&gt;&quot;Can&apos;t call set on value property &apos;%s&apos;.&quot;&lt;/span&gt;, $propertyName));
        }

        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Note that there&apos;s something i call &quot;NullEntity&quot;. Instead of getting bare &quot;null&quot; you&apos;ll get @Entity child of EntityBase, where is set property nullEntity. Then there&apos;s posibility to work with null entity (for example renderHtml with empty inputs).&lt;/p&gt;

&lt;p&gt;It would be nice, if this is support by Doctrine natively, because i have some performace problems with my implementation. If it&apos;s interest in my whole code i can send you. But of course there&apos;s some security holes so i&apos;ll send it privetely. Thanks for understand and for Doctrine of course.&lt;/p&gt;</comment>
                    <comment id="16166" author="mathiasverraes" created="Wed, 13 Jul 2011 06:22:23 +0000"  >&lt;p&gt;Note that Roman&apos;s workaround presented here does not work.&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;   /** @PrePersist @PreUpdate */
   function _destructEmbedded() {
       &lt;span class=&quot;code-comment&quot;&gt;// destruct $embedded into $value1, $value2, $value3
&lt;/span&gt;   }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Doctrine tracks changes and does not perform updates when no changes are found. $embedded is not mapped, so it&apos;s not tracked and won&apos;t be taken into account by Doctrine when updating. Therefore, if $embedded is the only value that was changed, the PreUpdate event won&apos;t be triggered.&lt;/p&gt;

&lt;p&gt;The easiest thing to do is to simply destruct the VO on every mutation:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;   &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setEmbedded($embedded) {
       $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;embedded = $embedded;
       $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_destructEmbedded();
   }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The downside is that you need to remember to call the method in every setter, but apart from that, there are no side effects, it always works and it&apos;s just one line of code &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.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;_constructEmbedded() keeps working as is, postLoad will always be triggered.&lt;/p&gt;</comment>
                    <comment id="17022" author="dbenjamin" created="Sun, 18 Dec 2011 10:45:26 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;This feature would be awesome ! &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;br/&gt;
VOs are really essential in a good domain design.&lt;/p&gt;

&lt;p&gt;If you plan to implement this, please remember that you can have nested VOs.&lt;br/&gt;
Take the design for a Booking process for instance, you would have a DateRange object embedding two DateTime objects (in the simplest case).&lt;/p&gt;

&lt;p&gt;I have no doubts that you&apos;ve already took this in consideration, but i prefer pointing this out, just in case &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.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;


</comment>
                    <comment id="17311" author="beberlei" created="Fri, 20 Jan 2012 16:34:06 +0000"  >&lt;p&gt;work has been started, &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/265&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/265&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19036" author="mpdude" created="Fri, 23 Nov 2012 08:36:53 +0000"  >&lt;p&gt;Does the new &quot;complex sql types&quot; feature help here - I mean, could that be used to map a value object to more than one column in the database?&lt;/p&gt;</comment>
                    <comment id="19520" author="songoko20000" created="Sun, 10 Feb 2013 11:52:55 +0000"  >&lt;p&gt;@Benjamin Eberlei The request seems to be closed in the link you provided! Does that mean that this feature won&apos;t be implemented?!&lt;/p&gt;</comment>
                    <comment id="19524" author="ocramius" created="Sun, 10 Feb 2013 18:11:36 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=songoko20000&quot; class=&quot;user-hover&quot; rel=&quot;songoko20000&quot;&gt;songoko songowan&lt;/a&gt; no, it just probably wasn&apos;t the correct way of implementing this&lt;/p&gt;</comment>
                    <comment id="19980" author="danielpitts" created="Thu, 11 Apr 2013 18:58:11 +0000"  >&lt;p&gt;I&apos;m curious if any effort is currently being put into this.  I would really love to have this feature available.&lt;/p&gt;</comment>
                    <comment id="19981" author="ocramius" created="Thu, 11 Apr 2013 19:02:30 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=danielpitts&quot; class=&quot;user-hover&quot; rel=&quot;danielpitts&quot;&gt;Daniel Pitts&lt;/a&gt; this is being developed in &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-2374&quot; title=&quot;[GH-634] [WIP] Value objects&quot;&gt;DDC-2374&lt;/a&gt; ( &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/634&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/634&lt;/a&gt; )&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="11530">DDC-648</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                                <inwardlinks description="is referenced by">
                            <issuelink>
            <issuekey id="14731">DDC-2374</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2374] [GH-634] [WIP] Value objects</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2374</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of beberlei:&lt;/p&gt;

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

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

&lt;p&gt;This pull request takes a different approach than GH-265 to implement ValueObjects. Instead of changing most of the code in every layer, we just inline embedded object class metadata into an entities metadata and then use a reflection proxy that looks like &quot;ReflectionProperty&quot; to do the rewiring.&lt;/p&gt;

&lt;p&gt;The idea is inspired from Symfony Forms &apos;property_path&apos; option, where you can write and read values to different parts of an object graph.&lt;/p&gt;

&lt;p&gt;This is a WIP, there have been no further tests made about the consequences of this approach. The implementation is up for discussion.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14731">DDC-2374</key>
            <summary>[GH-634] [WIP] Value objects</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 26 Mar 2013 23:13:41 +0000</created>
                <updated>Sun, 14 Apr 2013 10:18:46 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>4</watches>
                            <issuelinks>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                <outwardlinks description="relates to">
                            <issuelink>
            <issuekey id="10295">DDC-93</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2381] Pagination query can be simplified when simple joins are applied</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2381</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi.&lt;br/&gt;
In mysql db table i have &amp;gt; 200,000 items.&lt;br/&gt;
I use native doctrine pagination for paging the items list.&lt;br/&gt;
But generated query that gets ids for items list in paging works more then 150 sec on my workstation&lt;/p&gt;

&lt;p&gt;SELECT DISTINCT id0 FROM (SELECT m0_.id AS id0, m0_.title AS title1, m0_.text AS text2, m0_.price AS price3, m0_.originalPrice AS originalPrice4, m0_.condition_type AS condition_type5, m0_.image_1 AS image_16, m0_.image_2 AS image_27, m0_.image_3 AS image_38, m0_.image_4 AS image_49, m0_.image_5 AS image_510, m0_.video AS video11, m0_.contact_email AS contact_email12, m0_.contact_name AS contact_name13, m0_.contact_phone AS contact_phone14, m0_.contact_type AS contact_type15, m0_.published AS published16, m0_.type AS type17, m0_.status AS status18, m0_.highlight AS highlight19, m0_.urgent AS urgent20, m0_.topads AS topads21, m0_.period AS period22, m0_.hits AS hits23, m0_.ip AS ip24, m0_.created_at AS created_at25, m0_.updated_at AS updated_at26 FROM milla_message m0_ INNER JOIN milla_currency m1_ ON m0_.currency_id = m1_.id INNER JOIN milla_category m2_ ON m0_.category_id = m2_.id INNER JOIN milla_region m3_ ON m0_.region_id = m3_.id INNER JOIN milla_city m4_ ON m0_.city_id = m4_.id WHERE m0_.status = 1 ORDER BY m0_.published DESC) dctrn_result LIMIT 20 OFFSET 0&lt;/p&gt;

&lt;p&gt;source code&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php#L141&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php#L141&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;why SELECT DISTINCT %s FROM (%s) dctrn_result ???&lt;br/&gt;
why not SELECT DISTINCT m0_.id AS id0 FROM milla_message m0_ WHERE m0_.status = 1 ORDER BY m0_.published DESC LIMIT 20 OFFSET 0&lt;/p&gt;</description>
                <environment></environment>
            <key id="14746">DDC-2381</key>
            <summary>Pagination query can be simplified when simple joins are applied</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="sergic">Sergey Gerdel</reporter>
                        <labels>
                        <label>paginator</label>
                    </labels>
                <created>Sun, 31 Mar 2013 13:58:43 +0000</created>
                <updated>Mon, 8 Apr 2013 22:32:03 +0000</updated>
                                    <version>2.3</version>
                <version>2.4</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19908" author="ocramius" created="Sun, 31 Mar 2013 14:09:48 +0000"  >&lt;p&gt;Not a blocker&lt;/p&gt;</comment>
                    <comment id="19909" author="ocramius" created="Sun, 31 Mar 2013 14:14:11 +0000"  >&lt;p&gt;What&apos;s the result of `EXPLAIN` on a query without the subquery?&lt;/p&gt;</comment>
                    <comment id="19910" author="sergic" created="Sun, 31 Mar 2013 14:52:02 +0000"  >&lt;p&gt;explain without the subquery&lt;/p&gt;</comment>
                    <comment id="19911" author="ocramius" created="Sun, 31 Mar 2013 14:56:28 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=sergic&quot; class=&quot;user-hover&quot; rel=&quot;sergic&quot;&gt;Sergey Gerdel&lt;/a&gt; that&apos;s not the same query.&lt;/p&gt;</comment>
                    <comment id="19912" author="ocramius" created="Sun, 31 Mar 2013 15:09:52 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=sergic&quot; class=&quot;user-hover&quot; rel=&quot;sergic&quot;&gt;Sergey Gerdel&lt;/a&gt; this is still using&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;Using index; Using temporary; Using filesort
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Check your indexes&lt;/p&gt;</comment>
                    <comment id="19913" author="sergic" created="Sun, 31 Mar 2013 20:42:19 +0000"  >&lt;p&gt;Not in the index problem&lt;/p&gt;

&lt;p&gt;SELECT DISTINCT id0 FROM (SELECT m0_.id AS id0, m0_.title AS title1, m0_.text AS text2, m0_.price AS price3, m0_.originalPrice AS originalPrice4, m0_.condition_type AS condition_type5, m0_.image_1 AS image_16, m0_.image_2 AS image_27, m0_.image_3 AS image_38, m0_.image_4 AS image_49, m0_.image_5 AS image_510, m0_.video AS video11, m0_.contact_email AS contact_email12, m0_.contact_name AS contact_name13, m0_.contact_phone AS contact_phone14, m0_.contact_type AS contact_type15, m0_.published AS published16, m0_.type AS type17, m0_.status AS status18, m0_.highlight AS highlight19, m0_.urgent AS urgent20, m0_.topads AS topads21, m0_.period AS period22, m0_.hits AS hits23, m0_.ip AS ip24, m0_.created_at AS created_at25, m0_.updated_at AS updated_at26 FROM milla_message m0_ WHERE m0_.status = 1 ORDER BY m0_.published DESC) dctrn_result LIMIT 20 OFFSET 0&lt;/p&gt;

&lt;p&gt;Time: 104.614s explain 3&lt;/p&gt;

&lt;p&gt;SELECT DISTINCT m0_.id AS id0 FROM milla_message m0_ WHERE m0_.status = 1 ORDER BY m0_.published DESC LIMIT 20 OFFSET 0; &lt;/p&gt;

&lt;p&gt;Time: 0.001s explain 4&lt;/p&gt;</comment>
                    <comment id="19914" author="ocramius" created="Mon, 1 Apr 2013 06:17:54 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=sergic&quot; class=&quot;user-hover&quot; rel=&quot;sergic&quot;&gt;Sergey Gerdel&lt;/a&gt; the ORM cannot simplify a complex query that way. There may be a conditional on one of the joined results, or generally usage of one of the joined results.&lt;/p&gt;

&lt;p&gt;Things that &lt;b&gt;could&lt;/b&gt; be optimized here are:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Removal of the `ORDER BY` clause when grouping (check ORM master, I think somebody already did that)&lt;/li&gt;
	&lt;li&gt;Trying to simplify the query by doing some serious hacking on the AST.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The problem I see here is that the chance to spawn random bugs because of the optimization is very high, and you&apos;d have to rewrite `walkSelectStatement`&lt;/p&gt;</comment>
                    <comment id="19915" author="ocramius" created="Mon, 1 Apr 2013 06:19:15 +0000"  >&lt;p&gt;Marking as improvement&lt;/p&gt;</comment>
                    <comment id="19950" author="sergic" created="Sun, 7 Apr 2013 10:52:01 +0000"  >&lt;p&gt;Minor? &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/biggrin.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;br/&gt;
i have 100 sec for this query.&lt;br/&gt;
200k items are selected for temporary table. wtf?&lt;/p&gt;

&lt;p&gt;OK. Programmers may be mistaken in parser&lt;br/&gt;
expect ORDER BY m0_.published DESC LIMIT 20 OFFSET 0) dctrn_result &lt;br/&gt;
Time: 0.001s&lt;/p&gt;

&lt;p&gt;reality ORDER BY m0_.published DESC) dctrn_result LIMIT 20 OFFSET 0&lt;/p&gt;</comment>
                    <comment id="19951" author="ocramius" created="Sun, 7 Apr 2013 11:22:41 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=sergic&quot; class=&quot;user-hover&quot; rel=&quot;sergic&quot;&gt;Sergey Gerdel&lt;/a&gt; this problem does not introduce security issues and can be worked around by you while using your own pagination logic. It does not stop you from doing anything, that&apos;s why it&apos;s minor. &lt;/p&gt;</comment>
                    <comment id="19965" author="sergic" created="Mon, 8 Apr 2013 22:32:03 +0000"  >&lt;p&gt;ok)&lt;br/&gt;
i have already created my own paginator.&lt;br/&gt;
at last&lt;br/&gt;
please see how to fix this problem&lt;br/&gt;
&lt;a href=&quot;https://github.com/Sergic/doctrine2/commit/2733c815387273d3bd199a68acb717e0cbc8ccfe&quot; class=&quot;external-link&quot;&gt;https://github.com/Sergic/doctrine2/commit/2733c815387273d3bd199a68acb717e0cbc8ccfe&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11514" name="EXPLAIN.htmL" size="6667" author="sergic" created="Sun, 31 Mar 2013 13:58:43 +0000" />
                    <attachment id="11515" name="EXPLAIN1.html" size="3006" author="sergic" created="Sun, 31 Mar 2013 14:51:57 +0000" />
                    <attachment id="11517" name="EXPLAIN2.html" size="4690" author="sergic" created="Sun, 31 Mar 2013 15:08:08 +0000" />
                    <attachment id="11518" name="EXPLAIN3.htm" size="4083" author="sergic" created="Sun, 31 Mar 2013 20:42:11 +0000" />
                    <attachment id="11519" name="EXPLAIN4.htm" size="3006" author="sergic" created="Sun, 31 Mar 2013 20:42:16 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2119] Problem with inheritance type:  INHERITANCE_TYPE_NONE and INHERITANCE_TYPE_TABLE_PER_CLASS </title>
                <link>http://doctrine-project.org/jira/browse/DDC-2119</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I tried to create inheritance entities with save policy table per class.&lt;br/&gt;
Simple fileds was created normally, but a field with ManyToOne type was lost.&lt;/p&gt;

&lt;p&gt;I had found a solution.&lt;/p&gt;

&lt;p&gt;In Doctrine\ORM\Tools\SchemaTool&lt;br/&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;
&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; function _gatherRelationsSql($class, $table, $schema)
    {
        foreach ($class-&amp;gt;associationMappings as $fieldName =&amp;gt; $mapping) {

           &lt;span class=&quot;code-comment&quot;&gt;// &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($mapping[&apos;inherited&apos;])) { // - old version
&lt;/span&gt;
	/**
             * SSW
             * It&apos;s the solution
             */
	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($mapping[&apos;inherited&apos;]) &amp;amp;&amp;amp; !$class-&amp;gt;isInheritanceTypeNone() &amp;amp;&amp;amp; !$class-&amp;gt;isInheritanceTypeTablePerClass() ) {
                &lt;span class=&quot;code-keyword&quot;&gt;continue&lt;/span&gt;;
            }            

            $foreignClass = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getClassMetadata($mapping[&apos;targetEntity&apos;]);
...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But it was enough. In DQL query a simple query was made wrong.&lt;/p&gt;

&lt;p&gt;I had found a solution again.&lt;br/&gt;
In Doctrine\ORM\Query\SqlWalker&lt;br/&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;
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function walkSelectExpression($selectExpression)
...

                &lt;span class=&quot;code-comment&quot;&gt;// original =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($mapping[&apos;inherited&apos;])){
&lt;/span&gt;                &lt;span class=&quot;code-comment&quot;&gt;// It&apos;s the solution
&lt;/span&gt;                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($mapping[&apos;inherited&apos;]) &amp;amp;&amp;amp; !$class-&amp;gt;isInheritanceTypeNone() &amp;amp;&amp;amp; !$class-&amp;gt;isInheritanceTypeTablePerClass()) {
                    $tableName = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getClassMetadata($mapping[&apos;inherited&apos;])-&amp;gt;table[&apos;name&apos;];
                } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
                    $tableName = $class-&amp;gt;table[&apos;name&apos;];
                }
...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This problems are topical for inheritance type:  INHERITANCE_TYPE_NONE and INHERITANCE_TYPE_TABLE_PER_CLASS. &lt;/p&gt;

&lt;p&gt;I don&apos;t know, may be my solutions are wrong. But some programmers want to correctly work with INHERITANCE_TYPE_TABLE_PER_CLASS.&lt;/p&gt;

&lt;p&gt;Sorry for my english.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14189">DDC-2119</key>
            <summary>Problem with inheritance type:  INHERITANCE_TYPE_NONE and INHERITANCE_TYPE_TABLE_PER_CLASS </summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="sergsw">SergSW</reporter>
                        <labels>
                        <label>dql</label>
                        <label>schematool</label>
                    </labels>
                <created>Sat, 3 Nov 2012 18:57:00 +0000</created>
                <updated>Mon, 8 Apr 2013 20:43:37 +0000</updated>
                                    <version>2.1</version>
                                                <component>DQL</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="18924" author="fabio.bat.silva" created="Mon, 5 Nov 2012 22:17:32 +0000"  >&lt;p&gt;Hi SergSW &lt;/p&gt;

&lt;p&gt;Could you try to write a failing test case ?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                    <comment id="18950" author="sergsw" created="Tue, 6 Nov 2012 23:55:43 +0000"  >&lt;p&gt;SSW/TestBundle with the problem&lt;/p&gt;</comment>
                    <comment id="18951" author="sergsw" created="Wed, 7 Nov 2012 00:06:03 +0000"  >&lt;p&gt;I install the Symfony v2.0.18. and made small TestBundle.&lt;br/&gt;
I made schema database, by CLI &quot;console doctrine:schema:update --force&quot;&lt;br/&gt;
Result: Database schema updated successfully!&lt;br/&gt;
But I saw that I lost a field &apos;user_id&apos; in a table &apos;AttachTree&apos; (see Attach)&lt;/p&gt;</comment>
                    <comment id="18952" author="sergsw" created="Wed, 7 Nov 2012 00:06:32 +0000"  >&lt;p&gt;MySQL dump&lt;/p&gt;</comment>
                    <comment id="18971" author="beberlei" created="Mon, 12 Nov 2012 14:33:25 +0000"  >&lt;p&gt;Adjusted example formatting, don&apos;t apologize for your English, thanks for the report!&lt;/p&gt;</comment>
                    <comment id="19176" author="beberlei" created="Mon, 24 Dec 2012 09:08:14 +0000"  >&lt;p&gt;What version of 2.1 are you using? We don&apos;t actually support 2.1 anymore. Inheritance has always worked as used in hundrets of unit-tests, this changes look quite major a bug to have been missed before. I can&apos;t really explain whats happening here.&lt;/p&gt;</comment>
                    <comment id="19371" author="ocramius" created="Wed, 23 Jan 2013 21:36:22 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=sergsw&quot; class=&quot;user-hover&quot; rel=&quot;sergsw&quot;&gt;SergSW&lt;/a&gt; news?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11345" name="dump.sql" size="4947" author="sergsw" created="Wed, 7 Nov 2012 00:06:32 +0000" />
                    <attachment id="11344" name="SSWTestBundle.rar" size="5526" author="sergsw" created="Tue, 6 Nov 2012 23:55:43 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1605] No documentation about the usage of indexes with YAML and XML</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1605</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am missing documentation about how to handle indexes in YAML and XML definition files. I had to search in the code to learn how to do that.&lt;br/&gt;
Please add some documentation about it.&lt;/p&gt;

&lt;p&gt;This issue is related to #&lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-160&quot; title=&quot;Index annotation documentation&quot;&gt;&lt;del&gt;DDC-160&lt;/del&gt;&lt;/a&gt; where the reporter asked for documentation about indexes in annotation mapping.&lt;/p&gt;

&lt;p&gt;EDIT:&lt;br/&gt;
Maybe an example how I have done it with YAML would be helpful for others:&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;
User:
  type: entity
  fields:
    id:
      id: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      type: integer
      generator:
        strategy: IDENTITY
    email:
      type: string
      length: 150
      unique: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
    active:
      type: &lt;span class=&quot;code-object&quot;&gt;boolean&lt;/span&gt;
  indexes:
    indexActiveField: { name: idx_user_active, columns: [ active ] }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;tt&gt;indexActiveField&lt;/tt&gt; is the name of the index used by doctrine and &lt;tt&gt;idx_user_active&lt;/tt&gt; is the name of the index in the database. The rest should be clear.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13366">DDC-1605</key>
            <summary>No documentation about the usage of indexes with YAML and XML</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://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="naitsirch">Christian Stoller</reporter>
                        <labels>
                        <label>documentation</label>
                    </labels>
                <created>Mon, 16 Jan 2012 10:24:00 +0000</created>
                <updated>Mon, 8 Apr 2013 20:29:19 +0000</updated>
                                                                    <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18738" author="naitsirch" created="Thu, 27 Sep 2012 19:26:58 +0000"  >&lt;p&gt;Hi. I got an email notification that arbuscula has changed the status to &quot;Awaiting Feedback&quot;. Do you need any feedback from me?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2390] Remove Parser and SQLWalker dependency on Query</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2390</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Query is too powerful to be available in Parser and SQLWalker, because it may lead to accessing data that changes on subsequent runs of a query that is cached.&lt;/p&gt;

&lt;p&gt;Idea is to introduce a MetadataBag that contains only the values that are allowed to be accessed.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14759">DDC-2390</key>
            <summary>Remove Parser and SQLWalker dependency on Query</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 4 Apr 2013 19:35:02 +0000</created>
                <updated>Thu, 4 Apr 2013 19:35:02 +0000</updated>
                                                    <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2237] oracle IN statement with more than 1000 values</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2237</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;If I have a query with a IN statement with more tahn 1000 values I get an sql error.&lt;/p&gt;

&lt;p&gt;I&apos;ve try IN with implode:&lt;br/&gt;
select * from test where id IN(&apos; . implode(&apos;,&apos;, $values) . &apos;)&lt;br/&gt;
and I&apos;ve also try with executeQuery:&lt;br/&gt;
select * from test where id IN(:test)&lt;br/&gt;
  executeQuery($sql, array($values), array(\Doctrine\DBAL\Connection::PARAM_INT_ARRAY))&lt;/p&gt;</description>
                <environment></environment>
            <key id="14376">DDC-2237</key>
            <summary>oracle IN statement with more than 1000 values</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="1" iconUrl="http://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="mdrolet">Marc Drolet</reporter>
                        <labels>
                    </labels>
                <created>Fri, 11 Jan 2013 16:34:25 +0000</created>
                <updated>Tue, 2 Apr 2013 12:30:05 +0000</updated>
                                    <version>2.2.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19281" author="mdrolet" created="Fri, 11 Jan 2013 16:47:29 +0000"  >&lt;p&gt;Here is the way I&apos;ve implement the solution on my side: (for oracle)&lt;/p&gt;

&lt;p&gt;into Doctrine/DBAL/Statement.php, I&apos;ve add this method:&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;
/**
     * Binds a parameter value to the statement.
     * This is implemented &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; way &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; oracle only. Other drivers are redirected to bindValue method.
     *
     * The value will be bound with to the type provided (that required to be a table type).
     *
     * @param &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; $name The name or position of the parameter.
     * @param Array $value The value of the parameter.
     * @param &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; $type The name of the type to use to bind.
     * @&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;boolean&lt;/span&gt; TRUE on success, FALSE on failure.
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function bindList($name, Array $value, $type)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (&apos;oracle&apos; !== $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;platform-&amp;gt;getName())
        {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;bindValue($name, $value, $type);
        }
        &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
        {
            &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;stmt-&amp;gt;bindList($name, $value, $type);
        }
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;into Doctrine/DBAL/Driver/Statement.php I&apos;ve add:&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;
/**
     * @TODO: docs
     */
    function bindList($param, Array $values, $type);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;into Doctrine/DBAL/Driver/OCI8/OCI8Statement.php I&apos;ve add this method:&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;
/**
     * {@inheritdoc}
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function bindList($param, Array $value, $type)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!($list = oci_new_collection($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_dbh, $type)))
        {
            &lt;span class=&quot;code-comment&quot;&gt;//&lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; OCI8Exception::fromErrorInfo($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;errorInfo());
&lt;/span&gt;        }

        foreach ($value as $entry)
        {
            $list-&amp;gt;append($entry);
        }
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!oci_bind_by_name($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_sth, $param, $list, -1, OCI_B_NTY))
        {
            &lt;span class=&quot;code-comment&quot;&gt;//&lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; OCI8Exception::fromErrorInfo($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;errorInfo());
&lt;/span&gt;        }
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;// NOTE: we should probably add the bindList to all driver Statement object. &lt;/p&gt;

&lt;p&gt;into your code you can use it this way:&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;
$sql = &quot;
    SELECT *
    FROM test
    WHERE id IN
    (
        SELECT *
        FROM
        (
            CAST (: p_ids AS list_int_type)
        )
    )
&quot;;
$stmt = connection-&amp;gt;prepare($sql);
$stmt-&amp;gt;bindList(&apos;: p_ids&apos;, $ids, &apos;list_int_type&apos;);
$stmt-&amp;gt;execute();
$rs = $stmt-&amp;gt;fetchAll(PDO::FETCH_ASSOC);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;NOTE:&lt;br/&gt;
list_int_type need to be a valid oracle data type. You can create one with the name you want.&lt;br/&gt;
example:&lt;br/&gt;
you can have 2 type of accepted array of values:  integer and string&lt;br/&gt;
let&apos;s say we create one for string named: list_str_type  and one for integer list_int_type&lt;/p&gt;

&lt;p&gt; create or replace type list_str_type as table of varchar2(4000);&lt;br/&gt;
 create or replace type list_int_type as table of number;&lt;/p&gt;</comment>
                    <comment id="19924" author="beberlei" created="Mon, 1 Apr 2013 21:44:51 +0000"  >&lt;p&gt;Hey &lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=mdrolet&quot; class=&quot;user-hover&quot; rel=&quot;mdrolet&quot;&gt;Marc Drolet&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;thanks for the feedback and the solution, however i would like to have something generic that is working independent of the database driver. This code is very specific.&lt;/p&gt;

&lt;p&gt;Can you point me to some documentation why oci collection works with more than 1000 elements and how it works in PHP?&lt;/p&gt;</comment>
                    <comment id="19929" author="mdrolet" created="Tue, 2 Apr 2013 12:30:05 +0000"  >&lt;p&gt;Hi Benjamin,&lt;/p&gt;

&lt;p&gt;The limitation is not from the oci driver, it&apos;s an oracle limitation.  There are a couple of possible solution/implementation that can be done but the one I&apos;ve provide is the one that perform better for the test I&apos;ve done and from what I can found over the blogs I&apos;ve read.&lt;/p&gt;

&lt;p&gt;I can&apos;t find the exact documentation of oracle.  oracle doc is so poor. &lt;br/&gt;
Here is the best description link I can provide that describe some possible implementation.&lt;br/&gt;
&lt;a href=&quot;http://vsadilovskiy.wordpress.com/substituting-a-collection-for-in-list-performance-study/&quot; class=&quot;external-link&quot;&gt;http://vsadilovskiy.wordpress.com/substituting-a-collection-for-in-list-performance-study/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I don&apos;t know if there is similar limitation with other database.  With the implementation I&apos;ve provided, It will be possible to implement the proper solution depending on the database limitation you face otherwise it will execute the generic IN. What&apos;s bad, we need to create the type into the database.&lt;/p&gt;

&lt;p&gt;NOTE: In my case, I can not perform a sub-query, I get the my collection from a web service call.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2385] [GH-640] [Paginator]Add hidden field ordering for postgresql</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2385</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of denkiryokuhatsuden:&lt;/p&gt;

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

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

&lt;p&gt;In postgresql environment, when some hidden fields are used in orderBy clause,&lt;br/&gt;
they&apos;re not property added because $rsm-&amp;gt;scalarMappings don&apos;t have information about them.&lt;/p&gt;

&lt;p&gt;This change fixes above.&lt;/p&gt;

&lt;p&gt;I&apos;m afraid I&apos;m not sure which branch this will be merged, but anyway here&apos;s a patch.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14750">DDC-2385</key>
            <summary>[GH-640] [Paginator]Add hidden field ordering for postgresql</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 2 Apr 2013 10:01:27 +0000</created>
                <updated>Tue, 2 Apr 2013 10:01:27 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2214] extra single quotation in sql when using EntityRepository::findBy</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2214</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;m using symfony 2.1 with mysql.&lt;/p&gt;

&lt;p&gt;I have following code:&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;
$related = 
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getDoctrine()-&amp;gt;getRepository(&apos;MyWebBundle:LineRelated&apos;)
-&amp;gt;findBy(array(&apos;line&apos; =&amp;gt; $lines), array(&apos;count&apos; =&amp;gt; &apos;DESC&apos;), 20);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;that generate the sql 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-sql&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; *
&lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; line_related t0 
&lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; t0.line_id IN (&apos;6059&apos;, 126352, &apos;5677&apos;, &apos;6058&apos;) 
ORDER &lt;span class=&quot;code-keyword&quot;&gt;BY&lt;/span&gt; t0.count DESC 
LIMIT 20
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;please notice that the sql has extra single quotation around the number 6059,5677 and 6058. which make the sql very slow.&lt;/p&gt;

&lt;p&gt;I did a test, when using single quotation,the sql takes 300ms,when using without single quotation,the sql takes 1 ms.&lt;/p&gt;


</description>
                <environment></environment>
            <key id="14333">DDC-2214</key>
            <summary>extra single quotation in sql when using EntityRepository::findBy</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/inprogress.png">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="scourgen">scourgen</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Dec 2012 07:53:00 +0000</created>
                <updated>Mon, 1 Apr 2013 21:50:27 +0000</updated>
                                                    <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="19181" author="fabio.bat.silva" created="Wed, 26 Dec 2012 20:34:49 +0000"  >&lt;p&gt;Hi &lt;/p&gt;

&lt;p&gt;Could you please attach your entities or a failing test case ?&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;</comment>
                    <comment id="19182" author="scourgen" created="Thu, 27 Dec 2012 04:40:42 +0000"  >&lt;p&gt;sure&lt;/p&gt;

&lt;p&gt;LineRelated.php :&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
class LineRelated
{
    /**
     * @ORM\Id
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     * @ORM\GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;AUTO&quot;&lt;/span&gt;)
     */
     &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;

    /**
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Line&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;line_related&quot;&lt;/span&gt;)
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;line_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;,nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
     &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $line;
     
    /**
     * @ORM\Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;line_id_related&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $line_related;

    /**
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;smallint&quot;&lt;/span&gt;,nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
     &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $count = 0;

###### get/set etc....... #######
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Line.php&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
class Line
{
    /**
     * @ORM\Id
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     * @ORM\GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;AUTO&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;
########## blablabla #############

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;my action:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function right_line_relatedAction($line = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;, $title=&apos;&#30456;&#20851;&#32447;&#36335;&apos;)
    {

        $lines = $l-&amp;gt;getByUser($user, array());
&lt;span class=&quot;code-comment&quot;&gt;//anyway,$lines is an array,It has several elements,each element is an instance of LineEntity.
&lt;/span&gt;
        $related = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getDoctrine()-&amp;gt;getRepository(&apos;MyWebBundle:LineRelated&apos;)-&amp;gt;findBy(array(&apos;line&apos; =&amp;gt; $lines), array(&apos;count&apos; =&amp;gt; &apos;DESC&apos;), 20);
&lt;span class=&quot;code-comment&quot;&gt;//&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; findBy function generate the sql which is slow.
&lt;/span&gt;
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $related;
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="19184" author="fabio.bat.silva" created="Thu, 27 Dec 2012 19:41:37 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;How did you get this query string ?&lt;/p&gt;

&lt;p&gt;Repository#findBy does not quote the values,  It uses PDO:bindParam.&lt;br/&gt;
so the expected query string should be someting like : &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;
WHERE t0.line_id IN (?, ? ,?) 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I tried to reproduce but in my tests the generated Query binds the parameters as  &quot;PDO::PARAM_INT&quot;.&lt;/p&gt;

&lt;p&gt;I have added a test case. &lt;br/&gt;
Could you please can try to change it and make fails.&lt;/p&gt;


&lt;p&gt;Cheers&lt;/p&gt;</comment>
                    <comment id="19185" author="scourgen" created="Fri, 28 Dec 2012 06:02:41 +0000"  >&lt;p&gt;reproduced :&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;
SELECT t0.id AS id1, t0.line_id_related AS line_id_related2, t0.count AS count3, t0.line_id AS line_id4 FROM line_related t0 WHERE t0.line_id IN (&apos;6059&apos;, 4851, &apos;6068&apos;, 126352, &apos;6060&apos;, &apos;1000000&apos;) ORDER BY t0.count DESC LIMIT 20
Parameters: [[&apos;6059&apos;, 4851, &apos;6068&apos;, 126352, &apos;6060&apos;, &apos;1000000&apos;]] 
[Hide runnable query]
Time: 234.53 ms [   Explain query ]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;let me have a look on what&apos;s going on&lt;/p&gt;</comment>
                    <comment id="19186" author="scourgen" created="Fri, 28 Dec 2012 06:10:15 +0000"  >&lt;p&gt;interesting. I&apos;ve dump(using ladybug_dump) the $lines,and I found out that when the element is a Proxies Object(Object(Proxies&amp;#95;&lt;em&gt;GC&lt;/em&gt;_\My\WebBundle\Entity\Line)),then the id of that Object will be with quoted,when the elememt is an Real Entity,then It will be without quote.&lt;/p&gt;

&lt;p&gt;for example,in my last comment, the parameters is [&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;6059&amp;#39;, 4851, &amp;#39;6068&amp;#39;, 126352, &amp;#39;6060&amp;#39;, &amp;#39;1000000&amp;#39;&amp;#93;&lt;/span&gt;] &lt;br/&gt;
the result of dumping $lines is :&lt;/p&gt;

&lt;p&gt;array(6)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: object(Proxies&amp;#95;&lt;em&gt;CG&lt;/em&gt;_\Zuo\WebBundle\Entity\Line)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;: object(Zuo\WebBundle\Entity\Line)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt;: object(Proxies&amp;#95;&lt;em&gt;CG&lt;/em&gt;_\Zuo\WebBundle\Entity\Line)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;3&amp;#93;&lt;/span&gt;: object(Zuo\WebBundle\Entity\Line)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;4&amp;#93;&lt;/span&gt;: object(Proxies&amp;#95;&lt;em&gt;CG&lt;/em&gt;_\Zuo\WebBundle\Entity\Line)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;5&amp;#93;&lt;/span&gt;: object(Proxies&amp;#95;&lt;em&gt;CG&lt;/em&gt;_\Zuo\WebBundle\Entity\Line)&lt;/p&gt;

&lt;p&gt;tell me if you need more information. thanks&lt;/p&gt;</comment>
                    <comment id="19188" author="ocramius" created="Fri, 28 Dec 2012 09:16:41 +0000"  >&lt;p&gt;This may be because &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;$_identifier&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt; in proxies ( &lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/42e83a2716d19eada4f1cd49ece77d5f5229a239/lib/Doctrine/ORM/Proxy/ProxyFactory.php#L383&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/42e83a2716d19eada4f1cd49ece77d5f5229a239/lib/Doctrine/ORM/Proxy/ProxyFactory.php#L383&lt;/a&gt; ) is not necessarily composed by integers. This could be fixed with &lt;a href=&quot;http://doctrine-project.org/jira/browse/DCOM-96&quot; title=&quot;Extract a common ProxyFactory&quot;&gt;&lt;del&gt;DCOM-96&lt;/del&gt;&lt;/a&gt;. I&apos;ll add the tests to my development branch and will ping you back tomorrow &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.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;</comment>
                    <comment id="19190" author="scourgen" created="Fri, 28 Dec 2012 11:02:46 +0000"  >&lt;p&gt;thanks&lt;/p&gt;</comment>
                    <comment id="19236" author="ocramius" created="Sun, 6 Jan 2013 14:24:42 +0000"  >&lt;p&gt;I see what is going on here... But this should not be a problem anyway, since they&apos;re bound anyway as  &quot;PDO::PARAM_INT&quot;, as &lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=fabio.bat.silva&quot; class=&quot;user-hover&quot; rel=&quot;fabio.bat.silva&quot;&gt;Fabio B. Silva&lt;/a&gt; told you.&lt;/p&gt;

&lt;p&gt;That&apos;s only a problem with the logger showing them as string. PDO will handle the conversion before the value hits the DB as far as I know.&lt;/p&gt;</comment>
                    <comment id="19241" author="scourgen" created="Mon, 7 Jan 2013 03:48:30 +0000"  >&lt;p&gt;I can understand your point,but what I don&apos;t really get is that the execute time of sql is very long,that explained the quote should be in the sql,not like what you said,that&apos;s only a problem with the logger.&lt;/p&gt;</comment>
                    <comment id="19242" author="ocramius" created="Mon, 7 Jan 2013 06:56:16 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=scourgen&quot; class=&quot;user-hover&quot; rel=&quot;scourgen&quot;&gt;scourgen&lt;/a&gt; can you profile the difference directly in CLI? What about checking the bound parameter type? Are those values bound as INTs in your case?&lt;/p&gt;</comment>
                    <comment id="19244" author="scourgen" created="Mon, 7 Jan 2013 08:53:28 +0000"  >&lt;p&gt;@ocramius I wish I could, but I was using doctrine2 with symfony2,So It looks like It will takes some time to simulating all environment and settings that could allow me to reproduced the problem.&lt;/p&gt;

&lt;p&gt;but anyway,I will have a try and tell you what happen when I found something.&lt;/p&gt;</comment>
                    <comment id="19245" author="ocramius" created="Mon, 7 Jan 2013 08:58:19 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=scourgen&quot; class=&quot;user-hover&quot; rel=&quot;scourgen&quot;&gt;scourgen&lt;/a&gt; ok, awaiting your reply then&lt;/p&gt;</comment>
                    <comment id="19248" author="scourgen" created="Mon, 7 Jan 2013 17:48:04 +0000"  >&lt;p&gt;I&apos;ve spent some time on playing with native doctrine2. It took me awhile to setup everything. but I just don&apos;t get that how to retrive data with its Proxy ojbect(for example Proxies_CG_\My\WebBundle\Entity\Line).&lt;/p&gt;

&lt;p&gt;I mean the result of &lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getRepository(&lt;span class=&quot;code-quote&quot;&gt;&quot;something&quot;&lt;/span&gt;)-&amp;gt;findxxx()&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt; always return an array of real object. I can&apos;t reproduced the situation(#comment-19186) that happens on symfony2+doctrine2.&lt;/p&gt;

&lt;p&gt;anyway,I can make sure the problem is real exist,Because the execute time of that slow sql from the tool bar of symfony2 is same as I executed it at mysql cli. If the sql shows up on log with quote but running at mysql without quote,the execute time won&apos;t be same(actually It will be much more faster,in my case,20x times,from 2xxms to 10ms).&lt;/p&gt;
</comment>
                    <comment id="19250" author="ocramius" created="Mon, 7 Jan 2013 19:23:52 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=scourgen&quot; class=&quot;user-hover&quot; rel=&quot;scourgen&quot;&gt;scourgen&lt;/a&gt; you can use &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;$em-&amp;gt;getReference($className, $identifier)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt; (identifier being a key=&amp;gt;value array) to force proxies.&lt;/p&gt;

&lt;p&gt;Give it a try &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.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;</comment>
                    <comment id="19254" author="scourgen" created="Tue, 8 Jan 2013 04:27:34 +0000"  >&lt;p&gt;looks like I reproduced it.&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function testIssue()
    {   
         $no_used=   $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getRepository(__NAMESPACE__. &apos;\DDC2214Line&apos;)-&amp;gt;findOneById(1);
        $lines=array(
            &lt;span class=&quot;code-comment&quot;&gt;//$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getRepository(__NAMESPACE__. &apos;\DDC2214Line&apos;)-&amp;gt;findOneById(1),
&lt;/span&gt;            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getReference(__NAMESPACE__. &apos;\DDC2214Line&apos;,1),
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getReference(__NAMESPACE__. &apos;\DDC2214Line&apos;,&apos;2&apos;),
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getReference(__NAMESPACE__. &apos;\DDC2214Line&apos;,3),
        );  
        $logger  = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getConnection()-&amp;gt;getConfiguration()-&amp;gt;getSQLLogger();
        $ids     = array_map(function($r){
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $r-&amp;gt;id;
        }, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;relatedList);

        &lt;span class=&quot;code-comment&quot;&gt;//$related = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getRepository(__NAMESPACE__ . &apos;\DDC2214LineRelated&apos;)-&amp;gt;findBy(array(&apos;line&apos; =&amp;gt; $lines), array(&apos;count&apos; =&amp;gt; &apos;DESC&apos;), 20);
&lt;/span&gt;        $related = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;createQuery(&apos;select lr from &apos;.__NAMESPACE__ . &apos;\DDC2214LineRelated lr where lr.id in (:ids)&apos;)-&amp;gt;setParameter(&apos;ids&apos;,$lines)-&amp;gt;getResult();
            
        $query   = end($logger-&amp;gt;queries);
&lt;span class=&quot;code-comment&quot;&gt;//\Doctrine\Common\Util\Debug::dump($query[&apos;params&apos;]);
&lt;/span&gt;
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertCount(3, $related);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertEquals($ids, $query[&apos;params&apos;][0]);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertEquals(\Doctrine\DBAL\Connection::PARAM_INT_ARRAY, $query[&apos;types&apos;][0]);
    }   
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I use MySql Query log to see what&apos;s really happen in database(&lt;a href=&quot;http://dev.mysql.com/doc/refman/5.5/en/query-log.html&quot; class=&quot;external-link&quot;&gt;http://dev.mysql.com/doc/refman/5.5/en/query-log.html&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;this is the log from table mysql.general_log&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;
2013-01-08 12:23:44	[root] @ localhost [127.0.0.1]	59	0	Connect	root@localhost on doctrine_tests
2013-01-08 12:23:44	root[root] @ localhost [127.0.0.1]	59	0	Query	CREATE TABLE DDC2214Line (id INT AUTO_INCREMENT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB
2013-01-08 12:23:44	root[root] @ localhost [127.0.0.1]	59	0	Query	CREATE TABLE DDC2214LineRelated (id INT AUTO_INCREMENT NOT NULL, line_id INT NOT NULL, count SMALLINT NOT NULL, line_id_related INT NOT NULL, INDEX IDX_D31307994D7B7542 (line_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB
2013-01-08 12:23:44	root[root] @ localhost [127.0.0.1]	59	0	Query	ALTER TABLE DDC2214LineRelated ADD CONSTRAINT FK_D31307994D7B7542 FOREIGN KEY (line_id) REFERENCES DDC2214Line (id)
2013-01-08 12:23:44	root[root] @ localhost [127.0.0.1]	59	0	Query	START TRANSACTION
2013-01-08 12:23:44	root[root] @ localhost [127.0.0.1]	59	0	Query	INSERT INTO DDC2214Line (id) VALUES (&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
2013-01-08 12:23:44	root[root] @ localhost [127.0.0.1]	59	0	Query	INSERT INTO DDC2214Line (id) VALUES (&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
2013-01-08 12:23:44	root[root] @ localhost [127.0.0.1]	59	0	Query	INSERT INTO DDC2214Line (id) VALUES (&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
2013-01-08 12:23:44	root[root] @ localhost [127.0.0.1]	59	0	Query	INSERT INTO DDC2214LineRelated (count, line_id_related, line_id) VALUES (1, 1, 1)
2013-01-08 12:23:44	root[root] @ localhost [127.0.0.1]	59	0	Query	INSERT INTO DDC2214LineRelated (count, line_id_related, line_id) VALUES (2, 2, 2)
2013-01-08 12:23:44	root[root] @ localhost [127.0.0.1]	59	0	Query	INSERT INTO DDC2214LineRelated (count, line_id_related, line_id) VALUES (3, 3, 3)
2013-01-08 12:23:44	root[root] @ localhost [127.0.0.1]	59	0	Query	COMMIT
2013-01-08 12:23:44	root[root] @ localhost [127.0.0.1]	59	0	Query	SELECT t0.id AS id1 FROM DDC2214Line t0 WHERE t0.id = 1 LIMIT 1
2013-01-08 12:23:44	root[root] @ localhost [127.0.0.1]	59	0	Query	SELECT d0_.id AS id0, d0_.count AS count1, d0_.line_id_related AS line_id_related2, d0_.line_id AS line_id3 FROM DDC2214LineRelated d0_ WHERE d0_.id IN (1, &apos;2&apos;, 3)
2013-01-08 12:23:44	root[root] @ localhost [127.0.0.1]	59	0	Quit	
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;you can see,in database level,the second parameter of last query but two has quote (  (1, &apos;2&apos;, 3)  )&lt;/p&gt;</comment>
                    <comment id="19410" author="beberlei" created="Fri, 25 Jan 2013 16:25:25 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-247&amp;#93;&lt;/span&gt; was opened&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/common/pull/247&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/pull/247&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19424" author="beberlei" created="Sat, 26 Jan 2013 23:53:36 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-247&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/common/pull/247&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/pull/247&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11366" name="DDC2214Test.php" size="3004" author="fabio.bat.silva" created="Thu, 27 Dec 2012 19:41:37 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2203] add EntityManager-&gt;getFilters()-&gt;isEnabled(&apos;filterName&apos;&apos;)</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2203</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="14316">DDC-2203</key>
            <summary>add EntityManager-&gt;getFilters()-&gt;isEnabled(&apos;filterName&apos;&apos;)</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="noise085">Enea Bette</reporter>
                        <labels>
                    </labels>
                <created>Mon, 17 Dec 2012 15:05:45 +0000</created>
                <updated>Mon, 1 Apr 2013 21:50:27 +0000</updated>
                                    <version>Git Master</version>
                                <fixVersion>2.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19272" author="nemek_zg" created="Thu, 10 Jan 2013 15:59:21 +0000"  >&lt;p&gt;My pull request (&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/548&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/548&lt;/a&gt;) contains an implementation of the method. Note that no exception is thrown if you query for the state of a non-existing filter - in such a case, &lt;tt&gt;false&lt;/tt&gt; is returned as for disabled filters.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2332] [UnitOfWork::doPersist()] The spl_objact_hash() generate not unique hash!</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2332</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I created fixtures and some data was inserted many times without calling the &lt;tt&gt;Task&lt;/tt&gt; entity PrePersist event listener.&lt;/p&gt;

&lt;p&gt;I printed the used and generated hash and I saw a &lt;tt&gt;Proxies&amp;#95;&lt;em&gt;CG&lt;/em&gt;_\Asitly\ProjectManagementBundle\Entity\User&lt;/tt&gt; hash equal a &lt;tt&gt;Task&lt;/tt&gt; entity hash!&lt;/p&gt;</description>
                <environment>Symfony 2.1.8, php 5.4.7 and php 5.4.12, Windows 7</environment>
            <key id="14666">DDC-2332</key>
            <summary>[UnitOfWork::doPersist()] The spl_objact_hash() generate not unique hash!</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="1" iconUrl="http://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="fchris82">Kriszti&#225;n Ferenczi</reporter>
                        <labels>
                    </labels>
                <created>Tue, 5 Mar 2013 11:20:00 +0000</created>
                <updated>Mon, 1 Apr 2013 21:47:37 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="19808" author="ocramius" created="Tue, 5 Mar 2013 11:23:09 +0000"  >&lt;p&gt;Please provide either a code example or a test case. As it stands, this issue is incomplete&lt;/p&gt;</comment>
                    <comment id="19809" author="beberlei" created="Tue, 5 Mar 2013 11:35:10 +0000"  >&lt;p&gt;Are you calling EntityManager#clear() inbetween? Because PHP reuses the hashes. The ORM accounts for this.&lt;/p&gt;</comment>
                    <comment id="19811" author="beberlei" created="Tue, 5 Mar 2013 12:37:54 +0000"  >&lt;p&gt;This is not a reproduce case, i don&apos;t want to execute your whole project. &lt;/p&gt;

&lt;p&gt;I want to know, what is the actual bug that you see? Can you just print a list of all the hashes? Because the hashes dont differ at the end, bu tjust somewhere in the middle.&lt;/p&gt;</comment>
                    <comment id="19813" author="fchris82" created="Tue, 5 Mar 2013 12:47:24 +0000"  >&lt;p&gt;I attached a hashlogs.txt file. The last Task class hash is 0000000050ab4aba0000000058e1cb12 ( line 3 129 )&lt;/p&gt;

&lt;p&gt;This is not unique, view the line 2 760 . The Task is not being saved and the program don&apos;t call the prePersist listener. The &quot;UnitOfWork&quot; believe the entity has been saved because the &lt;tt&gt;isset($this-&amp;gt;entityStates&lt;span class=&quot;error&quot;&gt;&amp;#91;$oid&amp;#93;&lt;/span&gt;)&lt;/tt&gt; is true. But it is an other entity.&lt;/p&gt;</comment>
                    <comment id="19816" author="fchris82" created="Wed, 6 Mar 2013 01:23:24 +0000"  >&lt;p&gt;The &lt;tt&gt;EntityManager::clear()&lt;/tt&gt; fix the problem, but this is not &quot;good&quot; and &quot;beautiful&quot; solution. Shows no sign of that conflicts were and this is causing the problem. I was looking for the problem 7 hours.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11510" name="hashlogs.txt" size="331693" author="fchris82" created="Tue, 5 Mar 2013 12:47:24 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1149] Optimize OneToMany and ManyToMany without join</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1149</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&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; 
/**
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;users&quot;&lt;/span&gt;)
 */
class User {

    /**
     * @Column
     * @Id
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $user_id;

    /**
     * @Column
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $email;

    /**
     * @OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Language&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;user&quot;&lt;/span&gt;,fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;EAGER&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $languages;

}

/**
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_languages&quot;&lt;/span&gt;)
 */
class Language {

    /**
     * @Column
     * @Id
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $user_language_id;

    /**
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;User&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;languages&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_id&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $user;

    /**
     * @Column
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $user_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;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$users = $em-&amp;gt;getRepository(&apos;User&apos;)-&amp;gt;findAll();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Result:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT t0.user_id AS user_id1, t0.email AS email2 FROM users t0
SELECT t0.user_language_id AS user_language_id1, t0.user_id AS user_id2, t0.user_id AS user_id3 FROM user_languages t0 WHERE t0.user_id = ?
array(1) {
  [0]=&amp;gt;
  string(1) &lt;span class=&quot;code-quote&quot;&gt;&quot;1&quot;&lt;/span&gt;
}
array(1) {
  [0]=&amp;gt;
  NULL
}
SELECT t0.user_language_id AS user_language_id1, t0.user_id AS user_id2, t0.user_id AS user_id3 FROM user_languages t0 WHERE t0.user_id = ?
array(1) {
  [0]=&amp;gt;
  string(1) &lt;span class=&quot;code-quote&quot;&gt;&quot;2&quot;&lt;/span&gt;
}
array(1) {
  [0]=&amp;gt;
  NULL
}
SELECT t0.user_language_id AS user_language_id1, t0.user_id AS user_id2, t0.user_id AS user_id3 FROM user_languages t0 WHERE t0.user_id = ?
array(1) {
  [0]=&amp;gt;
  string(1) &lt;span class=&quot;code-quote&quot;&gt;&quot;3&quot;&lt;/span&gt;
}
array(1) {
  [0]=&amp;gt;
  NULL
}

...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Need result:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT t0.user_id AS user_id1, t0.email AS email2 FROM users t0
SELECT u0_.user_language_id AS user_language_id0, u0_.user_id AS user_id1, u0_.user_id AS user_id2 FROM user_languages u0_ WHERE u0_.user_id IN (1, 2, 3)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="12634">DDC-1149</key>
            <summary>Optimize OneToMany and ManyToMany without join</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://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="morfi">Andrey Kolyshkin</reporter>
                        <labels>
                    </labels>
                <created>Thu, 12 May 2011 09:01:18 +0000</created>
                <updated>Sat, 30 Mar 2013 19:18:40 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>5</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="15827" author="beberlei" created="Thu, 12 May 2011 09:58:46 +0000"  >&lt;p&gt;Sure you are on git master? this should be optimized already with fetch=EAGER&lt;/p&gt;</comment>
                    <comment id="15828" author="morfi" created="Thu, 12 May 2011 11:15:22 +0000"  >&lt;p&gt;Attach test file&lt;/p&gt;

&lt;p&gt;I run&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;git clone git:&lt;span class=&quot;code-comment&quot;&gt;//github.com/doctrine/doctrine2.git
&lt;/span&gt;git clone git:&lt;span class=&quot;code-comment&quot;&gt;//github.com/doctrine/common.git
&lt;/span&gt;git clone git:&lt;span class=&quot;code-comment&quot;&gt;//github.com/doctrine/dbal.git&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and run testDoctrine.php&lt;/p&gt;

&lt;p&gt;Result&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
SELECT t0.user_id AS user_id1 FROM users t0

SELECT t0.post_id AS post_id1, t0.user_id AS user_id2 FROM posts t0 WHERE t0.user_id = ?

array(1) {
  [0]=&amp;gt;
  string(1) &lt;span class=&quot;code-quote&quot;&gt;&quot;1&quot;&lt;/span&gt;
}
array(1) {
  [0]=&amp;gt;
  NULL
}
SELECT t0.post_id AS post_id1, t0.user_id AS user_id2 FROM posts t0 WHERE t0.user_id = ?

array(1) {
  [0]=&amp;gt;
  string(1) &lt;span class=&quot;code-quote&quot;&gt;&quot;2&quot;&lt;/span&gt;
}
array(1) {
  [0]=&amp;gt;
  NULL
}
SELECT t0.post_id AS post_id1, t0.user_id AS user_id2 FROM posts t0 WHERE t0.user_id = ?

array(1) {
  [0]=&amp;gt;
  string(1) &lt;span class=&quot;code-quote&quot;&gt;&quot;3&quot;&lt;/span&gt;
}
array(1) {
  [0]=&amp;gt;
  NULL
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="16571" author="guilhermeblanco" created="Mon, 10 Oct 2011 17:44:07 +0000"  >&lt;p&gt;Please instead of using fetch=&quot;EAGER&quot;, please use fetch=&quot;EXTRA_LAZY&quot;. It would fix your issue.&lt;br/&gt;
I have successfully tested this situation in 2.2-DEV and it works like a charm. =)&lt;/p&gt;</comment>
                    <comment id="19895" author="fludimir" created="Mon, 25 Mar 2013 20:39:03 +0000"  >&lt;p&gt;Doctrine ORM 2.3.3  (Symfony2.2) - using LAZY or EXTRA_LAZY fetch mode there are only one query for:&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;$users = $em-&amp;gt;getRepository(&apos;User&apos;)-&amp;gt;findAll();&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;but additional &lt;b&gt;users_count&lt;/b&gt; queries for&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;foreach($users as $user) $user-&amp;gt;languages-&amp;gt;toArray()&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And if use fetch EAGER - for some reason there are &lt;b&gt;2 x users_count&lt;/b&gt; queries , ie each query&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT t0.post_id AS post_id1, t0.user_id AS user_id2 FROM posts t0 WHERE t0.user_id = ?&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;with unique user_id executed twice&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10991" name="testDoctrine.php" size="1544" author="morfi" created="Thu, 12 May 2011 11:15:22 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2217] Return a lazy collection from PersistentCollection::match($criteria)</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2217</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In 2.3, &lt;tt&gt;PersistentCollection::match()&lt;/tt&gt; has been implemented by doing the query directly. But sometimes, the only meaningful information about the matched collection would be its length. In this case, it would be great to handle it in the same way than extra lazy collections are handled: the matched collection would be initialized lazily, and could do the count in an extra lazy way (if the original collection was extra lazy).&lt;br/&gt;
This would of course not change anything in the case where the original collection was already initialized.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14341">DDC-2217</key>
            <summary>Return a lazy collection from PersistentCollection::match($criteria)</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="stof">Christophe Coevoet</reporter>
                        <labels>
                    </labels>
                <created>Mon, 31 Dec 2012 14:13:33 +0000</created>
                <updated>Thu, 28 Mar 2013 23:59:52 +0000</updated>
                                                                            <due></due>
                    <votes>4</votes>
                        <watches>3</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2210] PHP warning in ProxyFactory when renaming proxy file</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2210</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Getting a PHP Warning: &lt;/p&gt;

&lt;p&gt;&lt;tt&gt;rename(**&lt;b&gt;/models/Proxies&amp;#95;&lt;em&gt;CG&lt;/em&gt;&lt;em&gt;AF_Model_Component_Group.php.50d2dd2c079bb9.35271255,&lt;/b&gt;**/models/Proxies&amp;#95;_CG&lt;/em&gt;_AF_Model_Component_Group.php):&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;in &lt;tt&gt;ProxyFactory&lt;/tt&gt; line 194.&lt;/p&gt;

&lt;p&gt;I haven&apos;t more information in the warning.&lt;/p&gt;

&lt;p&gt;This is the moment when the ProxyFactory writes the proxy to a temporary file and then tries to rename the temp file to the correct file.&lt;/p&gt;

&lt;p&gt;This warning appears randomly, but mostly on pages with lots of concurrent AJAX requests. I guess this happens because several requests try to write the proxy file at the same time. I get this warning but the app works fine.&lt;/p&gt;

&lt;p&gt;This happens in dev environment, on a Windows machine.&lt;/p&gt;


&lt;p&gt;I don&apos;t know why rename generates a warning, it should just return false... The &lt;a href=&quot;http://fr2.php.net/manual/en/function.rename.php&quot; class=&quot;external-link&quot;&gt;doc&lt;/a&gt; doesn&apos;t say anything about warnings (except for long file names, but I checked even with the full path this is around 135 characters, not 255).&lt;/p&gt;</description>
                <environment>Windows</environment>
            <key id="14329">DDC-2210</key>
            <summary>PHP warning in ProxyFactory when renaming proxy file</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="4" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="mnapoli">Matthieu Napoli</reporter>
                        <labels>
                    </labels>
                <created>Thu, 20 Dec 2012 10:02:50 +0000</created>
                <updated>Thu, 28 Mar 2013 15:51:48 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="19171" author="beberlei" created="Sat, 22 Dec 2012 12:04:44 +0000"  >&lt;p&gt;Thats why you shouldn&apos;t generate proxies at runtime. The problem happens on windows, because the atomic rename operation doesn&apos;t work as perfectly there as on linux.&lt;/p&gt;

&lt;p&gt;We cannot fix this in Doctrine.&lt;/p&gt;</comment>
                    <comment id="19180" author="mnapoli" created="Mon, 24 Dec 2012 10:38:46 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=beberlei&quot; class=&quot;user-hover&quot; rel=&quot;beberlei&quot;&gt;Benjamin Eberlei&lt;/a&gt; What do you mean &quot;you shouldn&apos;t generate proxies at runtime&quot;? I&apos;m not in production, this is in dev. And I&apos;m using the default configuration.&lt;/p&gt;

&lt;p&gt;What I don&apos;t understand is why will Doctrine regenerate proxies on every request? The warning is reproductible, and even when no PHP entity has been touched.&lt;/p&gt;</comment>
                    <comment id="19183" author="mnapoli" created="Thu, 27 Dec 2012 13:44:22 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=beberlei&quot; class=&quot;user-hover&quot; rel=&quot;beberlei&quot;&gt;Benjamin Eberlei&lt;/a&gt; To simplify my previous message (I don&apos;t want to bury you under questions) I&apos;ll sum it up like that:&lt;/p&gt;

&lt;p&gt;What can I do?&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;</comment>
                    <comment id="19772" author="mnapoli" created="Thu, 28 Feb 2013 13:03:37 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=beberlei&quot; class=&quot;user-hover&quot; rel=&quot;beberlei&quot;&gt;Benjamin Eberlei&lt;/a&gt; ping: what can be done?&lt;/p&gt;

&lt;p&gt;Can we suppress the error with &lt;tt&gt;@rename($tmpFileName, $fileName);&lt;/tt&gt; ?&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/common/blob/master/lib/Doctrine/Common/Proxy/ProxyGenerator.php#L287&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/blob/master/lib/Doctrine/Common/Proxy/ProxyGenerator.php#L287&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I can make a PR if you think that&apos;s a valid solution.&lt;/p&gt;</comment>
                    <comment id="19773" author="ocramius" created="Thu, 28 Feb 2013 13:06:43 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=matthieu&quot; class=&quot;user-hover&quot; rel=&quot;matthieu&quot;&gt;Matthieu Napoli&lt;/a&gt; no, if you have warnings, please disable them via ini setting. With error suppression there, we may have further problems identifying more serious issues.&lt;/p&gt;

&lt;p&gt;About proxy generation: that happens EVERY time in dev environments. Generate them once and disable it afterwards.&lt;/p&gt;</comment>
                    <comment id="19774" author="mnapoli" created="Thu, 28 Feb 2013 13:30:13 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=ocramius&quot; class=&quot;user-hover&quot; rel=&quot;ocramius&quot;&gt;Marco Pivetta&lt;/a&gt; OK I can disable the auto generation then (I&apos;ll have to remember to regenerate them when I edit the model).&lt;/p&gt;

&lt;p&gt;Thanks for the feedback&lt;/p&gt;

&lt;p&gt;Is that possible to make those proxies generate only if the entity file has been modified since the last generation? (only asking if can and should be done, I can look for implementing it myself if that&apos;s the case)&lt;/p&gt;</comment>
                    <comment id="19775" author="ocramius" created="Thu, 28 Feb 2013 13:33:19 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=mnapoli&quot; class=&quot;user-hover&quot; rel=&quot;mnapoli&quot;&gt;Matthieu Napoli&lt;/a&gt; that would be very obnoxious when changing entities often. I wouldn&apos;t do that (generating only if not already available)&lt;/p&gt;</comment>
                    <comment id="19776" author="mnapoli" created="Thu, 28 Feb 2013 13:57:38 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=ocramius&quot; class=&quot;user-hover&quot; rel=&quot;ocramius&quot;&gt;Marco Pivetta&lt;/a&gt; Yes but for now they are regenerated at every request when in dev mode (at least with the default configuration &lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/configuration.html#obtaining-an-entitymanager&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/configuration.html#obtaining-an-entitymanager&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Which one is worse: generating every proxy class at every request, or generate only those which changed (in dev environment of course, not prod)?&lt;/p&gt;

&lt;p&gt;If neither of these options are good (i.e. auto generation should be disabled), I don&apos;t understand why the docs say to enable auto generation when in dev environment.&lt;/p&gt;</comment>
                    <comment id="19777" author="ocramius" created="Thu, 28 Feb 2013 14:27:35 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=mnapoli&quot; class=&quot;user-hover&quot; rel=&quot;mnapoli&quot;&gt;Matthieu Napoli&lt;/a&gt; that&apos;s because in dev environments you shouldn&apos;t care about that one exception (usually happens when you got concurrent requests). &lt;/p&gt;

&lt;p&gt;It is worse to generate only on changes: that&apos;s a lot of additional checks, variables to keep in memory and additional logic that is not needed.&lt;/p&gt;

&lt;p&gt;Let&apos;s keep it as it is (generating at each request) for dev environments: works fine &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.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;Another (eventual) solution for dev environments would be not to write the proxy file, but to eval it.&lt;/p&gt;</comment>
                    <comment id="19782" author="mnapoli" created="Thu, 28 Feb 2013 15:19:31 +0000"  >&lt;p&gt;eval it would be a good solution IMO, no more &quot;woops the directory is not writable&quot; and it&apos;s more neutral for the user filesystem (but not as easy to debug). But OK, I see what you mean, it works let&apos;s keep it that way.&lt;/p&gt;

&lt;p&gt;Actually the problem on my setup is that PHP errors are turned into exceptions, so on an (poorly designed) AJAX treeview (lots of nodes to load =&amp;gt; lots of requests), I end up with some nodes not loaded because of the exception. And it feels weird to either silently log all PHP warnings or silently ignore the specific warning for the rename.&lt;/p&gt;</comment>
                    <comment id="19783" author="ocramius" created="Thu, 28 Feb 2013 15:26:37 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=mnapoli&quot; class=&quot;user-hover&quot; rel=&quot;mnapoli&quot;&gt;Matthieu Napoli&lt;/a&gt; I&apos;d go with `eval` then. Needs refactoring of the abstract proxy factory and of the proxy generator (proxy generator should no longer write files).&lt;/p&gt;</comment>
                    <comment id="19784" author="ocramius" created="Thu, 28 Feb 2013 15:28:30 +0000"  >&lt;p&gt;Re-opening: the proxy factory could directly `eval()` the produced proxy code. The ProxyGenerator should no longer write the generated files to disk automatically.&lt;/p&gt;</comment>
                    <comment id="19901" author="mnapoli" created="Thu, 28 Mar 2013 15:51:48 +0000"  >&lt;p&gt;I&apos;ve opened a PR: &lt;a href=&quot;https://github.com/doctrine/common/pull/269&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/pull/269&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2372] [GH-632] entity generator - ignore trait properties and methods</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2372</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Padam87:&lt;/p&gt;

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

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

&lt;p&gt;Fixes:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1825&quot; title=&quot;generate entities with traits&quot;&gt;DDC-1825&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-2154&quot; title=&quot;Traits and Code Generation&quot;&gt;DDC-2154&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14728">DDC-2372</key>
            <summary>[GH-632] entity generator - ignore trait properties and methods</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 26 Mar 2013 19:54:23 +0000</created>
                <updated>Tue, 26 Mar 2013 19:54:23 +0000</updated>
                                                                            <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2364] [GH-625] [DDC-2363] Duplicated record with orphanRemoval and proxy</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2364</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of mmenozzi:&lt;/p&gt;

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

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

&lt;p&gt;See &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2363&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2363&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14714">DDC-2364</key>
            <summary>[GH-625] [DDC-2363] Duplicated record with orphanRemoval and proxy</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 22 Mar 2013 17:39:26 +0000</created>
                <updated>Fri, 22 Mar 2013 17:39:26 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2363] Duplicated record with orphanRemoval and proxy</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2363</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;There is a problem that causes duplicate records are created when EntityManager has to remove an entity due to orphanRemoval. The problem occurs only with a double flush and referred object is a proxy.&lt;/p&gt;

&lt;p&gt;I&apos;m trying to submit a pull request for this ticket. Please, stand by.&lt;/p&gt;</description>
                <environment>Tested both Mac OS X and Ubuntu</environment>
            <key id="14713">DDC-2363</key>
            <summary>Duplicated record with orphanRemoval and proxy</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="mmenozzi">Manuele Menozzi</reporter>
                        <labels>
                        <label>orphanRemoval</label>
                        <label>proxy</label>
                    </labels>
                <created>Fri, 22 Mar 2013 15:07:11 +0000</created>
                <updated>Fri, 22 Mar 2013 15:07:11 +0000</updated>
                                    <version>2.3.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1858] LIKE and IS NULL operators not supported in HAVING clause</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1858</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The LIKE and IS NULL operators are not supported in HAVING clause.&lt;/p&gt;

&lt;p&gt;Work:&lt;br/&gt;
SELECT _a.id, count(_photos) as uuuu FROM Acme\CoreBundle\Entity\Member _a LEFT JOIN _a.photos _photos GROUP BY _a HAVING uuuu in (3,6)&lt;br/&gt;
SELECT _a.id, count(_photos) as uuuu FROM Acme\CoreBundle\Entity\Member _a LEFT JOIN _a.photos _photos GROUP BY _a HAVING uuuu = 3&lt;br/&gt;
SELECT _a.id, count(_photos) as uuuu FROM Acme\CoreBundle\Entity\Member _a LEFT JOIN _a.photos _photos GROUP BY _a HAVING uuuu &amp;gt;= 3&lt;br/&gt;
...&lt;/p&gt;

&lt;p&gt;Don&apos;t work:&lt;br/&gt;
SELECT _a.id, count(_photos) as uuuu FROM Acme\CoreBundle\Entity\Member _a LEFT JOIN _a.photos _photos GROUP BY _a HAVING uuuu LIKE 3&lt;br/&gt;
SELECT _a.id, count(_photos) as uuuu FROM Acme\CoreBundle\Entity\Member _a LEFT JOIN _a.photos _photos GROUP BY _a HAVING uuuu IS NULL&lt;br/&gt;
SELECT _a.id, count(_photos) as uuuu FROM Acme\CoreBundle\Entity\Member _a LEFT JOIN _a.photos _photos GROUP BY _a HAVING uuuu IS NOT NULL&lt;/p&gt;</description>
                <environment>Win7, Mysql</environment>
            <key id="13760">DDC-1858</key>
            <summary>LIKE and IS NULL operators not supported in HAVING clause</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/inprogress.png">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="abhoryo">PETIT Yoann</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Jun 2012 20:04:14 +0000</created>
                <updated>Wed, 20 Mar 2013 16:01:11 +0000</updated>
                                    <version>2.2.2</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>3</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="18053" author="ocramius" created="Fri, 8 Jun 2012 07:00:39 +0000"  >&lt;p&gt;I think this has already been fixed in latest master and 2.1.7. Could you just give it a try and eventually confirm?&lt;/p&gt;</comment>
                    <comment id="18058" author="abhoryo" created="Fri, 8 Jun 2012 07:22:34 +0000"  >&lt;p&gt;Already try with 2.17, 2.20 and 2.2.2. This hasn&apos;t been fixed.&lt;/p&gt;</comment>
                    <comment id="18157" author="bdiang" created="Wed, 4 Jul 2012 08:07:03 +0000"  >&lt;p&gt;I&apos;m also having this issue (2.2.2). Is there any workaround for this?&lt;/p&gt;

&lt;p&gt;Column aliases also are not supported in HAVING clause:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$qb-&amp;gt;select(&apos;p&apos;, &apos;COUNT(p.field) as FieldCount&apos;)
            -&amp;gt;from(&apos;Entity&apos;, &apos;p&apos;)
            -&amp;gt;groupBy(&apos;p.id&apos;)
   -&amp;gt;having(&apos;FieldCount IS NULL&apos;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Above code causes error &quot;FieldCount is not pointing to class&quot; and IS NULL causes &quot;Expected =, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, &amp;gt;, &amp;gt;=, !=, got &apos;IS&apos;&quot;&lt;/p&gt;</comment>
                    <comment id="18575" author="beberlei" created="Wed, 29 Aug 2012 12:59:35 +0000"  >&lt;p&gt;Its not a bug as the EBNF says that this is not possible.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=guilhermeblanco&quot; class=&quot;user-hover&quot; rel=&quot;guilhermeblanco&quot;&gt;Guilherme Blanco&lt;/a&gt; Is this something we should support or not?&lt;/p&gt;</comment>
                    <comment id="18576" author="stof" created="Wed, 29 Aug 2012 13:06:17 +0000"  >&lt;p&gt;Another place where it is not supported is in the CASE clause.&lt;/p&gt;

&lt;p&gt;I would vote +1 for supporting it&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2354] [GH-617] Wrong UnitOfWork::computeChangeSet()</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2354</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of fchris82:&lt;/p&gt;

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

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

&lt;p&gt;Sometimes some fields are Proxy when compute &quot;changeSet&quot;. If it is Proxy, some listeners - example Gedmo sortable listener - belive the value has changed and this leads to chaos.&lt;/p&gt;

&lt;p&gt;I check the $actualValue, if it is Proxy, the value didn&apos;t change.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14698">DDC-2354</key>
            <summary>[GH-617] Wrong UnitOfWork::computeChangeSet()</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 16 Mar 2013 16:18:27 +0000</created>
                <updated>Sat, 16 Mar 2013 16:18:27 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2352] [GH-615] Update SqlWalker.php</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2352</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of mikemeier:&lt;/p&gt;

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

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

&lt;p&gt;Always be sure that only a-z characters are used for table alias, otherwise use generic &quot;t&quot; for &quot;table&quot;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14696">DDC-2352</key>
            <summary>[GH-615] Update SqlWalker.php</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 15 Mar 2013 12:53:47 +0000</created>
                <updated>Fri, 15 Mar 2013 12:53:47 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2351] Entity Listener vs. Event Listener</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2351</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Entity Listener and Event Listener don&apos;t get same events. An example is the onFlush event, which Entity Listener doesn&apos;t get. Why are both listeners receiving different events and not same events? &lt;/p&gt;

&lt;p&gt;For consistency I&apos;d like to see that both get same events - if I understand the purpose of Entity Listener correctly: it should be an alternative to Event Listener with same functionality but is bound to an entity. &lt;/p&gt;</description>
                <environment></environment>
            <key id="14695">DDC-2351</key>
            <summary>Entity Listener vs. Event Listener</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="fspillner">Fabian Spillner</reporter>
                        <labels>
                    </labels>
                <created>Fri, 15 Mar 2013 08:30:12 +0000</created>
                <updated>Fri, 15 Mar 2013 08:45:49 +0000</updated>
                                    <version>Git Master</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19865" author="beberlei" created="Fri, 15 Mar 2013 08:45:49 +0000"  >&lt;p&gt;onFlush and postFlush should be propagated to entity listeners as well&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2295] [GH-580] Second cache level POC</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2295</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of FabioBatSilva:&lt;/p&gt;

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

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

&lt;p&gt;Hi guys. &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.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;After a look into some implementations I end up with the following solution for the second level cache..&lt;/p&gt;

&lt;p&gt;There is lot of work todo before merge it, but i&apos;d like to get your thoughts before i go any further on this approach.&lt;br/&gt;
I hope my drafts are good enough to explain the idea :&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;
	&lt;ol&gt;
		&lt;li&gt;
		&lt;ol&gt;
			&lt;li&gt;Cache strategies&lt;/li&gt;
		&lt;/ol&gt;
		&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
&lt;/ol&gt;


&lt;ul&gt;
	&lt;li&gt;READ_ONLY (DEFAULT)   : ReadOnly cache can do reads, inserts and deletes, cannot perform updates or employ any locks.&lt;/li&gt;
	&lt;li&gt;NONSTRICT_READ_WRITE  : Nonstrict Read Write Cache doesn&#8217;t employ any locks but can do reads, inserts , updates and deletes.&lt;/li&gt;
	&lt;li&gt;NONSTRICT_READ_WRITE  : Read Write cache employs locks the entity before update/delete.&lt;/li&gt;
&lt;/ul&gt;



&lt;ol&gt;
	&lt;li&gt;
	&lt;ol&gt;
		&lt;li&gt;
		&lt;ol&gt;
			&lt;li&gt;classes / interfaces&lt;/li&gt;
		&lt;/ol&gt;
		&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
&lt;/ol&gt;


&lt;ul&gt;
	&lt;li&gt;*&lt;b&gt;Region&lt;/b&gt;* :&lt;br/&gt;
    Defines a contract for accessing a entity/collection data cache. (Doesn&#8217;t employ any locks)&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
	&lt;li&gt;*&lt;b&gt;ConcurrentRegion&lt;/b&gt;* :&lt;br/&gt;
    Defines contract for concurrently managed data region. (Locks the data before update/delete.)&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
	&lt;li&gt;*&lt;b&gt;RegionAccess&lt;/b&gt;* :&lt;br/&gt;
    Defines a contract to access a cache region&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
	&lt;li&gt;*&lt;b&gt;ConcurrentRegionAccess&lt;/b&gt;* :&lt;br/&gt;
    Defines contract for regions which hold concurrently managed data.&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
	&lt;li&gt;*&lt;b&gt;CacheKey / EntityCacheKey / CollectionCacheKey/ QueryCacheKey&lt;/b&gt;*:&lt;br/&gt;
    Defines entity / collection key to be stored in the cache region.&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
	&lt;li&gt;*&lt;b&gt;EntityEntryStructure / CollectionEntryStructure&lt;/b&gt;*&lt;br/&gt;
    Build cache entries and rebuild entities/colection from cache&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
	&lt;li&gt;*&lt;b&gt;AccessProvider&lt;/b&gt;*&lt;br/&gt;
    Build RegionAccess based on entity / collection cache configuration&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Collection Caching&lt;/p&gt;




&lt;p&gt;The most common use case is to cache entities. But we can also cache relationships.&#160;&lt;br/&gt;
A &#8220;collection cache&#8221; caches the primary keys of entities that are members of a collection (OneToMany/ManyToMany).&#160;&lt;br/&gt;
and each element will be cached into its region.&lt;/p&gt;




&lt;p&gt;Only identifiers will be cached for collection. When a collection is read from the second level cache it will create proxies based on the cached identifiers, if the application needs to access an element, Doctrine will go to the cache to load the element data.&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;
	&lt;ol&gt;
		&lt;li&gt;
		&lt;ol&gt;
			&lt;li&gt;OPERATIONS&lt;/li&gt;
		&lt;/ol&gt;
		&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
&lt;/ol&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;INSERT :&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;p&gt;    *********************************************************************************************&lt;br/&gt;
    UnitOfWork#commit&lt;br/&gt;
        Connection#beginTransaction&lt;br/&gt;
        Persister#executeInserts&lt;br/&gt;
        Connection#commit&lt;br/&gt;
        Persister#afterTransactionComplete&lt;br/&gt;
            -&amp;gt; EntityRegionAccessStrategy#afterInsert&lt;br/&gt;
    *********************************************************************************************&lt;br/&gt;
    METHOD      | READ-ONLY             | NONSTRICT-READ-WRITE      | READ-WRITE                |&lt;br/&gt;
    ---------------------------------------------------------------------------------------------&lt;br/&gt;
    afterInsert | add item to the cache | add item to the cache     | add item to the cache     |&lt;br/&gt;
    ---------------------------------------------------------------------------------------------&lt;/p&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;UPDATE :&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;p&gt;    *********************************************************************************************&lt;br/&gt;
    UnitOfWork#commit&lt;br/&gt;
        Connection#beginTransaction&lt;br/&gt;
        Persister#update&lt;br/&gt;
            -&amp;gt; TransactionalRegionAccess#lockItem&lt;br/&gt;
            -&amp;gt; execute&lt;br/&gt;
        Connection#commit&lt;br/&gt;
        Persister#afterTransactionComplete&lt;br/&gt;
            -&amp;gt; RegionAccess#afterUpdate&lt;br/&gt;
            -&amp;gt; TransactionalRegionAccess#unlockItem&lt;br/&gt;
    *********************************************************************************************&lt;br/&gt;
    METHOD      | READ-ONLY             | NONSTRICT-READ-WRITE      | READ-WRITE                |&lt;br/&gt;
    ---------------------------------------------------------------------------------------------&lt;br/&gt;
    lockItem    |                       |                           | lock item                 |&lt;br/&gt;
    ---------------------------------------------------------------------------------------------&lt;br/&gt;
    afterUpdate | throws exception      | update item cache         | update item cache         |&lt;br/&gt;
    ---------------------------------------------------------------------------------------------&lt;br/&gt;
    unlockItem  |                       |                           | unlock item               |&lt;br/&gt;
    ---------------------------------------------------------------------------------------------&lt;/p&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;DELETE :&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;p&gt;    *********************************************************************************************&lt;br/&gt;
    UnitOfWork#commit&lt;br/&gt;
        Connection#beginTransaction&lt;br/&gt;
        Persister#delete&lt;br/&gt;
            -&amp;gt; TransactionalRegionAccess#lockItem&lt;br/&gt;
            -&amp;gt; execute&lt;br/&gt;
        Connection#commit&lt;br/&gt;
        Persister#afterTransactionComplete&lt;br/&gt;
            -&amp;gt; RegionAccess#evict&lt;br/&gt;
    *********************************************************************************************&lt;br/&gt;
    METHOD      | READ-ONLY             | NONSTRICT-READ-WRITE      | READ-WRITE                |&lt;br/&gt;
    ---------------------------------------------------------------------------------------------&lt;br/&gt;
    lockItem    |                       |                           | lock item                 |&lt;br/&gt;
    ---------------------------------------------------------------------------------------------&lt;br/&gt;
    evict       | remove item cache     | remove item cache         | remove item cache         |&lt;br/&gt;
    ---------------------------------------------------------------------------------------------&lt;/p&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;USAGE :&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;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;
```php
&amp;lt;?php

/**
 * @Entity
 * @Cache(&lt;span class=&quot;code-quote&quot;&gt;&quot;NONSTRICT_READ_WRITE&quot;&lt;/span&gt;)
 */
class State
{
    /**
     * @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;protected&lt;/span&gt; $id;
    /**
     * @Column
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name;
    /**
     * @Cache()
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Country&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;country_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $country;
    /**
     * @Cache()
     * @OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;City&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;state&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $cities;
}
```

```php
&amp;lt;?php

$em-&amp;gt;persist(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; State($name, $country));
$em-&amp;gt;flush();                                &lt;span class=&quot;code-comment&quot;&gt;// Put into cache
&lt;/span&gt;
$em-&amp;gt;clear();                                &lt;span class=&quot;code-comment&quot;&gt;// Clear entity manager
&lt;/span&gt;
$state   = $em-&amp;gt;find(&apos;Entity\State&apos;, 1);     &lt;span class=&quot;code-comment&quot;&gt;// Retreive item from cache
&lt;/span&gt;$country = $state-&amp;gt;getCountry();             &lt;span class=&quot;code-comment&quot;&gt;// Retreive item from cache
&lt;/span&gt;$cities  = $state-&amp;gt;getCities();              &lt;span class=&quot;code-comment&quot;&gt;// Load from database and put into cache
&lt;/span&gt;
$state-&amp;gt;setName(&lt;span class=&quot;code-quote&quot;&gt;&quot;New Name&quot;&lt;/span&gt;);
$em-&amp;gt;persist($state);
$em-&amp;gt;flush();                                &lt;span class=&quot;code-comment&quot;&gt;// Update item cache
&lt;/span&gt;
$em-&amp;gt;clear();                                &lt;span class=&quot;code-comment&quot;&gt;// Clear entity manager
&lt;/span&gt;
$em-&amp;gt;find(&apos;Entity\State&apos;, 1)-&amp;gt;getCities();   &lt;span class=&quot;code-comment&quot;&gt;// Retreive from cache
&lt;/span&gt;

$em-&amp;gt;getCache()-&amp;gt;containsEntity(&apos;Entity\State&apos;, $state-&amp;gt;getId())  &lt;span class=&quot;code-comment&quot;&gt;// Check &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; the cache exists
&lt;/span&gt;$em-&amp;gt;getCache()-&amp;gt;evictEntity(&apos;Entity\State&apos;, $state-&amp;gt;getId());    &lt;span class=&quot;code-comment&quot;&gt;// Remove an entity from cache
&lt;/span&gt;$em-&amp;gt;getCache()-&amp;gt;evictEntityRegion(&apos;Entity\State&apos;);               &lt;span class=&quot;code-comment&quot;&gt;// Remove all entities from cache
&lt;/span&gt;
$em-&amp;gt;getCache()-&amp;gt;containsCollection(&apos;Entity\State&apos;, &apos;cities&apos;, $state-&amp;gt;getId());   &lt;span class=&quot;code-comment&quot;&gt;// Check &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; the cache exists        
&lt;/span&gt;$em-&amp;gt;getCache()-&amp;gt;evictCollection(&apos;Entity\State&apos;, &apos;cities&apos;, $state-&amp;gt;getId());      &lt;span class=&quot;code-comment&quot;&gt;// Remove an entity collection from cache
&lt;/span&gt;$em-&amp;gt;getCache()-&amp;gt;evictCollectionRegion(&apos;Entity\State&apos;, &apos;cities&apos;);                 &lt;span class=&quot;code-comment&quot;&gt;// Remove all collections from cache
&lt;/span&gt;
```
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;TODO :&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;ul&gt;
	&lt;li&gt;handle many to many collection&lt;/li&gt;
	&lt;li&gt;handle inheritance&lt;/li&gt;
	&lt;li&gt;remove/add colection items on update&lt;/li&gt;
	&lt;li&gt;improve region tests&lt;/li&gt;
	&lt;li&gt;improve access strategy tests&lt;/li&gt;
	&lt;li&gt;implement xml / yml / php drivers&lt;/li&gt;
	&lt;li&gt;implement transaction region&lt;/li&gt;
	&lt;li&gt;implement transaction  access strategy&lt;/li&gt;
	&lt;li&gt;.... ????&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
            <key id="14481">DDC-2295</key>
            <summary>[GH-580] Second cache level POC</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 14 Feb 2013 01:01:12 +0000</created>
                <updated>Thu, 14 Mar 2013 21:36:42 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2347] Refresh Uniqueidentifier ID from mssql of inserted Entity in doctrine2.3</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2347</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I don&apos;t want you to report something that isn&apos;t a bug.&lt;br/&gt;
But I read about problems with doctrine2 and mssql uniqueid&apos;s.&lt;br/&gt;
So First I asked a question at stackoverflow. No one could help me, and the only one who gave me a comment thought the same then me, that it looks like a bug.&lt;/p&gt;

&lt;p&gt;If it isn&apos;t a bug I&apos;m very sorry for this issue report.&lt;/p&gt;

&lt;p&gt;Issue as reported in &lt;br/&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/15368082/refresh-uniqueidentifier-id-from-mssql-of-inserted-entity-in-doctrine2&quot; class=&quot;external-link&quot;&gt;http://stackoverflow.com/questions/15368082/refresh-uniqueidentifier-id-from-mssql-of-inserted-entity-in-doctrine2&lt;/a&gt;&lt;/p&gt;</description>
                <environment>Windows Server 2008 R2, Apache 2.2, Doctrine 2.3, PHP 5.4</environment>
            <key id="14689">DDC-2347</key>
            <summary>Refresh Uniqueidentifier ID from mssql of inserted Entity in doctrine2.3</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ok3n0b1">Lucas Senn</reporter>
                        <labels>
                        <label>dql</label>
                    </labels>
                <created>Wed, 13 Mar 2013 07:58:36 +0000</created>
                <updated>Wed, 13 Mar 2013 08:11:55 +0000</updated>
                                    <version>2.3.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2338] Entity with composite foreign keys identifiers should be persisted after related entities without exception</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2338</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;ve seen that when you create an entity with a composite foreign key as identifier it cannot be flushed until the related entities are already flushed to the database and not just persisted.&lt;/p&gt;

&lt;p&gt;It would be nice to let the user flush all the entities together and just INSERT first the related entities to get the ID and then use that to INSERT the entity with composite foreign keys.&lt;/p&gt;

&lt;p&gt;I&apos;m going to create a pull request with the failing test.&lt;/p&gt;</description>
                <environment>Mac OSX 10.8, php 5.4.11, doctrine git master version</environment>
            <key id="14674">DDC-2338</key>
            <summary>Entity with composite foreign keys identifiers should be persisted after related entities without exception</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="alex88">Alessandro Tagliapietra</reporter>
                        <labels>
                        <label>orm</label>
                        <label>unitofwork</label>
                    </labels>
                <created>Thu, 7 Mar 2013 09:30:41 +0000</created>
                <updated>Thu, 7 Mar 2013 09:40:20 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19817" author="alex88" created="Thu, 7 Mar 2013 09:40:20 +0000"  >&lt;p&gt;Created pull request &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/605&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/605&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2337] Allow an entity to use its own persister to take advantage of DB level features if necessary</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2337</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have a situation where I wanted a single table to use INSERT DELAYED. Its an audit log table where I expect each http request to generate many inserts for. In an effort to not over tax the system I implemented a custom Entity Persister so that it would work. This obviously doesn&apos;t work with all mapping drivers. However if this is a feature that you think is worth integrating I will fork it on github and complete the implementation alongside any changes/improvements requested...&lt;/p&gt;</description>
                <environment></environment>
            <key id="14672">DDC-2337</key>
            <summary>Allow an entity to use its own persister to take advantage of DB level features if necessary</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="gnat">Nathanael Noblet</reporter>
                        <labels>
                    </labels>
                <created>Wed, 6 Mar 2013 20:17:54 +0000</created>
                <updated>Wed, 6 Mar 2013 20:17:54 +0000</updated>
                                                                    <component>Mapping Drivers</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                    <attachment id="11511" name="persister.patch" size="4366" author="gnat" created="Wed, 6 Mar 2013 20:17:54 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1180] Indexed Associations: foreign key (association) cannot be used as indexBy field</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1180</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am trying to index a collection by its entity&apos;s column which is also a foreign key (association). It seems to me that it is not possible at the moment.&lt;/p&gt;

&lt;p&gt;For 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-java&quot;&gt;/**
 * @Entity
 */
class Hotel
{

    &lt;span class=&quot;code-comment&quot;&gt;// $id column and other stuff
&lt;/span&gt;
    /**
     * @oneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Booking&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;hotel&quot;&lt;/span&gt;, indexBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;room&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Booking[]
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $bookings;
}

/**
 * @Entity
 */
class Booking
{
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Hotel
     *
     * @Id 
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Hotel&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;bookings&quot;&lt;/span&gt;)
     * @JoinColumns({
     *   @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;hotel_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)
     * })
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $hotel;

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Room
     *
     * @Id
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Room&quot;&lt;/span&gt;)
     * @JoinColumns({
     *   @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;room_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)
     * })
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $room;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Only possible workaround I found is to define another (plain) entity&apos;s property mapped to the same table column and index by it:&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;/**
 * @Entity
 */
class Hotel
{

    &lt;span class=&quot;code-comment&quot;&gt;// $id column and other stuff
&lt;/span&gt;
    /**
     * @oneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Booking&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;hotel&quot;&lt;/span&gt;, indexBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;roomId&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Booking[]
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $bookings;
}

/**
 * @Entity
 */
class Booking
{
    &lt;span class=&quot;code-comment&quot;&gt;// ...
&lt;/span&gt;
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Room
     *
     * @Id
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Room&quot;&lt;/span&gt;)
     * @JoinColumns({
     *   @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;room_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)
     * })
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $room;
    
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; integer $roomId
     *
     * @Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;room_id&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $roomId;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Wouldn&apos;t it be easy to support it?&lt;/p&gt;</description>
                <environment>Using Doctrine ORM 2.1.0BETA1</environment>
            <key id="12679">DDC-1180</key>
            <summary>Indexed Associations: foreign key (association) cannot be used as indexBy field</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="sobotka">Petr Sobotka</reporter>
                        <labels>
                    </labels>
                <created>Sun, 29 May 2011 21:44:28 +0000</created>
                <updated>Sat, 2 Mar 2013 12:24:58 +0000</updated>
                                    <version>2.1</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>3</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="15921" author="beberlei" created="Sun, 5 Jun 2011 12:36:53 +0000"  >&lt;p&gt;It is not so easy to implement from the first gimplse and it is not a bug but an improvement/feature request.&lt;/p&gt;</comment>
                    <comment id="19792" author="benjamin" created="Sat, 2 Mar 2013 12:24:58 +0000"  >&lt;p&gt;Related PR: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/204&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/204&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2321] DbDeploy Support</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2321</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;ul&gt;
	&lt;li&gt;DbDeploy Diff Generation&lt;/li&gt;
	&lt;li&gt;Schema Serialization&lt;/li&gt;
	&lt;li&gt;SchemaTool gets new event when diff is applied, then you can update a &quot;stable&quot; schema xml. On Generation new db deploy script, use current schema vs stable schema vom disc.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
            <key id="14640">DDC-2321</key>
            <summary>DbDeploy Support</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 27 Feb 2013 17:50:49 +0000</created>
                <updated>Wed, 27 Feb 2013 17:50:49 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2283] Paginator with orderBy in joined data retrieve bad result</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2283</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;entity A have many entity B&lt;/p&gt;

&lt;p&gt;If DQL is something like &quot;select A, B from A join B order by A.field1, B.field2&quot;&lt;br/&gt;
Then Paginator retrieve different Id by a query like : &lt;br/&gt;
&quot;select distinct a.id, a.field1, b.field2 from ( ....) order by a.field1 ASC , b.field2 ASC limit 15 offset 0&quot;&lt;/p&gt;


&lt;p&gt;so, if a entity A have 20 entity B (and these sub-entity have all a different b.field2) then there&apos;s only 1 A retrieved &lt;/p&gt;</description>
                <environment></environment>
            <key id="14463">DDC-2283</key>
            <summary>Paginator with orderBy in joined data retrieve bad result</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="sylfel">Jean-Philippe THEVENOUX</reporter>
                        <labels>
                        <label>paginator</label>
                    </labels>
                <created>Thu, 7 Feb 2013 15:33:45 +0000</created>
                <updated>Tue, 26 Feb 2013 08:52:40 +0000</updated>
                                    <version>2.3.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2287] Getter/Setter: generate &quot;isEnabled()&quot; instead of &quot;getEnabled()&quot; for boolean field in entity classes</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2287</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It would be better if doctrine generated &quot;isEnabled()&quot; instead of &quot;getEnabled()&quot; for boolean field in entity classes. Because, it is more meaningful.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14467">DDC-2287</key>
            <summary>Getter/Setter: generate &quot;isEnabled()&quot; instead of &quot;getEnabled()&quot; for boolean field in entity classes</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="sukhrob">Sukhrob Khakimov</reporter>
                        <labels>
                    </labels>
                <created>Fri, 8 Feb 2013 09:36:14 +0000</created>
                <updated>Tue, 26 Feb 2013 08:50:40 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19486" author="ocramius" created="Fri, 8 Feb 2013 09:40:45 +0000"  >&lt;p&gt;Not sure this kind of check should be handled. Starting to add all this kind of rules makes me think that it is becoming a big ball of mud&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2314] getResults with numeric indexes for fields</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2314</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When executing a simple query with field names in SELECT clause, it is not possible to map field to numeric indexes.&lt;/p&gt;

&lt;p&gt;This is an example that i would imagine to be useful:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;SELECT c.id AS 0, c.name AS 1, l.text AS 2 FROM Category c LEFT JOIN c.label l&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Thus, the resulting results could be numeric indexed array. It is useful for many situations: when working with an API which expects such arrays, or when using &lt;tt&gt;list&lt;/tt&gt; to assign result fields to variables directly.&lt;/p&gt;

&lt;p&gt;Query::HYDRATE_SCALAR does not achieve this, as one could think at first glance.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14543">DDC-2314</key>
            <summary>getResults with numeric indexes for fields</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ninjds">Ninj</reporter>
                        <labels>
                    </labels>
                <created>Fri, 22 Feb 2013 13:27:27 +0000</created>
                <updated>Tue, 26 Feb 2013 08:36:04 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2313] Deep clone for DBAL QueryBuilder</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2313</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This is basically a duplicate of another issue I stumbled across lately but cannot find here again. It added a __clone() function to the ORM QueryBuilder to allow this use case:&lt;br/&gt;
Create a base query and derive two different queries from it.&lt;/p&gt;

&lt;p&gt;I adopted the code for the DBAL QueryBuilder which is suffering the same issue (e.g. expressions were not cloned but shared between instances). The code is tested at least for my limited use case.&lt;/p&gt;


&lt;p&gt;    /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Deep clone of all expression objects in the SQL parts.&lt;br/&gt;
     *&lt;/li&gt;
	&lt;li&gt;@return void&lt;br/&gt;
     */&lt;br/&gt;
    public function __clone()&lt;br/&gt;
    {&lt;br/&gt;
        foreach ($this-&amp;gt;sqlParts as $part =&amp;gt; $elements) {&lt;br/&gt;
            if (is_array($this-&amp;gt;sqlParts&lt;span class=&quot;error&quot;&gt;&amp;#91;$part&amp;#93;&lt;/span&gt;)) {&lt;br/&gt;
                foreach ($this-&amp;gt;sqlParts&lt;span class=&quot;error&quot;&gt;&amp;#91;$part&amp;#93;&lt;/span&gt; as $idx =&amp;gt; $element) 
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: {                    if (is_object($element)) {
                        $this-&amp;gt;sqlParts[$part][$idx] = clone $element;
                    }                }&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;            } else if (is_object($elements)) &lt;/p&gt;
{
                $this-&amp;gt;sqlParts[$part] = clone $elements;
            }
&lt;p&gt;        }&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;        $params = array();&lt;/p&gt;

&lt;p&gt;        foreach ($this-&amp;gt;params as $param) &lt;/p&gt;
{
            $params[] = clone $param;
        }

&lt;p&gt;        $this-&amp;gt;params = $params;&lt;br/&gt;
    }&lt;/p&gt;</description>
                <environment></environment>
            <key id="14541">DDC-2313</key>
            <summary>Deep clone for DBAL QueryBuilder</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="tcm">Tim Mundt</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Feb 2013 22:33:34 +0000</created>
                <updated>Thu, 21 Feb 2013 22:33:34 +0000</updated>
                                    <version>2.2</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2308] Naming Strategy for Reverse Engeneering</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2308</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Unfortunately DatabaseDriver::getClassNameForTable() is declared as private method, which makes it quite difficult to change the naming strategy for reverse engeneering.&lt;/p&gt;

&lt;p&gt;IMO this sould be declared protected. An even better way would be to extend the interface of the Naming Strategy objects to support the reverse direction:&lt;/p&gt;

&lt;p&gt;classToTableName -&amp;gt; tableToClassName&lt;br/&gt;
propertyToColumnName -&amp;gt; columnToPropertyName.&lt;/p&gt;

&lt;p&gt;This way we would have a consistent name-mapping&lt;/p&gt;
</description>
                <environment></environment>
            <key id="14511">DDC-2308</key>
            <summary>Naming Strategy for Reverse Engeneering</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="ancpru">Andreas Prucha</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Feb 2013 14:49:27 +0000</created>
                <updated>Thu, 21 Feb 2013 14:49:27 +0000</updated>
                                                                    <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2305] [GH-584] QueryBuilder::addCriteria improvements</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2305</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of chEbba:&lt;/p&gt;

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

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

&lt;p&gt;1. Fix problem with different comparisons on the same field in QueryExpressonVisitor (now index value is added).&lt;br/&gt;
2. Add criteria field aliasing. Usually oject criteria has &quot;filed = value&quot; notation while DQL has &quot;alias.field = value&quot;.&lt;br/&gt;
First level fields are added with alias, second+ level fields (object.field, parent.object.field) are truncated to the second level (object.field) without alias. Alias map can be implemented in future.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14499">DDC-2305</key>
            <summary>[GH-584] QueryBuilder::addCriteria improvements</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 19 Feb 2013 17:59:48 +0000</created>
                <updated>Tue, 19 Feb 2013 18:00:03 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19569" author="beberlei" created="Tue, 19 Feb 2013 18:00:03 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-584&amp;#93;&lt;/span&gt; was opened&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/584&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/584&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2301] Support inheritance in ResultSetMappingBuilder</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2301</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;ResultSetMappingBuilder does not support inherited fields. For example, calling &lt;tt&gt;ResultSetMappingBuilder::addRootEntityFromClassMetadata($class, $alias)&lt;/tt&gt; throws an exception to say this.&lt;/p&gt;

&lt;p&gt;I was wondering if there were any reasons as to why this would be difficult to implement? I haven&apos;t had an extensive look at Doctrine&apos;s source but it feels like this has been not implemented on purpose.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</description>
                <environment></environment>
            <key id="14488">DDC-2301</key>
            <summary>Support inheritance in ResultSetMappingBuilder</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="rmasters">Ross Masters</reporter>
                        <labels>
                        <label>nativesql</label>
                        <label>resultsetmapping</label>
                    </labels>
                <created>Sat, 16 Feb 2013 22:34:48 +0000</created>
                <updated>Sat, 16 Feb 2013 22:34:48 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-585] Create a coding standards document</title>
                <link>http://doctrine-project.org/jira/browse/DDC-585</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;We need a new coding standards document for Doctrine 2.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11353">DDC-585</key>
            <summary>Create a coding standards document</summary>
                <type id="3" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/task.png">Task</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="romanb">Roman S. Borschel</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 May 2010 06:42:33 +0000</created>
                <updated>Mon, 11 Feb 2013 17:04:20 +0000</updated>
                                                    <fixVersion>2.0</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19435" author="benjamin" created="Tue, 29 Jan 2013 13:12:04 +0000"  >&lt;p&gt;Has there been any work on a coding standards document yet?&lt;br/&gt;
I&apos;m currently working on fixing documentation on this project, and it might be a good time to define a standard.&lt;br/&gt;
I&apos;ve started compiling a few recommendations based on various feedbacks I&apos;ve got in my pull requests, and I can post them here.&lt;br/&gt;
Please let me know if there have been previous attempts so far!&lt;/p&gt;</comment>
                    <comment id="19436" author="ocramius" created="Tue, 29 Jan 2013 13:20:58 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=benjamin&quot; class=&quot;user-hover&quot; rel=&quot;benjamin&quot;&gt;Benjamin Morel&lt;/a&gt; &lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=guiblanco&quot; class=&quot;user-hover&quot; rel=&quot;guiblanco&quot;&gt;Guilherme Blanco&lt;/a&gt; may have a CS ruleset, but it&apos;s not ready yet. Perfect timing btw, we really need to automate this to avoid having all these useless CS fix comments in pull requests&lt;/p&gt;</comment>
                    <comment id="19437" author="benjamin" created="Tue, 29 Jan 2013 14:00:43 +0000"  >&lt;p&gt;Ok, I&apos;ll post my document here once ready, and &lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=guiblanco&quot; class=&quot;user-hover&quot; rel=&quot;guiblanco&quot;&gt;Guilherme Blanco&lt;/a&gt; will be able to compare it with his ruleset!&lt;/p&gt;</comment>
                    <comment id="19443" author="benjamin" created="Wed, 30 Jan 2013 20:35:35 +0000"  >&lt;p&gt;Here is a first draft: &lt;a href=&quot;https://gist.github.com/4676670&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/4676670&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please comment!&lt;/p&gt;</comment>
                    <comment id="19531" author="benjamin" created="Mon, 11 Feb 2013 17:03:41 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=guiblanco&quot; class=&quot;user-hover&quot; rel=&quot;guiblanco&quot;&gt;Guilherme Blanco&lt;/a&gt;, if you don&apos;t have time to compare your ruleset with my draft, maybe you could publish your current ruleset so that others can have a look?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2236] SUM(..) with Pagination gives incorrect result</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2236</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;a href=&quot;https://github.com/whiteoctober/Pagerfanta/issues/69&quot; class=&quot;external-link&quot;&gt;https://github.com/whiteoctober/Pagerfanta/issues/69&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;?php&lt;br/&gt;
$query = $em-&amp;gt;getRepository(&apos;M\E\Q&apos;)&lt;br/&gt;
       -&amp;gt;createQueryBuilder(&apos;q&apos;)&lt;br/&gt;
       -&amp;gt;select(&apos;q&apos;, &apos;SUM(q.price) AS amount&apos;)&lt;br/&gt;
       -&amp;gt;where(&apos;q.id IN(19, 20, 22)&apos;)&lt;br/&gt;
      -&amp;gt;groupBy(&apos;q.customer&apos;)&lt;br/&gt;
;&lt;/p&gt;

&lt;p&gt;$pager = new Pagerfanta(new DoctrineORMAdapter($query));&lt;br/&gt;
$pager-&amp;gt;setMaxPerPage(30);&lt;br/&gt;
$pager-&amp;gt;setCurrentPage($request-&amp;gt;query-&amp;gt;get(&apos;page&apos;, 1));&lt;/p&gt;

&lt;p&gt;$result = $pager-&amp;gt;getCurrentPageResults();&lt;br/&gt;
print_r($result&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;amount&amp;#39;&amp;#93;&lt;/span&gt;); // 156.71 - Incorrect&lt;/p&gt;

&lt;p&gt;$result = $query-&amp;gt;getQuery()-&amp;gt;getResult();&lt;br/&gt;
print_r($result&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;amount&amp;#39;&amp;#93;&lt;/span&gt;); // 553.47&lt;br/&gt;
?&amp;gt;&lt;/p&gt;

&lt;p&gt;Sql for the above:&lt;/p&gt;

&lt;p&gt;SELECT DISTINCT id0 FROM (SELECT q0_.id AS id0, SUM(q0_.price) AS sclr36 FROM Q q0_ WHERE q0_.id IN (19, 20, 22) GROUP BY q0_.customer_id) dctrn_result LIMIT 30 OFFSET 0&lt;br/&gt;
SELECT q0_.id AS id0, SUM(q0_.price) AS sclr36 FROM Q q0_ WHERE q0_.id IN (19, 20, 22) AND q0_.id IN (&apos;19&apos;) GROUP BY q0_.customer_id&lt;br/&gt;
SELECT q0_.id AS id21, SUM(q0_.price) AS sclr36 FROM Q q0_ WHERE q0_.id IN (19, 20, 22) GROUP BY q0_.customer_id&lt;/p&gt;


&lt;p&gt;Sql with fetchJoin = false (new DoctrineORMAdapter($query, false))&lt;/p&gt;

&lt;p&gt;SELECT q0_.id AS id0, SUM(q0_.price) AS sclr36 FROM Quote q0_ WHERE q0_.id IN (19, 20, 22) GROUP BY q0_.customer_id LIMIT 30 OFFSET 0&lt;br/&gt;
SELECT q0_.id AS id0, SUM(q0_.price) AS sclr36 FROM Quote q0_ WHERE q0_.id IN (19, 20, 22) GROUP BY q0_.customer_id&lt;/p&gt;</description>
                <environment>Linux</environment>
            <key id="14375">DDC-2236</key>
            <summary>SUM(..) with Pagination gives incorrect result</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="3" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/inprogress.png">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="olegk">Oleg</reporter>
                        <labels>
                        <label>paginator</label>
                    </labels>
                <created>Fri, 11 Jan 2013 16:24:56 +0000</created>
                <updated>Sun, 10 Feb 2013 18:21:58 +0000</updated>
                                    <version>2.2.3</version>
                                                <component>Tools</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="19511" author="asm89" created="Sat, 9 Feb 2013 23:48:30 +0000"  >&lt;p&gt;Can you also test this with doctrine &amp;gt;= 2.3? The pagination code changed quite a lot.&lt;/p&gt;</comment>
                    <comment id="19517" author="olegk" created="Sun, 10 Feb 2013 11:30:24 +0000"  >&lt;p&gt;Looks like no change&lt;/p&gt;

&lt;p&gt;composer.json:&lt;br/&gt;
&quot;doctrine/orm&quot;: &quot;2.3.*&quot;,&lt;br/&gt;
&amp;#8211;&lt;br/&gt;
php composer.phar update&lt;br/&gt;
Loading composer repositories with package information&lt;br/&gt;
Updating dependencies&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Installing doctrine/common (2.3.0)&lt;br/&gt;
    Loading from cache&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Installing doctrine/dbal (2.3.2)&lt;br/&gt;
    Loading from cache&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;then cleared cache but result is same&lt;br/&gt;
Here&apos;s the code&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; 
$query = $this-&amp;gt;getDoctrine()-&amp;gt;getEntityManager()-&amp;gt;getRepository(&apos;MyBundle:Invoice&apos;)
  -&amp;gt;createQueryBuilder(&apos;q&apos;)
  -&amp;gt;select(&apos;q&apos;, &apos;SUM(q.amount) AS amount&apos;)
  -&amp;gt;groupBy(&apos;q.customer&apos;)
;
&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;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-sql&quot;&gt; 
95 Connect	root@localhost on **
95 Query	&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; DISTINCT id0 &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; (&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; i0_.id AS id0, i0_.invoice_num AS invoice_num1, i0_.date AS date2, i0_.amount AS amount3, i0_.vat_amount AS vat_amount4, i0_.amount_paid AS amount_paid5, i0_.md5 AS md56, i0_.is_exported AS is_exported7, i0_.created AS created8, SUM(i0_.amount) AS sclr9 &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; Invoice i0_ &lt;span class=&quot;code-keyword&quot;&gt;GROUP&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;BY&lt;/span&gt; i0_.customer_id) dctrn_result LIMIT 30 OFFSET 0
95 Query	&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; i0_.id AS id0, i0_.invoice_num AS invoice_num1, i0_.date AS date2, i0_.amount AS amount3, i0_.vat_amount AS vat_amount4, i0_.amount_paid AS amount_paid5, i0_.md5 AS md56, i0_.is_exported AS is_exported7, i0_.created AS created8, SUM(i0_.amount) AS sclr9, i0_.customer_id AS customer_id10 &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; Invoice i0_ &lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; i0_.id IN (&apos;2&apos;) &lt;span class=&quot;code-keyword&quot;&gt;GROUP&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;BY&lt;/span&gt; i0_.customer_id
95 Query	&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; i0_.id AS id0, i0_.invoice_num AS invoice_num1, i0_.date AS date2, i0_.amount AS amount3, i0_.vat_amount AS vat_amount4, i0_.amount_paid AS amount_paid5, i0_.md5 AS md56, i0_.is_exported AS is_exported7, i0_.created AS created8, SUM(i0_.amount) AS sclr9, i0_.customer_id AS customer_id10 &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; Invoice i0_ &lt;span class=&quot;code-keyword&quot;&gt;GROUP&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;BY&lt;/span&gt; i0_.customer_id
130210 16:08:25	   95 Quit	
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 


&lt;p&gt;But I understand why that happens, it&apos;s due to group by and pagination nature. &lt;br/&gt;
The first query returns only one row with id &quot;2&quot;, second query should be actually &quot;..WHERE i0_.id IN (&apos;2&apos;, &apos;3&apos;, &apos;4&apos;)&quot;&lt;/p&gt;

&lt;p&gt;If I do&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;
$pager = new Pagerfanta(new DoctrineORMAdapter($query, false));
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I get this sql&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-sql&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; i0_.id AS id0, i0_.invoice_num AS invoice_num1, i0_.date AS date2, i0_.amount AS amount3, i0_.vat_amount AS vat_amount4, i0_.amount_paid AS amount_paid5, i0_.md5 AS md56, i0_.is_exported AS is_exported7, i0_.created AS created8, SUM(i0_.amount) AS sclr9, i0_.customer_id AS customer_id10 &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; Invoice i0_ LIMIT 30 OFFSET 0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;I think it should be noted somewhere that if you do groupBy you should set fetchJoin to false? &lt;/p&gt;</comment>
                    <comment id="19525" author="ocramius" created="Sun, 10 Feb 2013 18:21:58 +0000"  >&lt;p&gt;Updating to Documentation issue.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1825] generate entities with traits</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1825</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When a trait with included setters and getters is used and generate entities is called, doctrine add another set of getters and setters to the &quot;main&quot; entity where the trait is used.&lt;/p&gt;</description>
                <environment>php 5.4.3, symfony2.1-dev</environment>
            <key id="13708">DDC-1825</key>
            <summary>generate entities with traits</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="lunetics">Matthias Breddin</reporter>
                        <labels>
                    </labels>
                <created>Fri, 18 May 2012 11:31:24 +0000</created>
                <updated>Sat, 9 Feb 2013 23:06:18 +0000</updated>
                                    <version>2.2.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1630] Get PersistentCollection::getDeleteDiff is empty when collection changes from 1 item to zero items</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1630</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment>Symfony2</environment>
            <key id="13405">DDC-1630</key>
            <summary>Get PersistentCollection::getDeleteDiff is empty when collection changes from 1 item to zero items</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="10000" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="lmcd">Lee</reporter>
                        <labels>
                    </labels>
                <created>Tue, 31 Jan 2012 18:38:16 +0000</created>
                <updated>Sat, 9 Feb 2013 21:52:48 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17380" author="deeky666" created="Thu, 9 Feb 2012 00:23:50 +0000"  >&lt;p&gt;Same problem here. I wanted to write some unit tests, checking the entity relations and ran into exactly the same problem. Maybe my code can provide some more information (Group entity is the owning side, role entity is the inverse side):&lt;/p&gt;

&lt;p&gt;WHAT DOES NOT WORK:&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;        /**
         * Test ArrayCollection
         */
        $group = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Group(&apos;Group Test&apos;);
        $em-&amp;gt;persist($group);
        $em-&amp;gt;flush();

        $groups = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ArrayCollection();
        $groups-&amp;gt;add($group);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;setGroups($groups);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertEquals($groups, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;getGroups());

        /**
         * Test PersistentCollection
         */
        $em-&amp;gt;persist($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role);
        $em-&amp;gt;flush();

        $groups = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;getGroups();
        $groups-&amp;gt;removeElement($group); &lt;span class=&quot;code-comment&quot;&gt;// first remove element before adding a &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; one
&lt;/span&gt;
        $group = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Group(&apos;Group Test 2&apos;);
        $em-&amp;gt;persist($group);
        $em-&amp;gt;flush();
        $groups-&amp;gt;add($group);        

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;setGroups($groups);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertEquals($groups, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;getGroups());
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;WHAT WORKS:&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;        /**
         * Test ArrayCollection
         */
        $group = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Group(&apos;Group Test&apos;);
        $em-&amp;gt;persist($group);
        $em-&amp;gt;flush();

        $groups = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ArrayCollection();
        $groups-&amp;gt;add($group);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;setGroups($groups);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertEquals($groups, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;getGroups());

        /**
         * Test PersistentCollection
         */
        $em-&amp;gt;persist($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role);
        $em-&amp;gt;flush();

        $groups = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;getGroups();

        $group2 = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Group(&apos;Group Test 2&apos;);
        $em-&amp;gt;persist($group2);
        $em-&amp;gt;flush();
        $groups-&amp;gt;add($group2);  &lt;span class=&quot;code-comment&quot;&gt;// first adding a &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; element before removing one
&lt;/span&gt;
        $groups-&amp;gt;removeElement($group);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;setGroups($groups);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertEquals($groups, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;getGroups());
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Hope this helps in any way... I tried figuring it out on my own but I am too drunk right now xD&lt;/p&gt;</comment>
                    <comment id="17404" author="beberlei" created="Fri, 10 Feb 2012 20:41:45 +0000"  >&lt;p&gt;Thanks for the report, formatted it&lt;/p&gt;</comment>
                    <comment id="17405" author="beberlei" created="Fri, 10 Feb 2012 20:42:00 +0000"  >&lt;p&gt;Which version is that btw?&lt;/p&gt;</comment>
                    <comment id="17429" author="deeky666" created="Thu, 16 Feb 2012 21:52:05 +0000"  >&lt;p&gt;Occurs in version 2.1.6&lt;/p&gt;</comment>
                    <comment id="17452" author="beberlei" created="Mon, 20 Feb 2012 10:00:07 +0000"  >&lt;p&gt;If group is the owning side, why do you only set Role::$groups? This has to be the other way around or not?&lt;/p&gt;</comment>
                    <comment id="17453" author="beberlei" created="Mon, 20 Feb 2012 10:33:24 +0000"  >&lt;p&gt;@Steve&lt;/p&gt;

&lt;p&gt;I cannot reproduce your issue.&lt;/p&gt;

&lt;p&gt;Attached is a test script.&lt;/p&gt;

&lt;p&gt;Your code is very weird btw, why are you getting and setting groups collection? It is passed by reference so you can just have something like $role-&amp;gt;addGroup() and $role-&amp;gt;removeGroup() and encapsulate the logic?&lt;/p&gt;

&lt;p&gt;Also your tests are pretty useless, you check if two variables which are the same reference to the same collection are the same. Which should always be true.&lt;/p&gt;

&lt;p&gt;@Lee&lt;/p&gt;

&lt;p&gt;Can you provide more details? I cant verify this without more details.&lt;/p&gt;</comment>
                    <comment id="19505" author="asm89" created="Sat, 9 Feb 2013 21:52:48 +0000"  >&lt;p&gt;Can anyone provide us with more feedback?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11164" name="DDC1630Test.php" size="1446" author="beberlei" created="Mon, 20 Feb 2012 10:33:39 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1494] Query results are overwritten by previous query.</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1494</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am running a query that JOINs three tables, with a simple WHERE:&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;$q = $em-&amp;gt;createQuery(&quot;

SELECT cat, n, c
FROM Project_Model_NoticeCategory cat
JOIN cat.notices n
JOIN n.chapters c
WHERE
c.id = :chapter_id

&quot;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When I do 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;  $q-&amp;gt;setParameter(&apos;chapter_id&apos;, 1);
  $a = $q-&amp;gt;getResult();

  $q-&amp;gt;setParameter(&apos;chapter_id&apos;, 2);
  $b = $q-&amp;gt;getResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;$b always has the wrong results. Running the following code:&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;  $q-&amp;gt;setParameter(&apos;chapter_id&apos;, 1);
  $a = $q-&amp;gt;getResult();

  $q-&amp;gt;setParameter(&apos;chapter_id&apos;, 2);
  $b = $q-&amp;gt;getResult();
  $z = $q-&amp;gt;getArrayResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;BUG Results: $b != $z (getArrayResult IS CORRECT, it refreshes the results) Note: $a==$b (which is wrong)&lt;/p&gt;

&lt;p&gt;Explanation:&lt;/p&gt;

&lt;p&gt;There is a chapter table, this has a many-to-many join to notices (these are meta info&lt;br/&gt;
about the chapter &amp;#8211; a little like tagging a blog post) the notices are grouped into&lt;br/&gt;
categories.&lt;/p&gt;

&lt;p&gt;Data model:&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;/**
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;chapter&quot;&lt;/span&gt;)
 */
class Project_Model_Chapter
{
    /**
     * @Id @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     * @GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;AUTO&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;
 
    /** @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;) */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $title;

	/**
	 * @ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Project_Model_Notice&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;chapters&quot;&lt;/span&gt;)
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $notices;
	
	.... /lots of code snipped/ ....
	
}


/**
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;notice&quot;&lt;/span&gt;)
 */
class Project_Model_Notice
{
	/**
     * @Id @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     * @GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;AUTO&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;
 
    /** @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;) */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $title;
	
	/**
	 * @ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Project_Model_Chapter&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;notices&quot;&lt;/span&gt;)
	 * @JoinTable(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;chapter_notice&quot;&lt;/span&gt;)
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $chapters;
	
	/**
	 * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Project_Model_NoticeCategory&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;notices&quot;&lt;/span&gt;)
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $notice_category;
	
	.... /lots of code snipped/ ....
	
}

/**
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;notice_category&quot;&lt;/span&gt;)
 */
class Project_Model_NoticeCategory
{
    /**
     * @Id @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     * @GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;AUTO&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;
	/** @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;) */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $title;
	
	/**
	 * Bidirectional - One-To-Many (INVERSE SIDE)
	 *
	 * @OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Project_Model_Notice&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;notice_category&quot;&lt;/span&gt;, cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;persist&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;remove&quot;&lt;/span&gt;})
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $notices;

	.... /lots of code snipped/ ....
	
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Data fixtures:&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;$tools = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Project_Model_NoticeCategory;
$tools-&amp;gt;setTitle(&apos;Tools&apos;);
		
$spanner = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Project_Model_Notice;
$spanner-&amp;gt;setTitle(&apos;spanner&apos;);
$tools-&amp;gt;addNotice($spanner);
		
$drill = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Project_Model_Notice;
$drill-&amp;gt;setTitle(&apos;power drill&apos;);
$tools-&amp;gt;addNotice($drill);
		
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;persist($tools);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;flush();

$tools = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Project_Model_NoticeCategory;
$tools-&amp;gt;setTitle(&apos;Safety&apos;);
		
$gloves = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Project_Model_Notice;
$gloves-&amp;gt;setTitle(&apos;gloves&apos;);
$tools-&amp;gt;addNotice($gloves);
		
$goggles = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Project_Model_Notice;
$goggles-&amp;gt;setTitle(&apos;goggles&apos;);
$tools-&amp;gt;addNotice($goggles);
		
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;persist($tools);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;flush();

$chapter1 = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Project_Model_Chapter;
$chapter1-&amp;gt;setTitle(&apos;Chapter 1&apos;);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;persist($chapter1);

$chapter2 = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Project_Model_Chapter;
$chapter2-&amp;gt;setTitle(&apos;Chapter 2&apos;);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;persist($chapter2);

$chapter1-&amp;gt;addNotice($spanner);
$chapter1-&amp;gt;addNotice($gloves);

$chapter2-&amp;gt;addNotice($spanner);
$chapter2-&amp;gt;addNotice($gloves);
$chapter2-&amp;gt;addNotice($drill);
$chapter2-&amp;gt;addNotice($goggles);

&lt;span class=&quot;code-comment&quot;&gt;// now persist and flush everything&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Initial investigation:&lt;/p&gt;

&lt;p&gt;I think it has something to do with HINT_REFRESH ? Stepping through:&lt;/p&gt;

&lt;p&gt;ObjectHydrator-&amp;gt;_hydrateRow&lt;br/&gt;
ObjectHydrator-&amp;gt;_getEntity&lt;/p&gt;

&lt;p&gt;when it requests the Project_Model_Category from the unit of work, it&lt;br/&gt;
seems that the second query is simply grabbing the cached results from&lt;br/&gt;
the first results. This MUST be wrong as the second query uses a&lt;br/&gt;
different query (the ID changes) and all the results are wrong.&lt;/p&gt;
</description>
                <environment>PHP 5.3 + MySQL 5.5</environment>
            <key id="13188">DDC-1494</key>
            <summary>Query results are overwritten by previous query.</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="10000" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="monk.e.boy">J</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Nov 2011 09:56:12 +0000</created>
                <updated>Sat, 9 Feb 2013 20:26:53 +0000</updated>
                                    <version>2.1.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="16834" author="beberlei" created="Tue, 15 Nov 2011 10:19:13 +0000"  >&lt;p&gt;Fixed formatting&lt;/p&gt;</comment>
                    <comment id="16870" author="beberlei" created="Fri, 18 Nov 2011 17:43:12 +0000"  >&lt;p&gt;are you using result caching?&lt;/p&gt;</comment>
                    <comment id="16898" author="monk.e.boy" created="Mon, 21 Nov 2011 14:45:09 +0000"  >&lt;p&gt;This is part of my bootstrap&lt;br/&gt;
,&lt;br/&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;		
$config = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\ORM\Configuration();
		
$cache = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\Common\Cache\ArrayCache;
$config-&amp;gt;setMetadataCacheImpl($cache);
$config-&amp;gt;setQueryCacheImpl($cache);
		
&lt;span class=&quot;code-comment&quot;&gt;// driver: schema
&lt;/span&gt;$driver = $config-&amp;gt;newDefaultAnnotationDriver(
	APPLICATION_PATH . &apos;/models&apos;
);
$config-&amp;gt;setMetadataDriverImpl($driver);

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="16998" author="beberlei" created="Thu, 15 Dec 2011 20:49:29 +0000"  >&lt;p&gt;Cannot reproduce it with the script attached. Can you try to modify this to fail or write your own testcase?&lt;/p&gt;</comment>
                    <comment id="16999" author="beberlei" created="Thu, 15 Dec 2011 20:49:47 +0000"  >&lt;p&gt;Downgraded&lt;/p&gt;</comment>
                    <comment id="19499" author="asm89" created="Sat, 9 Feb 2013 20:26:43 +0000"  >&lt;p&gt;Please provide extra feedback.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11131" name="DDC1494Test.php" size="1591" author="beberlei" created="Thu, 15 Dec 2011 20:49:29 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2290] Infer custom Types from the field for query parameters</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2290</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When using a mapping Type that declares &lt;tt&gt;convertToDatabaseValue&lt;/tt&gt;, the method is not always called in queries.&lt;/p&gt;

&lt;p&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-java&quot;&gt;
SELECT ... WHERE entity.field = ?1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;(with &lt;tt&gt;entity.field&lt;/tt&gt; being of custom type &apos;the_mapping_type&apos;)&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;Type::convertToDatabaseValue()&lt;/tt&gt; is correctly called when using:&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;
$query-&amp;gt;setParameter(&apos;1&apos;, &apos;foo&apos;, &apos;the_mapping_type&apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But it is not called when using:&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;
$query-&amp;gt;setParameter(&apos;1&apos;, &apos;foo&apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;which gives a query that returns invalid results.&lt;/p&gt;

&lt;p&gt;Like other mapping types in this situation, there is no reason the type is not inferred automatically from the field.&lt;/p&gt;

&lt;p&gt;I have written a failing test case in Doctrine\Tests\ORM\Functional\TypeValueSqlTest:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function testQueryParameterWithoutType()
    {
        $entity = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; CustomTypeUpperCase();
        $entity-&amp;gt;lowerCaseString = &apos;foo&apos;;

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;persist($entity);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;flush();

        $id = $entity-&amp;gt;id;

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;clear();

        $query = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;createQuery(&apos;SELECT c.id from Doctrine\Tests\Models\CustomType\CustomTypeUpperCase c where c.lowerCaseString = ?1&apos;);
        $query-&amp;gt;setParameter(&apos;1&apos;, &apos;foo&apos;);

        $result = $query-&amp;gt;getResult();

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertCount(1, $result);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertEquals($id, $result[0][&apos;id&apos;]);
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14470">DDC-2290</key>
            <summary>Infer custom Types from the field for query parameters</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="mnapoli">Matthieu Napoli</reporter>
                        <labels>
                    </labels>
                <created>Fri, 8 Feb 2013 11:36:49 +0000</created>
                <updated>Fri, 8 Feb 2013 12:54:06 +0000</updated>
                                                                            <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19494" author="mnapoli" created="Fri, 8 Feb 2013 11:38:48 +0000"  >&lt;p&gt;See also &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2224&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2224&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19495" author="mnapoli" created="Fri, 8 Feb 2013 12:54:06 +0000"  >&lt;p&gt;The test is in this branch: &lt;a href=&quot;https://github.com/myc-sense/doctrine2/tree/DDC-2290&quot; class=&quot;external-link&quot;&gt;https://github.com/myc-sense/doctrine2/tree/DDC-2290&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2288] Schema Tool doesn&apos;t update collation on table level</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2288</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In Symfony2, when updating the collation option of a table, the schema tool doesn&apos;t recognize the change: &lt;/p&gt;

&lt;p&gt;Changing from:&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; 
* @ORM\Table()
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;To:&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; 
* @ORM\Table(options={&lt;span class=&quot;code-quote&quot;&gt;&quot;collate&quot;&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;utf8_swedish_ci&quot;&lt;/span&gt;})
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Results in:&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; 
$ php app/console doctrine:schema:update --dump-sql
Nothing to update - your database is already in sync with the current entity metadata.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; </description>
                <environment></environment>
            <key id="14468">DDC-2288</key>
            <summary>Schema Tool doesn&apos;t update collation on table level</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="rickard">Rickard Andersson</reporter>
                        <labels>
                        <label>collation</label>
                        <label>schematool</label>
                    </labels>
                <created>Fri, 8 Feb 2013 09:50:30 +0000</created>
                <updated>Fri, 8 Feb 2013 09:50:30 +0000</updated>
                                                                    <component>Mapping Drivers</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2286] Update documentation for collation</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2286</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The documentation at &lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/faq.html#how-do-i-set-the-charset-and-collation-for-mysql-tables&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/faq.html#how-do-i-set-the-charset-and-collation-for-mysql-tables&lt;/a&gt; clearly states that the collation should be set at database level and then inherited for all tables created. &lt;/p&gt;

&lt;p&gt;Digging through the code and reading this issue &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2139&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2139&lt;/a&gt; it&apos;s clear that this is no longer the case.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14466">DDC-2286</key>
            <summary>Update documentation for collation</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="rickard">Rickard Andersson</reporter>
                        <labels>
                        <label>collation</label>
                        <label>documentation</label>
                    </labels>
                <created>Fri, 8 Feb 2013 09:27:56 +0000</created>
                <updated>Fri, 8 Feb 2013 09:27:56 +0000</updated>
                                                                    <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2275] [GH-568] Fixed plural variable names to singular when generating add or remove methods for entities</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2275</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of alexcarol:&lt;/p&gt;

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

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

&lt;p&gt;Changed generateEntityStubMethod so that variable names in add or remove methods are singular too&lt;/p&gt;

&lt;p&gt;Edited tests for EntityGenerator so that variable names are checked too&lt;/p&gt;</description>
                <environment></environment>
            <key id="14454">DDC-2275</key>
            <summary>[GH-568] Fixed plural variable names to singular when generating add or remove methods for entities</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 4 Feb 2013 01:47:46 +0000</created>
                <updated>Mon, 4 Feb 2013 01:47:46 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2264] Add support for custom Oracle SID / Service name in PDO_Oracle driver</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2264</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Some Oracle customer databases are set up having different settings for their &quot;DBNAME&quot; and &quot;SID&quot; / &quot;SERVICE&quot; property. (DBNAME != SID)&lt;/p&gt;

&lt;p&gt;So, hereing it&apos;s currently not possible to connect via the PDO_Oracle driver (Class: Doctrine\DBAL\Driver\PDOOracle\Driver) as it uses the DBNAME value by default as value for SID / SERVICE in the _constructPdoDsn() method. (DBNAME = SID)&lt;/p&gt;

&lt;p&gt;A solution would be to add an additional config param like &quot;servicename&quot; and pass it&apos;s value into _constructPdoDsn().&lt;/p&gt;

&lt;p&gt;An updated version of the method could look like:&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;private function _constructPdoDsn(array $params)&lt;br/&gt;
{&lt;br/&gt;
    $dsn = &apos;oci:&apos;;&lt;br/&gt;
    if (isset($params&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;host&amp;#39;&amp;#93;&lt;/span&gt;) &amp;amp;&amp;amp; $params&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;host&amp;#39;&amp;#93;&lt;/span&gt; != &apos;&apos;) {&lt;br/&gt;
        $dsn .= &apos;dbname=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)&apos; .&lt;br/&gt;
               &apos;(HOST=&apos; . $params&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;host&amp;#39;&amp;#93;&lt;/span&gt; . &apos;)&apos;;&lt;/p&gt;

&lt;p&gt;        if (isset($params&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;port&amp;#39;&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
            $dsn .= &apos;(PORT=&apos; . $params[&apos;port&apos;] . &apos;)&apos;;
        }
&lt;p&gt; else &lt;/p&gt;
{
            $dsn .= &apos;(PORT=1521)&apos;;
        }

&lt;p&gt;		if (isset($params&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;servicename&amp;#39;&amp;#93;&lt;/span&gt;) &amp;amp;&amp;amp; $params&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;servicename&amp;#39;&amp;#93;&lt;/span&gt; != &apos;&apos;)&lt;/p&gt;
		{
			$servicename	=	$params[&apos;servicename&apos;];
		}
&lt;p&gt;		else&lt;/p&gt;
		{
			$servicename	=	$params[&apos;dbname&apos;];
		}

&lt;p&gt;        if (isset($params&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;service&amp;#39;&amp;#93;&lt;/span&gt;) &amp;amp;&amp;amp; $params&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;service&amp;#39;&amp;#93;&lt;/span&gt; == true) &lt;/p&gt;
{
            $dsn .= &apos;))(CONNECT_DATA=(SERVICE_NAME=&apos; . $servicename . &apos;)))&apos;;
        }
&lt;p&gt; else &lt;/p&gt;
{
            $dsn .= &apos;))(CONNECT_DATA=(SID=&apos; . $servicename . &apos;)))&apos;;
        }

&lt;p&gt;    } else &lt;/p&gt;
{
        $dsn .= &apos;dbname=&apos; . $params[&apos;dbname&apos;];
    }

&lt;p&gt;    if (isset($params&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;charset&amp;#39;&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
        $dsn .= &apos;;charset=&apos; . $params[&apos;charset&apos;];
    }

&lt;p&gt;    return $dsn;&lt;br/&gt;
}&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;The only workaround for me is right now to use the &quot;standard&quot; PHP OCI / OCI8 functions with the correct SID / Service in it&apos;s DSN.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14430">DDC-2264</key>
            <summary>Add support for custom Oracle SID / Service name in PDO_Oracle driver</summary>
                <type id="3" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/task.png">Task</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="michl">Michl Schmid</reporter>
                        <labels>
                        <label>oracle</label>
                    </labels>
                <created>Tue, 29 Jan 2013 10:16:55 +0000</created>
                <updated>Tue, 29 Jan 2013 10:16:55 +0000</updated>
                                    <version>2.0</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2260] Partial DQL query doesn&apos;t respect given order of columns</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2260</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When executing partial DQL queries it may be important to keep given order of columns e.g. for &quot;pairs&quot; hydrator when first column of a pair is used as a key and second - as value. For example query 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-sql&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;select&lt;/span&gt; partial u.{id,name} &lt;span class=&quot;code-keyword&quot;&gt;from&lt;/span&gt; my:User u&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;will expect &quot;id&quot; to be first in resulted set and &quot;name&quot; to be second and not vice versa.&lt;/p&gt;

&lt;p&gt;However Doctrine parses this part of statement via iterating over fields mapping from entity&apos;s class metadata (as can be seen in &lt;tt&gt;Doctrine\ORM\Query\SqlWalker::walkSelectExpression()&lt;/tt&gt;):&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;foreach ($class-&amp;gt;fieldMappings as $fieldName =&amp;gt; $mapping) {
  &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($partialFieldSet &amp;amp;&amp;amp; ! in_array($fieldName, $partialFieldSet)) {
    &lt;span class=&quot;code-keyword&quot;&gt;continue&lt;/span&gt;;
  }
  ...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and hence given columns order preserving is not guaranteed.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14419">DDC-2260</key>
            <summary>Partial DQL query doesn&apos;t respect given order of columns</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="flying">Alexander Grimalovsky</reporter>
                        <labels>
                    </labels>
                <created>Sat, 26 Jan 2013 10:42:01 +0000</created>
                <updated>Sun, 27 Jan 2013 15:48:58 +0000</updated>
                                    <version>2.3.2</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19418" author="ocramius" created="Sat, 26 Jan 2013 15:55:02 +0000"  >&lt;p&gt;What is the advantage in respecting the order given in the DQL query?&lt;/p&gt;</comment>
                    <comment id="19426" author="flying" created="Sun, 27 Jan 2013 10:01:12 +0000"  >&lt;p&gt;Currently the only practical reason for it that I found is &quot;pairs&quot; hydrator. However it is, of course, possible to implement it without such change too. &lt;/p&gt;

&lt;p&gt;Generally speaking this behavior (getting result set with same order of columns that was given in a query) is something that is feeling &quot;natural&quot; for operations with database since it is how you normally get results from SQL queries.&lt;/p&gt;

&lt;p&gt;Maybe it will be enough to mention in documentation for Doctrine that given columns order is not guaranteed to be kept.&lt;/p&gt;</comment>
                    <comment id="19428" author="ocramius" created="Sun, 27 Jan 2013 15:48:39 +0000"  >&lt;p&gt;@&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=flying&quot; class=&quot;user-hover&quot; rel=&quot;flying&quot;&gt;Alexander Grimalovsky&lt;/a&gt; I don&apos;t think it&apos;s worth mentioning it. Also, including a fix for this is quite complex. If you prefer to document it, go for it!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1938] [GH-406] [WIP] - DCOM-96 - Moving proxy generation and autoloading to common</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1938</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Ocramius:&lt;/p&gt;

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

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

&lt;p&gt;This PR is related to doctrine/common#168. &lt;/p&gt;

&lt;p&gt;In this PR, the `ProxyFactory` has been reduced to an object builder and it&apos;s public API has been kept intact (While the proxy `Autoloader` has been moved to doctrine/common). It would be interesting to define what this builder could do with the `ProxyFactory` to get its own customizations introduced.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13872">DDC-1938</key>
            <summary>[GH-406] [WIP] - DCOM-96 - Moving proxy generation and autoloading to common</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 21 Jul 2012 23:26:43 +0000</created>
                <updated>Sat, 26 Jan 2013 23:53:35 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19408" author="beberlei" created="Fri, 25 Jan 2013 16:25:23 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-247&amp;#93;&lt;/span&gt; was opened&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/common/pull/247&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/pull/247&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19422" author="beberlei" created="Sat, 26 Jan 2013 23:53:35 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-247&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/common/pull/247&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/pull/247&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1803] Paginator usage with a DQL query that is using 2 time the same named binded value failed</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1803</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I use a dql query where I bind a named parameter 2 time in the same query for different joined fields.  The query work but the count query failed saying that there are missing bind variable.&lt;/p&gt;

&lt;p&gt;ex:&lt;br/&gt;
$qb = $this-&amp;gt;getQueryBuilder()&lt;br/&gt;
            -&amp;gt;select(&apos;&lt;br/&gt;
                partial fl.&lt;/p&gt;
{id, title, listing_date, abstract}
&lt;p&gt;,&lt;br/&gt;
                partial fla.&lt;/p&gt;
{id},&lt;br/&gt;
                partial ca.{id}
&lt;p&gt;,&lt;br/&gt;
                partial ds.&lt;/p&gt;
{id}
&lt;p&gt;            &apos;)&lt;br/&gt;
            -&amp;gt;from(&apos;Fo_Listing&apos;, &apos;fl&apos;)&lt;br/&gt;
            -&amp;gt;join(&apos;fl.listing_properties&apos;, &apos;flp&apos;)&lt;br/&gt;
            -&amp;gt;join(&apos;flp.property&apos;, &apos;fp&apos;)&lt;br/&gt;
            -&amp;gt;leftjoin(&apos;fl.listing_assets&apos;, &apos;fla&apos;)&lt;br/&gt;
            -&amp;gt;leftjoin(&apos;fla.asset&apos;, &apos;ca&apos;)&lt;br/&gt;
            -&amp;gt;leftjoin(&apos;ca.ds&apos;, &apos;ds&apos;)&lt;br/&gt;
            -&amp;gt;where(&apos;fp.id = :propertyId&apos;)&lt;br/&gt;
                -&amp;gt;setParameter(&apos;propertyId&apos;, $id)&lt;br/&gt;
            -&amp;gt;andWhere(&apos;fl.object_status_id &amp;lt;&amp;gt; :deleted&apos;)&lt;br/&gt;
                -&amp;gt;setParameter(&apos;deleted&apos;, CoRefObjectStatus::DELETE)&lt;br/&gt;
            -&amp;gt;andWhere(&apos;fl.publishing_status_id = :published&apos;)&lt;br/&gt;
                -&amp;gt;setParameter(&apos;published&apos;, CoRefPublishingStatus::PUBLISHED)&lt;br/&gt;
            -&amp;gt;andWhere(&apos;fp.object_status_id &amp;lt;&amp;gt; :deleted&apos;)&lt;br/&gt;
                -&amp;gt;setParameter(&apos;deleted&apos;, CoRefObjectStatus::DELETE)&lt;br/&gt;
            -&amp;gt;andWhere(&apos;fp.publishing_status_id = :published&apos;)&lt;br/&gt;
                -&amp;gt;setParameter(&apos;published&apos;, CoRefPublishingStatus::PUBLISHED)&lt;br/&gt;
            -&amp;gt;add(&apos;orderBy&apos;, &apos;fl.listing_date DESC, fl.published_date DESC&apos;)&lt;br/&gt;
            -&amp;gt;setMaxResults($onTheMarketLimit);&lt;/p&gt;

&lt;p&gt;        $onTheMarket = new Paginator($qb, $fetchJoin = true);&lt;/p&gt;

&lt;p&gt;To make it work, I&apos;ve renamed the second usage of the named variable with a 2 at the end.  deleted2 and published2.&lt;/p&gt;</description>
                <environment>linux, oracle</environment>
            <key id="13669">DDC-1803</key>
            <summary>Paginator usage with a DQL query that is using 2 time the same named binded value failed</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="10000" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="mdrolet">Marc Drolet</reporter>
                        <labels>
                    </labels>
                <created>Mon, 30 Apr 2012 12:41:44 +0000</created>
                <updated>Fri, 25 Jan 2013 15:29:52 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19385" author="ocramius" created="Wed, 23 Jan 2013 22:27:08 +0000"  >&lt;p&gt;This seems to be quite old. &lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=mdrolet&quot; class=&quot;user-hover&quot; rel=&quot;mdrolet&quot;&gt;Marc Drolet&lt;/a&gt; is it still valid with the latest ORM?&lt;/p&gt;</comment>
                    <comment id="19406" author="mdrolet" created="Fri, 25 Jan 2013 15:27:21 +0000"  >&lt;p&gt;I&apos;ll try to test this problem on an updated version and I&apos;ll let you know.&lt;br/&gt;
The bug entry is also quite old and I&apos;ve a local modified version of the paginator here to make it work with oracle, so it can take some time before I can test this out on the current doctrine version.&lt;/p&gt;</comment>
                    <comment id="19407" author="ocramius" created="Fri, 25 Jan 2013 15:29:48 +0000"  >&lt;p&gt;Ok, marking as awaiting feedback&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1721] LIKE clausule should accept functions on the pattern</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1721</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Example:&lt;br/&gt;
SELECT .... WHERE upper(n.title) LIKE upper(:filter)&lt;/p&gt;

&lt;p&gt;should be a valid SQL, now is rejected because the walker only accept a variable or an string expression.&lt;/p&gt;

&lt;p&gt;I&apos;m adding a patch to address this.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13548">DDC-1721</key>
            <summary>LIKE clausule should accept functions on the pattern</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="ignaciolarranaga">Ignacio Larranaga</reporter>
                        <labels>
                    </labels>
                <created>Wed, 21 Mar 2012 17:40:33 +0000</created>
                <updated>Thu, 24 Jan 2013 18:06:45 +0000</updated>
                                    <version>2.1.6</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="17625" author="ignaciolarranaga" created="Wed, 21 Mar 2012 19:30:31 +0000"  >&lt;p&gt;Sorry the Parser has to be modified also to allow expressions to be recognized, I&apos;m attaching the necessary patch.&lt;/p&gt;</comment>
                    <comment id="17626" author="beberlei" created="Thu, 22 Mar 2012 19:31:32 +0000"  >&lt;p&gt;I am sure there is a reason why the walker doesn&apos;t accept this such as not all supported vendors allowing functions in right hand side LIKE expressions, but i am not sure about this.&lt;/p&gt;</comment>
                    <comment id="18764" author="darkangel" created="Wed, 3 Oct 2012 09:46:44 +0000"  >&lt;p&gt;This is not possible either:&lt;/p&gt;

&lt;p&gt;WHERE CASE WHEN p.name IS NULL THEN u.username ELSE p.name END LIKE :name&lt;/p&gt;</comment>
                    <comment id="19403" author="thomas303" created="Thu, 24 Jan 2013 18:06:45 +0000"  >&lt;p&gt;In my case it worked when using &quot;=&quot; instead of &quot;LIKE&quot;.&lt;/p&gt;

&lt;p&gt;//works:&lt;br/&gt;
(CASE WHEN (Book.id = BookFrom.id) THEN BookTo.displayName ELSE BookFrom.displayName END) = :name&lt;/p&gt;

&lt;p&gt;//&lt;span class=&quot;error&quot;&gt;&amp;#91;Syntax Error&amp;#93;&lt;/span&gt; line 0, col 1217: Error: Expected =, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, &amp;gt;, &amp;gt;=, !=, got &apos;LIKE&apos; &lt;br/&gt;
(CASE WHEN (Book.id = BookFrom.id) THEN BookTo.displayName ELSE BookFrom.displayName END) LIKE :name&lt;/p&gt;

&lt;p&gt;So the LIKE operator only needs to be allowed here.&lt;/p&gt;

&lt;p&gt;I&apos;m wondering which vendor should not be able to handle that:&lt;br/&gt;
The CASE WHEN ... THEN ... END is documented in DQL, and allowed.&lt;br/&gt;
LIKE itself is allowed.&lt;br/&gt;
If an RDBMs cannot use CASE WHEN and LIKE in combination, this would be a strange limitation.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11172" name="Parser.patch" size="847" author="ignaciolarranaga" created="Wed, 21 Mar 2012 19:30:31 +0000" />
                    <attachment id="11171" name="SqlWalker.patch" size="891" author="ignaciolarranaga" created="Wed, 21 Mar 2012 17:40:33 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1010] Crash when fetching results from qb inside postLoad event</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1010</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I registered an event listener to my entity manager and on a postLoad event, I want to prepare some data in a nice way (fetch translations for my library + store into associative array into entity). Here&apos;s my snippet:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
class TranslationListener &lt;span class=&quot;code-keyword&quot;&gt;implements&lt;/span&gt; EventSubscriber
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getSubscribedEvents()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; array(Events::postLoad);
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function postLoad(LifecycleEventArgs $args)
    {
        $em = $args-&amp;gt;getEntityManager();
        $entity = $args-&amp;gt;getEntity();

        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($entity &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; Lib) {
            $qb = $em-&amp;gt;createQueryBuilder();
            $qb = $qb-&amp;gt;select(&apos;T&apos;)-&amp;gt;from(&apos;Translate&apos;, &apos;T&apos;)-&amp;gt;join(&apos;T.locale&apos;, &apos;TT&apos;)-&amp;gt;where(&apos;T.lib = ?1&apos;)-&amp;gt;setParameter(1, $entity-&amp;gt;idLib);
            $res = $qb-&amp;gt;getQuery()-&amp;gt;getResult();
            foreach ($res as $tr) {
                $entity-&amp;gt;tr[$tr-&amp;gt;locale-&amp;gt;idLocale] = $tr;
            }
        }
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When this code is run (eg. getting the Library objects), I got a crash where getResult() is called:&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;
Fatal error: Call to a member function fetch() on a non-object in /home/thepianoguy/testproject/trunk/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php on line 126
Call Stack
#	Time	Memory	Function	Location
1	0.0004	656080	{main}( )	../index.php:0
2	0.1081	18760176	TApplication-&amp;gt;run( )	../index.php:48
3	0.2637	33817288	TApplication-&amp;gt;runService( )	../TApplication.php:382
4	0.2637	33817288	TPageService-&amp;gt;run( )	../TApplication.php:1095
5	0.2698	34788448	TPageService-&amp;gt;runPage( )	../TPageService.php:444
6	0.2715	34986768	TPage-&amp;gt;run( )	../TPageService.php:498
7	0.2716	34989128	TPage-&amp;gt;processNormalRequest( )	../TPage.php:198
8	0.3383	42770128	TControl-&amp;gt;loadRecursive( )	../TPage.php:215
9	0.3383	42770208	ContactUserAddEdit-&amp;gt;onLoad( )	../TControl.php:1286
10	0.3383	42771912	ContactUserAddEdit-&amp;gt;loadData( )	../ContactUserAddEdit.php:56
11	0.3452	43436904	Doctrine\ORM\AbstractQuery-&amp;gt;getResult( )	../ContactUserAddEdit.php:124
12	0.3452	43437296	Doctrine\ORM\AbstractQuery-&amp;gt;execute( )	../AbstractQuery.php:366
13	0.4160	47009328	Doctrine\ORM\Internal\Hydration\AbstractHydrator-&amp;gt;hydrateAll( )	../AbstractQuery.php:537
14	0.4160	47011504	Doctrine\ORM\Internal\Hydration\ObjectHydrator-&amp;gt;_hydrateAll( )	../AbstractHydrator.php:99
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If I comment the line 137 in Doctrine/ORM/Internal/Hydration/AbstractHydrator in _cleanup(), my code works fine:&lt;br/&gt;
//        $this-&amp;gt;_stmt = null;&lt;/p&gt;

&lt;p&gt;I think there is a problem when using alredy used entity manager and query builder inside the postLoad event.&lt;/p&gt;</description>
                <environment>PHP 5.3.3-1ubuntu9.3&lt;br/&gt;
KUbuntu 10.10</environment>
            <key id="12342">DDC-1010</key>
            <summary>Crash when fetching results from qb inside postLoad event</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="thepianoguy">Matevz Jekovec</reporter>
                        <labels>
                    </labels>
                <created>Tue, 1 Feb 2011 05:16:36 +0000</created>
                <updated>Wed, 23 Jan 2013 22:37:11 +0000</updated>
                                    <version>2.0.1</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="15208" author="beberlei" created="Wed, 2 Feb 2011 13:37:34 +0000"  >&lt;p&gt;The hydrator is reused internally, this is potentially dangerous as I figure from your use-case.&lt;/p&gt;</comment>
                    <comment id="15209" author="beberlei" created="Wed, 2 Feb 2011 13:45:15 +0000"  >&lt;p&gt;A workaround is to re-registr the object hydrator under a new name&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;$configuration-&amp;gt;setHydrationMode(&lt;span class=&quot;code-quote&quot;&gt;&quot;object2&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;Doctrine\ORM\Internal\Hydration\ObjectHydrator&quot;&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and use it in your query.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$query-&amp;gt;setHydrationMode(&lt;span class=&quot;code-quote&quot;&gt;&quot;object2&quot;&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="19387" author="ocramius" created="Wed, 23 Jan 2013 22:37:11 +0000"  >&lt;p&gt;Marking as documentation issue, since the user has to be warned that `postLoad` has to use a dedicated hydrator to execute more load operations.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1614] On OneToOne mappings with Primary Key same as Foreign Key, using @Id in the foreign association does not carry over when running &quot;generate-entities&quot; with --generate-annotations=1</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1614</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When having a OneToOne mapping that has a primary key that is the same as the foreign key, using the @Id attribute does not carry over when generating entities.&lt;/p&gt;

&lt;p&gt;Example code:&lt;/p&gt;

&lt;p&gt;class User&lt;br/&gt;
{&lt;br/&gt;
    /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@Id @Column(type=&quot;integer&quot;, nullable=false, columnDefinition=&quot;INT UNSIGNED NOT NULL AUTO_INCREMENT&quot;)&lt;/li&gt;
	&lt;li&gt;@GeneratedValue(strategy=&quot;AUTO&quot;)&lt;br/&gt;
     */&lt;br/&gt;
    private $id;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;    /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@OneToOne(targetEntity=&quot;User_ExtraAttrs&quot;, cascade=
{&quot;persist&quot;,&quot;remove&quot;,&quot;detach&quot;,&quot;merge&quot;,&quot;refresh&quot;}
&lt;p&gt;, mappedBy=&quot;User&quot;)&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;@JoinColumn(name=&quot;id&quot;, referencedColumnName=&quot;id&quot;)&lt;br/&gt;
     */&lt;br/&gt;
    private $UserAttrs;&lt;br/&gt;
}&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;class User_ExtraAttrs&lt;br/&gt;
{&lt;br/&gt;
    /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@OneToOne(targetEntity=&quot;User&quot;, cascade=
{&quot;all&quot;}
&lt;p&gt;, inversedBy=&quot;UserAttrs&quot;)&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;@Id&lt;/li&gt;
	&lt;li&gt;@JoinColumn(name=&quot;VehicleID&quot;, referencedColumnName=&quot;VehicleID&quot;)&lt;br/&gt;
     */&lt;br/&gt;
    private $User;&lt;br/&gt;
}&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;When running &quot;doctrine orm:generate-entities --regenerate-entities=1 --generate-annotations=1&quot;, the @Id in User_ExtraAttrs does not carry over.  It must be manually inserted.&lt;/p&gt;
</description>
                <environment>Fedora 15, php 5.3.8</environment>
            <key id="13379">DDC-1614</key>
            <summary>On OneToOne mappings with Primary Key same as Foreign Key, using @Id in the foreign association does not carry over when running &quot;generate-entities&quot; with --generate-annotations=1</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="5" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/trivial.png">Trivial</priority>
                    <status id="1" iconUrl="http://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="rfink">Ryan Fink</reporter>
                        <labels>
                    </labels>
                <created>Sun, 22 Jan 2012 18:11:20 +0000</created>
                <updated>Wed, 23 Jan 2013 22:32:41 +0000</updated>
                                    <version>2.1.1</version>
                                                <component>Mapping Drivers</component>
                <component>ORM</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1879] Orphans are neither nulled nor removed when merging a graph of detached entities</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1879</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When merging a graph of detached entities, the created entitied are created and the updated entities are updated but the non-present entities (which exist in the database but are not in the graph) are neither removed nor have them their association column nullified.&lt;/p&gt;

&lt;p&gt;Example :&lt;/p&gt;

&lt;p&gt;In my code I have 2 entities : Parent and Child. There is a OneToMany(cascade=&lt;/p&gt;
{&quot;all&quot;}
&lt;p&gt;, orphanRemoval=true) relation defined in Parent.&lt;/p&gt;

&lt;p&gt;In my database I have a Parent row with an id of 1, which has 3 Children with ids 1,2,3.&lt;/p&gt;

&lt;p&gt;When I write the following code, I expect the Parent with id 1 and the Child  with id 2 to be updated, a new Child to be created and the Child with id 1 and 3 to be deleted.&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;
$parent = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Parent(); $parent-&amp;gt;id = 1  &lt;span class=&quot;code-comment&quot;&gt;// detached entity
&lt;/span&gt;$existing_child = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Child(); $child-&amp;gt;id = 2 &lt;span class=&quot;code-comment&quot;&gt;// detached entity
&lt;/span&gt;$new_child = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Child(); &lt;span class=&quot;code-comment&quot;&gt;// &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; entity
&lt;/span&gt;$dinner-&amp;gt;addChild($existing_child);
$dinner-&amp;gt;addChild($new_child);

$em-&amp;gt;merge($dinner);

$em-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The objects I expect to be created and updated have the correct behaviour but the old children are not touched, they are still present in the database.&lt;/p&gt;</description>
                <environment>Doctrine 2.2.2&lt;br/&gt;
PHP 5.3.10 with Suhosin-Patch&lt;br/&gt;
mysql  Ver 14.14 Distrib 5.5.15, for osx10.7&lt;br/&gt;
Mac OS X 10.7 Lion</environment>
            <key id="13784">DDC-1879</key>
            <summary>Orphans are neither nulled nor removed when merging a graph of detached entities</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="10000" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="systho">Philippe Van Eerdenbrugghe</reporter>
                        <labels>
                    </labels>
                <created>Mon, 18 Jun 2012 15:56:06 +0000</created>
                <updated>Wed, 23 Jan 2013 22:24:05 +0000</updated>
                                    <version>2.2.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19384" author="ocramius" created="Wed, 23 Jan 2013 22:24:02 +0000"  >&lt;p&gt;I don&apos;t think this is valid. Orphan removal scheduling is handled only when an unit of work is available.&lt;/p&gt;

&lt;p&gt;What&apos;s the state of `$dinner` before your example? Can you `var_dump` it?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2213] Paginator does not work with composite primary key entity</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2213</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Paginator does not work with composed primary key.&lt;/p&gt;

&lt;p&gt;&quot;Single id is not allowed on composite primary key in entity&quot; exception is thrown here &lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php#L90&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php#L90&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Only first column values are fetched while retrieving primary keys here&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/Paginator.php#L173&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/Paginator.php#L173&lt;/a&gt;&lt;/p&gt;</description>
                <environment>php 5.4</environment>
            <key id="14332">DDC-2213</key>
            <summary>Paginator does not work with composite primary key entity</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="thestanislav">Stanislav Anisimov</reporter>
                        <labels>
                        <label>composed</label>
                        <label>key</label>
                        <label>paginator</label>
                    </labels>
                <created>Tue, 25 Dec 2012 13:24:27 +0000</created>
                <updated>Wed, 23 Jan 2013 21:20:21 +0000</updated>
                                    <version>2.3.1</version>
                                                <component>ORM</component>
                <component>Tools</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="19369" author="ocramius" created="Wed, 23 Jan 2013 21:20:21 +0000"  >&lt;p&gt;Limitation was confused by issue reporter and considered bug&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1785] Paginator problem with SQL Server around DISTINCT keyword.</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1785</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;PDOException: SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;42000&amp;#93;&lt;/span&gt;: &lt;span class=&quot;error&quot;&gt;&amp;#91;Microsoft&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;SQL Server Native Client 10.0&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;SQL Server&amp;#93;&lt;/span&gt;Incorrect syntax near the keyword &apos;DISTINCT&apos;. (uncaught exception)&lt;/p&gt;</description>
                <environment></environment>
            <key id="13642">DDC-1785</key>
            <summary>Paginator problem with SQL Server around DISTINCT keyword.</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 Apr 2012 08:06:55 +0000</created>
                <updated>Sat, 19 Jan 2013 18:50:37 +0000</updated>
                                    <version>2.1</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="18847" author="camason" created="Thu, 18 Oct 2012 08:44:54 +0000"  >&lt;p&gt;There are four major issues with this:&lt;/p&gt;

&lt;p&gt;1: SQLServerPlatform.php modifies the query to prepend &apos;SELECT ROW_NUMBER() OVER ($over)&apos;, which is inserted before the DISTINCT keyword.&lt;/p&gt;

&lt;p&gt;2: The order needs to be placed inside the OVER($over) block. At this point, the regex is using the exact column name rather than the alias, so the outer query cannot ORDER.&lt;/p&gt;

&lt;p&gt;3: The DISTINCT queries select only the ID columns - as OVER() required the sort column to be available in the outer query, IDs alone will not work.&lt;/p&gt;

&lt;p&gt;4: SQL Server cannot DISTINCT on TEXT columns. 2005,2008 and 2012 recommend using VARCHAR(MAX) instead, which does support it. That doesn&apos;t help us with 2003. We work around that with a custom TEXT type that casts as varchar.&lt;/p&gt;

&lt;p&gt;Incidentally, 2012 supports LIMIT, which gets rid of this issue altogether.&lt;/p&gt;

&lt;p&gt;Edit: Added #3&lt;/p&gt;</comment>
                    <comment id="18849" author="camason" created="Thu, 18 Oct 2012 13:31:11 +0000"  >&lt;p&gt;I have a (very hacky) implementation working that uses regexes to correct the query so that it will execute. This also required modification in the ORM paginator, to select all columns instead of just IDs.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/CraigMason/dbal/commit/4ecd018c73e387904f78d81f1d327e34e905c5f1&quot; class=&quot;external-link&quot;&gt;https://github.com/CraigMason/dbal/commit/4ecd018c73e387904f78d81f1d327e34e905c5f1&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/CraigMason/doctrine2/commit/b416d3b2a38495e4435bde872b19fec371fe5657&quot; class=&quot;external-link&quot;&gt;https://github.com/CraigMason/doctrine2/commit/b416d3b2a38495e4435bde872b19fec371fe5657&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is certainly not a patch - more guidance.&lt;/p&gt;

&lt;p&gt;One interesting point... I had to wrap the whole query in a second SELECT *, as the WHERE IN confusingly returns non-distinct rows when part of the first inner query. No idea why this happens, but moving it out one layer makes it operate correctly.&lt;/p&gt;</comment>
                    <comment id="18886" author="camason" created="Thu, 25 Oct 2012 11:35:00 +0000"  >&lt;p&gt;Updated, view all commits for this experimental branch here: &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/CraigMason/dbal/commits/mssql-distinct&quot; class=&quot;external-link&quot;&gt;https://github.com/CraigMason/dbal/commits/mssql-distinct&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18897" author="camason" created="Mon, 29 Oct 2012 20:13:49 +0000"  >&lt;p&gt;This got waaaay too messy with regex alone due to the complicated nesting. As such, I have written the basis of a new SqlWalker class which can be used to create DISTINCT queries based on the root identifiers. It&apos;s not proper DISTINCT support, but it&apos;s a step forward.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/CraigMason/DoctrineSqlServerExtensions&quot; class=&quot;external-link&quot;&gt;https://github.com/CraigMason/DoctrineSqlServerExtensions&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&apos;ve also added a Paginator (which was the original issue I had!)&lt;/p&gt;

&lt;p&gt;The current SqlWalker always sticks the ORDER BY on the end of the query, which just doesn&apos;t work properly with SqlServer. Is a vendor-specific walker breaking the DQL abstraction? Should this type of code be on the Platform object in the DBAL?&lt;/p&gt;

&lt;p&gt;Anyway, this repo fixes our immediate problem, and it would be good to revisit this in a wider context. Hopefully we can get some good SQL server support - there are plenty of other issues to deal with (UTF-8/UCS2, nvarchar etc)&lt;/p&gt;</comment>
                    <comment id="19339" author="beberlei" created="Sat, 19 Jan 2013 18:50:37 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=camason&quot; class=&quot;user-hover&quot; rel=&quot;camason&quot;&gt;Craig Mason&lt;/a&gt; We don&apos;t have an SQL Server expert on the team, so if you want really good support you should join and help us with it.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2249] Default value sequence </title>
                <link>http://doctrine-project.org/jira/browse/DDC-2249</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I want to have a column on a table that by default it takes the value from a sequence.&lt;/p&gt;

&lt;p&gt;I&apos;ve tried to do something like this:&lt;br/&gt;
    /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@ORM\Column(type=&quot;integer&quot;, unique=&quot;true&quot;)&lt;/li&gt;
	&lt;li&gt;@ORM\GeneratedValue(strategy=&quot;SEQUENCE&quot;)&lt;/li&gt;
	&lt;li&gt;@ORM\SequenceGenerator(sequenceName=&quot;seq_categorias&quot;, initialValue=1, allocationSize=100)&lt;br/&gt;
     */&lt;br/&gt;
    protected $id_categoria;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;But this doesn&apos;t work, it creates de sequence but not the link between the table column and the sequence. Is there any possibility to do something like this? Or any autoincrement default value instead?&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;</description>
                <environment>Symfony 2, linux</environment>
            <key id="14394">DDC-2249</key>
            <summary>Default value sequence </summary>
                <type id="3" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/task.png">Task</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="mdev">Maria</reporter>
                        <labels>
                    </labels>
                <created>Sat, 19 Jan 2013 18:44:07 +0000</created>
                <updated>Sat, 19 Jan 2013 18:44:07 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2248] Expire result cache functionality not implemented</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2248</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;According to &lt;a href=&quot;https://doctrine-orm.readthedocs.org/en/latest/reference/dql-doctrine-query-language.html?highlight=expireResultCache&quot; class=&quot;external-link&quot;&gt;documentation&lt;/a&gt; expireResultCache, should force cache to update but it&apos;s not working... Why? Because functionality is not implemented. You can set _expireResultCache variable, but there is no place where this variable is being checked.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14393">DDC-2248</key>
            <summary>Expire result cache functionality not implemented</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="nazin">Piotr Niziniecki</reporter>
                        <labels>
                    </labels>
                <created>Sat, 19 Jan 2013 17:25:33 +0000</created>
                <updated>Sat, 19 Jan 2013 17:40:44 +0000</updated>
                                    <version>2.3</version>
                <version>2.3.1</version>
                <version>2.3.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="19336" author="ocramius" created="Sat, 19 Jan 2013 17:40:44 +0000"  >&lt;p&gt;A cache profile can be set and cleaned. I suppose that `expireResultCache` is an old piece of code that survived the refactoring. Should just be removed and documented accordingly&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-265] Possibility for Nested Inheritance</title>
                <link>http://doctrine-project.org/jira/browse/DDC-265</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It would be great if Doctrine had the possibility to define a further inharitance in a subclass.&lt;/p&gt;

&lt;p&gt;Example:&lt;br/&gt;
There is a class DataObject managing things like created- and lastedit-&lt;br/&gt;
timestamps, archiving objects before updates, ...&lt;br/&gt;
One of the sub-objects is Content.&lt;br/&gt;
There are several types of content.&lt;br/&gt;
Written directly to a database field, read from a textfile on server,&lt;br/&gt;
executed php file on server, loaded from another server via xmlrpc and&lt;br/&gt;
so on. &lt;/p&gt;

&lt;p&gt;I&apos;d like to use a single table inheritance to map all information of&lt;br/&gt;
the different content objects in one table.&lt;br/&gt;
If I understand the model right the only alternate solution would be&lt;br/&gt;
to write each single content object to the discriminator map of&lt;br/&gt;
DataObject. &lt;/p&gt;</description>
                <environment></environment>
            <key id="10756">DDC-265</key>
            <summary>Possibility for Nested Inheritance</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="quest">Michael F&#252;rmann</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Jan 2010 06:27:37 +0000</created>
                <updated>Wed, 16 Jan 2013 08:16:23 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="11437" author="beberlei" created="Thu, 21 Jan 2010 09:30:09 +0000"  >&lt;p&gt;The DataObject you describe is a no-go for Doctrine 2. Its just a very bad practice.&lt;/p&gt;

&lt;p&gt;Inheritance Mapping is for REAL inheritance only, otherwise you shouldnt go with a relational database in the first place.&lt;/p&gt;

&lt;p&gt;You should use the Event system for such changes, it offers you roughly the same possibilities and keeps you from having to use inheritance mapping. You could still create an abstract data object and define the fields that will be used in each &quot;implementation&quot; and then in events do something like:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($entity &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; DataObject) {
     $entity-&amp;gt;updated();
     $archiver-&amp;gt;makeSnapshot($entity);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="12380" author="jwage" created="Sat, 20 Mar 2010 01:54:15 +0000"  >&lt;p&gt;With this patch I think you could setup a nice similar model where you can introduce new children of this parent class and have it added to the discriminator map from the child instead of having to modify the parents mapping information.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-447&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-447&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                <outwardlinks description="duplicates">
                            <issuelink>
            <issuekey id="10399">DDC-138</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2239] Allow dynamic modification of select queries (either filter the AST or query)</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2239</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I had built and used the following for doctrine 1: &lt;a href=&quot;http://web.archive.org/web/20110705035547/http://www.doctrine-project.org/projects/orm/1.2/docs/cookbook/record-based-retrieval-security-template/en#record-based-retrieval-security-template&quot; class=&quot;external-link&quot;&gt;http://web.archive.org/web/20110705035547/http://www.doctrine-project.org/projects/orm/1.2/docs/cookbook/record-based-retrieval-security-template/en#record-based-retrieval-security-template&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&apos;d like to build something similar for D2 based projects.&lt;/p&gt;

&lt;p&gt;ocramius in IRC suggested a bug report/Improvement request. Figured that perhaps a custom event &quot;dql_parse&quot; or &quot;ast_render&quot; passing the AST or Query as a parameter.&lt;/p&gt;

&lt;p&gt;I&apos;m under a tight timeline and am willing to pay for aid/feature implementation.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14379">DDC-2239</key>
            <summary>Allow dynamic modification of select queries (either filter the AST or query)</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="gnat">Nathanael Noblet</reporter>
                        <labels>
                    </labels>
                <created>Fri, 11 Jan 2013 22:03:46 +0000</created>
                <updated>Fri, 11 Jan 2013 22:03:46 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1285] Select by multiple ids</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1285</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;How do you look at adding findByIds(array $ids) to EntityManager and UnitOfWork? This would allow fetching multiple entities from a database at one request and would be very useful for caching - there would be even some kind of IdentityMap kept in memcached or any other caching engine, that supports multiple id retrieval: i&apos;ve been using such an architecture in multiple projects and it turned out to be very effective. There were two basic methods - findIdsByFilter(array $filter) and findEntitiesByIds(array $ids). The latter one had a caching proxy, replicating entities to a cache storage. If this idea proceeds - I&apos;d be glad to cover it with more details.&lt;/p&gt;

&lt;p&gt;This topic on StackOverflow could also help:&lt;br/&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/276709/design-pattern-for-memcached-data-caching&quot; class=&quot;external-link&quot;&gt;http://stackoverflow.com/questions/276709/design-pattern-for-memcached-data-caching&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="12842">DDC-1285</key>
            <summary>Select by multiple ids</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://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="serge.smertin">Serge Smertin</reporter>
                        <labels>
                    </labels>
                <created>Fri, 22 Jul 2011 12:30:34 +0000</created>
                <updated>Fri, 11 Jan 2013 01:13:32 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>Mapping Drivers</component>
                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17071" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:21:15 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2227] Add details about developer being responsible of inverse side of an association</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2227</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;As far as I know, docs don&apos;t explain that it is up to the developer to keep the object graph consistent instead of relying on Doctrine ORM for everything.&lt;/p&gt;

&lt;p&gt;For example, for many to many, examples like following may be used:&lt;br/&gt;
&lt;a href=&quot;https://gist.github.com/3121916&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/3121916&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14364">DDC-2227</key>
            <summary>Add details about developer being responsible of inverse side of an association</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="ocramius">Marco Pivetta</reporter>
                        <labels>
                    </labels>
                <created>Wed, 9 Jan 2013 09:44:22 +0000</created>
                <updated>Wed, 9 Jan 2013 09:44:22 +0000</updated>
                                                                    <component>Documentation</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1986] findBy hydration with limit and offset with Oracle database (oci8 driver)</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1986</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I tried to use the findBy method with limit and offset parameters against an Oracle database using oci8 driver.&lt;/p&gt;

&lt;p&gt;The query seems to executed successfully but the hydrator fails when hydrating data as there is a DOCTRINE_ROWNUM column appending the &quot;limit&quot; clause.&lt;/p&gt;

&lt;p&gt;Here is the exception thrown :  &quot;Notice: Undefined index: DOCTRINE_ROWNUM in &lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt;/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php line 183&quot;&lt;/p&gt;

&lt;p&gt;I was thinking about something like this to fix this issue &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/help_16.gif&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;add an attribute (platformExtraColumns) to the platform class, storing every column added by methods like doModifyLimitQuery&lt;/li&gt;
	&lt;li&gt;check in hydrator method hydrateRowData if the column exists among the extra columns attribute of the custom platform&lt;/li&gt;
	&lt;li&gt;don&apos;t use the column if true&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Maybe there is a better approach, what are your thoughts?&lt;/p&gt;</description>
                <environment>composer.json require :&lt;br/&gt;
&lt;br/&gt;
&amp;quot;php&amp;quot;: &amp;quot;&amp;gt;=5.3.3&amp;quot;,&lt;br/&gt;
&amp;quot;symfony/symfony&amp;quot;: &amp;quot;2.1.*&amp;quot;,&lt;br/&gt;
&amp;quot;doctrine/orm&amp;quot;: &amp;quot;&amp;gt;=2.2.3,&amp;lt;2.4-dev&amp;quot;,&lt;br/&gt;
&amp;quot;doctrine/doctrine-bundle&amp;quot;: &amp;quot;dev-master&amp;quot;,&lt;br/&gt;
&amp;quot;twig/extensions&amp;quot;: &amp;quot;dev-master&amp;quot;,&lt;br/&gt;
&amp;quot;symfony/assetic-bundle&amp;quot;: &amp;quot;dev-master&amp;quot;,&lt;br/&gt;
&amp;quot;symfony/swiftmailer-bundle&amp;quot;: &amp;quot;dev-master&amp;quot;,&lt;br/&gt;
&amp;quot;symfony/monolog-bundle&amp;quot;: &amp;quot;dev-master&amp;quot;,&lt;br/&gt;
&amp;quot;sensio/distribution-bundle&amp;quot;: &amp;quot;dev-master&amp;quot;,&lt;br/&gt;
&amp;quot;sensio/framework-extra-bundle&amp;quot;: &amp;quot;dev-master&amp;quot;,&lt;br/&gt;
&amp;quot;sensio/generator-bundle&amp;quot;: &amp;quot;dev-master&amp;quot;,&lt;br/&gt;
&amp;quot;jms/security-extra-bundle&amp;quot;: &amp;quot;1.2.*&amp;quot;,&lt;br/&gt;
&amp;quot;jms/di-extra-bundle&amp;quot;: &amp;quot;1.1.*&amp;quot;,&lt;br/&gt;
&amp;quot;twitter/bootstrap&amp;quot;: &amp;quot;master&amp;quot;,&lt;br/&gt;
&amp;quot;friendsofsymfony/rest-bundle&amp;quot;: &amp;quot;dev-master&amp;quot;,&lt;br/&gt;
&amp;quot;doctrine/doctrine-fixtures-bundle&amp;quot;: &amp;quot;dev-master&amp;quot;</environment>
            <key id="13970">DDC-1986</key>
            <summary>findBy hydration with limit and offset with Oracle database (oci8 driver)</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="10000" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="benja-m-1">Benjamin Grandfond</reporter>
                        <labels>
                        <label>oracle</label>
                    </labels>
                <created>Fri, 17 Aug 2012 09:57:38 +0000</created>
                <updated>Tue, 8 Jan 2013 09:33:00 +0000</updated>
                                    <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="18524" author="benja-m-1" created="Fri, 17 Aug 2012 10:36:35 +0000"  >&lt;p&gt;I implemented it in my forks :&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/benja-M-1/doctrine2/commit/c8d899b14446accf869ddc0043f4235284375755&quot; class=&quot;external-link&quot;&gt;https://github.com/benja-M-1/doctrine2/commit/c8d899b14446accf869ddc0043f4235284375755&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/benja-M-1/dbal/commit/b9423c8d46a2bcdaa5a1f0b26a9a28259b1e44a2&quot; class=&quot;external-link&quot;&gt;https://github.com/benja-M-1/dbal/commit/b9423c8d46a2bcdaa5a1f0b26a9a28259b1e44a2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It works for me, but I didn&apos;t write unit tests.&lt;/p&gt;</comment>
                    <comment id="18537" author="benja-m-1" created="Fri, 24 Aug 2012 13:12:43 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;Did you have time to have a look at this issue?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                    <comment id="18538" author="stof" created="Fri, 24 Aug 2012 13:33:52 +0000"  >&lt;p&gt;Please send a pull request when you submit a fix. It is the proper way to submit them for review. When we want to see things waiting for review, we look at the list of pending PRs, not at all comments of the issue tracker to find links in them.&lt;/p&gt;

&lt;p&gt;And I can tell you that this change has a big issue: it introduces a state in the database platform whereas it is currently stateless. This is likely to cause some issues when using more than 1 query (which is a common use case).&lt;/p&gt;</comment>
                    <comment id="18555" author="benja-m-1" created="Wed, 29 Aug 2012 07:38:06 +0000"  >&lt;p&gt;Hi Christophe thank you for your feedback.&lt;/p&gt;

&lt;p&gt;I didn&apos;t send a PR because I wanted someone sharing his thoughts about what I suggested in this current issue. However I don&apos;t really understand the stateless argument, can you explain a bit more?&lt;/p&gt;

&lt;p&gt;Otherwise how would do you proceed to tell Doctrine not to hydrate platform-specific columns?&lt;/p&gt;
</comment>
                    <comment id="18556" author="stof" created="Wed, 29 Aug 2012 08:17:48 +0000"  >&lt;p&gt;If you run several queries, they will be affected by the extra columns of previous requests, which is wrong&lt;/p&gt;</comment>
                    <comment id="18557" author="beberlei" created="Wed, 29 Aug 2012 08:22:43 +0000"  >&lt;p&gt;I think the ObjectHydrator catches this by skipping undefined columns, i think we might just have overoptimized the SimpleObjectHydrator a little bit.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2219] computeChangeSets array_merging for associationMappings problem ?</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2219</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Is this normal that when i call &quot;$changeset = $unitOfWork-&amp;gt;getEntityChangeSet($myObject);&quot;, it only return changes of root Object, all changes in sub collection (OneToMany) are less (not merging in the changeset) ?&lt;/p&gt;

&lt;p&gt;Is there an issue for that?&lt;/p&gt;</description>
                <environment></environment>
            <key id="14343">DDC-2219</key>
            <summary>computeChangeSets array_merging for associationMappings problem ?</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="yohann.poli">yohann.poli</reporter>
                        <labels>
                        <label>unitofwork</label>
                    </labels>
                <created>Wed, 2 Jan 2013 15:42:17 +0000</created>
                <updated>Mon, 7 Jan 2013 08:52:53 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="19207" author="ocramius" created="Wed, 2 Jan 2013 15:44:23 +0000"  >&lt;p&gt;Changesets of collections are computed separately from those of entities.&lt;/p&gt;</comment>
                    <comment id="19208" author="yohann.poli" created="Wed, 2 Jan 2013 16:34:33 +0000"  >&lt;p&gt;Have to call the compute method for each collection of the entity ?&lt;/p&gt;</comment>
                    <comment id="19221" author="beberlei" created="Sun, 6 Jan 2013 09:05:34 +0000"  >&lt;p&gt;Yes you have to, but this kind of operation seems weird. What are you trying to achieve.&lt;/p&gt;</comment>
                    <comment id="19243" author="yohann.poli" created="Mon, 7 Jan 2013 08:52:53 +0000"  >&lt;p&gt;I manage a complex entity who have a collection entity (each entity in this collection have another collection entity) attributes and i need to now if the flush method has &quot;really&quot; execute an update.&lt;/p&gt;

&lt;p&gt;For example if the level 3 entity is update, i have to know in the root entity all changes apply in child...&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2093] Doctrine Criteria does not support sorting by relationed field</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2093</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&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;
// Here I call Criteria filter
public function getWalletsActive() {
	$criteria = Criteria::create()
		-&amp;gt;where(Criteria::expr()-&amp;gt;eq(&quot;isRemoved&quot;, &quot;0&quot;))
		-&amp;gt;orderBy(array(&quot;currency.id&quot; =&amp;gt; &quot;ASC&quot;));
	return $this-&amp;gt;wallets-&amp;gt;matching($criteria);
}

// Relation
/**
 * @var Currency
 *
 * @ORM\ManyToOne(targetEntity=&quot;Currency&quot;)
 * @ORM\JoinColumns({
 * @ORM\JoinColumn(name=&quot;id_currency&quot;, referencedColumnName=&quot;id&quot;)
 * })
 */
protected $currency;

// File BasicEntityPersister.php
// This cause the problem:
if ( ! isset($this-&amp;gt;_class-&amp;gt;fieldMappings[$fieldName])) {
    throw ORMException::unrecognizedField($fieldName);
}
// There are no relations in $this-&amp;gt;_class-&amp;gt;fieldMappings at all!
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14150">DDC-2093</key>
            <summary>Doctrine Criteria does not support sorting by relationed field</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="nick4fake">Bogdan Yurov</reporter>
                        <labels>
                    </labels>
                <created>Sat, 20 Oct 2012 09:10:02 +0000</created>
                <updated>Sun, 6 Jan 2013 18:29:28 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19237" author="beberlei" created="Sun, 6 Jan 2013 18:29:28 +0000"  >&lt;p&gt;Mark as improvement.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1698] Inconsistent proxy file name &amp; namespace result in __PHP_Incomplete_Class when unserializing entities</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1698</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.&lt;br/&gt;
For example, a class named &lt;b&gt;Application\Model\User&lt;/b&gt; creates the following proxy class:&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;Application\Proxy\__CG__\Application\Model\User
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This class is located in the following file:&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;Application/Proxy/__CG__ApplicationModelUser.php
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But whe we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:&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;Application/Proxy/__CG__/Application/Model/User.php
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But it is not.&lt;br/&gt;
As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.&lt;/p&gt;

&lt;p&gt;I&apos;m not sure whether this is an intended behavior, but I would assume this is a bug.&lt;/p&gt;</description>
                <environment>Irrelevant</environment>
            <key id="13521">DDC-1698</key>
            <summary>Inconsistent proxy file name &amp; namespace result in __PHP_Incomplete_Class when unserializing entities</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="4" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="benjamin">Benjamin Morel</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Mar 2012 00:11:42 +0000</created>
                <updated>Sun, 6 Jan 2013 13:18:41 +0000</updated>
                                    <version>2.2</version>
                <version>2.2.1</version>
                                <fixVersion>2.2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="17561" author="benjamin" created="Tue, 13 Mar 2012 16:46:38 +0000"  >&lt;p&gt;It looks like there is an even broader problem with the new _&lt;em&gt;CG&lt;/em&gt;_ prefix; the PSR-0 standard for autoloading states that the underscores should be handled this way:&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;\namespace\package\Class_Name =&amp;gt; {...}/namespace/package/Class/Name.php
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Which means that in the above example, it could even expect the file to be located in:&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;Application/Proxy///CG///Application/Model/User.php
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;... which is far away from the actual location.&lt;br/&gt;
Upgrade to 2.2 broke this code, for us.&lt;/p&gt;</comment>
                    <comment id="17565" author="beberlei" created="Wed, 14 Mar 2012 18:30:24 +0000"  >&lt;p&gt;Proxy classes do not follow PSR-0. For the case unserializing objects we should provide an extra autoloader i guess.&lt;/p&gt;

&lt;p&gt;See here how symfony does it &lt;a href=&quot;https://github.com/doctrine/DoctrineBundle/blob/master/DoctrineBundle.php#L57&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/DoctrineBundle/blob/master/DoctrineBundle.php#L57&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17566" author="beberlei" created="Wed, 14 Mar 2012 19:12:07 +0000"  >&lt;p&gt;See &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/9b4d60897dfc7e9b165712428539e694ec596c80&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/9b4d60897dfc7e9b165712428539e694ec596c80&lt;/a&gt; and &lt;a href=&quot;https://github.com/doctrine/orm-documentation/commit/01381fae1ff3d4944086c7cfe46721925bf6ca15&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/orm-documentation/commit/01381fae1ff3d4944086c7cfe46721925bf6ca15&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17589" author="benjamin" created="Wed, 14 Mar 2012 22:36:59 +0000"  >&lt;p&gt;Thanks for the quick fix, Benjamin.&lt;br/&gt;
However, I have to admit that I&apos;m not fully happy with the fix, as we (and probably many others) are not using the Doctrine autoloader.&lt;br/&gt;
I supposed that the purpose of PSR-0 was precisely not to be tied to a particular autoloader implementation, and this benefit is lost with this version of Doctrine.&lt;/p&gt;

&lt;p&gt;You mentioned in the doc that the proxies are not PSR-0 compliant &quot;for implementation reasons&quot;; as this was working fine before 2.2, could you please explain what requirement prevents Doctrine from keeping the previous naming convention?&lt;/p&gt;</comment>
                    <comment id="17671" author="beberlei" created="Thu, 29 Mar 2012 09:56:11 +0000"  >&lt;p&gt;In 2.1 the proxies are not PSR-0 compatible themselves, however their class naming is simpler.&lt;/p&gt;

&lt;p&gt;In 2.2 we changed proxy names so that you can derive the original name of the proxy by searching for the _&lt;em&gt;CG&lt;/em&gt;_ flag. This flag obviously contains the __ chars that some PSR autoloaders detect as directory seperators. I agree this is an unfortunate decision, but it was done this way.&lt;/p&gt;

&lt;p&gt;I do think however that we can automatically register the proxy atuoloader (if not yet done)  in EntityManager#create(). This would hide this fact from developers automatically.&lt;/p&gt;</comment>
                    <comment id="18898" author="benjamin" created="Mon, 29 Oct 2012 21:37:00 +0000"  >&lt;p&gt;@Benjamin Eberlei&lt;br/&gt;
In 2.3 we still have to manually call Autoloader::register() before unserializing entities that may contain proxies.&lt;br/&gt;
So EntityManager::create() still doesn&apos;t register it. Is there a plan to add this feature?&lt;/p&gt;</comment>
                    <comment id="19231" author="beberlei" created="Sun, 6 Jan 2013 10:10:22 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=benjamin&quot; class=&quot;user-hover&quot; rel=&quot;benjamin&quot;&gt;Benjamin Morel&lt;/a&gt; Not at the moment, seems too dangerous for me since it might produce race conditions. This should really be done in the bootstrap of the system.&lt;/p&gt;

&lt;p&gt;We need to document this though.&lt;/p&gt;</comment>
                    <comment id="19234" author="benjamin" created="Sun, 6 Jan 2013 13:18:41 +0000"  >&lt;p&gt;Ok, thanks for your answer!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2184] [GH-530] Singular form of generated methods should end with &apos;y&apos; when property ends with &apos;ies&apos;</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2184</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In Doctrine 2.3 the &apos;add&apos; and &apos;remove&apos; methods in oneToMany associations have another problem (in earlier versions like 2.2 this worked correct). The singular form is not correctly detected if the property ends with &apos;ies&apos; like &apos;entries&apos; which should be transformed to &apos;entry&apos;.&lt;br/&gt;
I have this YAML definition:&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;
Archive:
  type: entity
  fields:
    id:
      id: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      type: integer
      unsigned: &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
      nullable: &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
      generator:
        strategy: IDENTITY
  oneToMany:
    entries:
      targetEntity: Entry
      mappedBy: archive
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This generates these methods:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addEntrie(\Entry $entries) { ... }
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function removeEntrie(\Entry $entries) { ... }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Because in the EntityGenerator only the plural &apos;s&apos; is removed. It would be nice if an ending of &apos;ies&apos; could be replaced by &apos;y&apos;. So that we get these methods&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addEntry(\Entry $entries) { ... }
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function removeEntry(\Entry $entries) { ... }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;My fork already has the changes &lt;a href=&quot;https://github.com/naitsirch/doctrine-orm2/commit/a3adfccb4927d61da7debae46ed0fff61e4212f8&quot; class=&quot;external-link&quot;&gt;https://github.com/naitsirch/doctrine-orm2/commit/a3adfccb4927d61da7debae46ed0fff61e4212f8&lt;/a&gt;&lt;br/&gt;
I have opened a pull request here &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/530&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/530&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14290">DDC-2184</key>
            <summary>[GH-530] Singular form of generated methods should end with &apos;y&apos; when property ends with &apos;ies&apos;</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 4 Dec 2012 09:14:25 +0000</created>
                <updated>Sun, 6 Jan 2013 10:02:11 +0000</updated>
                                    <version>2.3</version>
                                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19104" author="naitsirch" created="Tue, 4 Dec 2012 09:25:11 +0000"  >&lt;p&gt;Sorry, I accidently clicked on the button &apos;Request Feedback&apos; &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;br/&gt;
Now the status has changed to &apos;Awaiting Feedback&apos;&lt;/p&gt;</comment>
                    <comment id="19226" author="beberlei" created="Sun, 6 Jan 2013 09:45:52 +0000"  >&lt;p&gt;Mark as improvement&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                <outwardlinks description="duplicates">
                            <issuelink>
            <issuekey id="14236">DDC-2150</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="14256">DDC-2160</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2128] [GH-507] Now MetaDataFilter takess also regexp. For example whern you want to</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2128</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of catalinux:&lt;/p&gt;

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

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

&lt;p&gt;extract metadata if you would filter like this: --filter=&quot;Article&quot;&lt;br/&gt;
would extract also for &quot;ArticleItems&quot; (article_items table). Now you&lt;br/&gt;
can use --filter=&quot;Article$&quot; if you want only that table (articl)&lt;/p&gt;</description>
                <environment></environment>
            <key id="14199">DDC-2128</key>
            <summary>[GH-507] Now MetaDataFilter takess also regexp. For example whern you want to</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 6 Nov 2012 12:46:51 +0000</created>
                <updated>Sun, 6 Jan 2013 10:00:41 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1390]  Lazy loading does not work for the relationships of an entity instance, whose class inherits from another entity class</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1390</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Lazy loading does not work for the relationships of an instance of an entity, whose class inherits from another entity class.&lt;/p&gt;

&lt;p&gt;Assume there are two entity classes, A and B, where A inherits from B.&lt;/p&gt;

&lt;p&gt;Now let $a be an instance of A, e. g. the result of &quot;SELECT a FROM \A WHERE a.id = 1&quot;.&lt;/p&gt;

&lt;p&gt;Outputting $a will confirm it is a valid instance of a proxy object inheriting from A.&lt;/p&gt;

&lt;p&gt;Assume that the database row corresponding to $a contains a non-null foreign key that actually links to an existing row in another table, corresponding to another entity instance of a different class.&lt;/p&gt;

&lt;p&gt;Now, $a-&amp;gt;someRelationship will always returns null in this scenario. I assume this is unintended behaviour, because clearly, the other entity should be lazily loaded on accessing it, and there is a value in the database.&lt;/p&gt;

&lt;p&gt;The fetch annotation attribute on that relationship has not been explicitly set, so I assume it is set to the default value, which, according to the docs, should be &quot;lazy&quot;.&lt;/p&gt;

&lt;p&gt;The loading only fails when accessing the relationships of an entity instance, whose class inherits from another entity class. For entity instances, whose classes do not inherit from another entity class, lazy loading of their relationships works as expected.&lt;/p&gt;

&lt;p&gt;I had a look at the proxy objects and verified that they are present and override the __get method with an implementation containing a call to the load() method. Still, the loading won&apos;t work for some reason.&lt;/p&gt;

&lt;p&gt;This could be related to Bug &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1389&quot; title=&quot;Querying subclass entities using DQL results in broken SQL being generated&quot;&gt;&lt;del&gt;DDC-1389&lt;/del&gt;&lt;/a&gt; (&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1389&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1389&lt;/a&gt;) which also happens exclusively in an inheritance scenario. Maybe the current implementation of inheritance is generally wrong or incomplete.&lt;/p&gt;</description>
                <environment>Debian Linux 6.0, MySQL 5.0.51a</environment>
            <key id="13036">DDC-1390</key>
            <summary> Lazy loading does not work for the relationships of an entity instance, whose class inherits from another entity class</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://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="dalvarez">Daniel Alvarez Arribas</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Sep 2011 17:22:51 +0000</created>
                <updated>Sun, 6 Jan 2013 08:59:31 +0000</updated>
                                    <version>2.1.1</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="16760" author="beberlei" created="Mon, 31 Oct 2011 22:31:10 +0000"  >&lt;p&gt;Did this get fixed with the correction of your data?&lt;/p&gt;</comment>
                    <comment id="16762" author="dalvarez" created="Tue, 1 Nov 2011 06:22:55 +0000"  >&lt;p&gt;No it did not. This issue is completely unrelated to the other one.&lt;/p&gt;

&lt;p&gt;For this, I have manually implemented workarounds, fetching the associations using DQL queries. Lazy loading in the inheritance scenario above still would not work.&lt;/p&gt;</comment>
                    <comment id="16763" author="beberlei" created="Tue, 1 Nov 2011 11:22:56 +0000"  >&lt;p&gt;So A is an entity in a hierachy A -&amp;gt; B, and &quot;someRelationship&quot; is a field on A or on B &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/help_16.gif&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; towards an Entity C that is in an inheritance hierachy or not? &lt;/p&gt;

&lt;p&gt;Could you post parts of the mappings (entity docblock and the relationship)?&lt;/p&gt;</comment>
                    <comment id="16772" author="dalvarez" created="Sun, 6 Nov 2011 17:05:25 +0000"  >&lt;p&gt;Hey, thanks for taking care of this.&lt;/p&gt;

&lt;p&gt;I attached the entities involved in the szenario to this issue.&lt;/p&gt;

&lt;p&gt;I had problems lazy loading entities through the following associations:&lt;/p&gt;

&lt;p&gt;  Run.invoiceCreatorResult&lt;br/&gt;
  Run.commissionNoteCreatorResult&lt;br/&gt;
  Run.consumerInvoiceExporterResult&lt;/p&gt;

&lt;p&gt;as well as&lt;/p&gt;

&lt;p&gt;  InvoiceCreatorResult.dataVersion&lt;br/&gt;
  CommissionNoteCreatorResult.dataVersion&lt;br/&gt;
  ConsumerInvoiceExporterResult.dataVersion&lt;/p&gt;


&lt;p&gt;In this scenario, InvoiceCreatorResult, CommissionNoteCreatorResult and ConsumerInvoiceExporterResult all inherit from Result, which in turn inherits from a mapped superclass DataObject. Run and DataVersion inherit from DataObject directly.&lt;/p&gt;

&lt;p&gt;The associations where lazy loading does not work are associations both to and from the entity classes InvoiceCreatorResult, CommissionNoteCreatorResult and ConsumerInvoiceExporterResult.&lt;/p&gt;</comment>
                    <comment id="16859" author="beberlei" created="Fri, 18 Nov 2011 13:52:28 +0000"  >&lt;blockquote&gt;
&lt;p&gt;Now let $a be an instance of A, e. g. the result of &quot;SELECT a FROM \A WHERE a.id = 1&quot;.&lt;/p&gt;

&lt;p&gt;Outputting $a will confirm it is a valid instance of a proxy object inheriting from A.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Just a short Q on understanding: Why is $a a proxy of A if you select it explicitly?&lt;/p&gt;</comment>
                    <comment id="16861" author="beberlei" created="Fri, 18 Nov 2011 14:21:35 +0000"  >&lt;p&gt;This a working test-case with a model that i believe resembles yours exactly.&lt;/p&gt;

&lt;p&gt;I also put your models into another test and ran schema validation on them, which works out without problems.&lt;/p&gt;

&lt;p&gt;From the workflow with proxies, maybe &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1452&quot; title=&quot;ObjectHydrator bug: hydration of entity with self (cyclic) relation through ref entity&quot;&gt;&lt;del&gt;DDC-1452&lt;/del&gt;&lt;/a&gt; might be related to your issue?&lt;/p&gt;</comment>
                    <comment id="16871" author="dalvarez" created="Fri, 18 Nov 2011 17:47:53 +0000"  >&lt;p&gt;Regarding the proxy question, I just ment the query to be an example to further illustrate the type of $a. It was redundant and unnecessary though and probably misleading. Sorry for that. I did not select anything in the actual scenario. $a is merely some object of type A. No queries are involved.&lt;/p&gt;</comment>
                    <comment id="16873" author="dalvarez" created="Fri, 18 Nov 2011 18:16:24 +0000"  >&lt;p&gt;Have you been able to make the tests fail with the original data provided?&lt;/p&gt;

&lt;p&gt;If not, I could set up a test case and post it.&lt;/p&gt;</comment>
                    <comment id="16874" author="beberlei" created="Fri, 18 Nov 2011 18:38:02 +0000"  >&lt;p&gt;No i only checked the validity of mappings with the original data. If you could setup a testcase that would be really great.&lt;/p&gt;</comment>
                    <comment id="16890" author="dalvarez" created="Sat, 19 Nov 2011 16:05:52 +0000"  >&lt;p&gt;I will set up a test case and upload it. I&apos;ll see if I can do it one of the next evenings.&lt;/p&gt;</comment>
                    <comment id="17011" author="beberlei" created="Sat, 17 Dec 2011 13:26:19 +0000"  >&lt;p&gt;I tried again, also extended &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1390&quot; title=&quot; Lazy loading does not work for the relationships of an entity instance, whose class inherits from another entity class&quot;&gt;DDC-1390&lt;/a&gt;, but it was impossible for me to reproduce this. I ran this against master, 2.1.x and 2.1.1 specifically.&lt;/p&gt;</comment>
                    <comment id="19217" author="dalvarez" created="Sat, 5 Jan 2013 18:42:17 +0000"  >&lt;p&gt;Sorry, I got swamped with work. Now I am working on this dedicatedly, testing against the latest release. Will let you know once I have a testcase.&lt;/p&gt;</comment>
                    <comment id="19218" author="beberlei" created="Sun, 6 Jan 2013 08:59:31 +0000"  >&lt;p&gt;Good to hear, thanks for the persistent work on this.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11100" name="CommissionNoteCreatorResult.php" size="891" author="dalvarez" created="Sun, 6 Nov 2011 16:56:50 +0000" />
                    <attachment id="11101" name="ConsumerInvoiceExporterResult.php" size="353" author="dalvarez" created="Sun, 6 Nov 2011 16:56:50 +0000" />
                    <attachment id="11096" name="DataObject.php" size="1338" author="dalvarez" created="Sun, 6 Nov 2011 16:54:35 +0000" />
                    <attachment id="11102" name="DataVersion.php" size="1314" author="dalvarez" created="Sun, 6 Nov 2011 16:58:35 +0000" />
                    <attachment id="11112" name="DDC1390Test.php" size="2412" author="beberlei" created="Fri, 18 Nov 2011 14:21:35 +0000" />
                    <attachment id="11099" name="InvoiceCreatorResult.php" size="835" author="dalvarez" created="Sun, 6 Nov 2011 16:55:13 +0000" />
                    <attachment id="11098" name="Result.php" size="1669" author="dalvarez" created="Sun, 6 Nov 2011 16:54:35 +0000" />
                    <attachment id="11097" name="Run.php" size="1817" author="dalvarez" created="Sun, 6 Nov 2011 16:54:35 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2223] unable to use scalar function when a scalar expression is expected</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2223</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;the DQL Parser don&apos;t parse properly functions when a ScalarExpression is needed like of all case functions.&lt;/p&gt;

&lt;p&gt;In fact first function token is interpreted as a T_IDENTIFIER and enter on line 1663 of Doctrine\ORM\Query\Parser class. in search of math operator, when not found this case considere that the token is a row element with no consid&#233;ration of the functions procession treated after.&lt;/p&gt;

&lt;p&gt;fix of this bug consist to enclose the line 1672 by a if (!$this-&amp;gt;_isFunction()).&lt;/p&gt;</description>
                <environment>(not affected by this bug)</environment>
            <key id="14349">DDC-2223</key>
            <summary>unable to use scalar function when a scalar expression is expected</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="alexises">Alexis Lameire</reporter>
                        <labels>
                        <label>dql</label>
                    </labels>
                <created>Fri, 4 Jan 2013 13:21:34 +0000</created>
                <updated>Fri, 4 Jan 2013 13:21:34 +0000</updated>
                                    <version>Git Master</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2220] Add joins to Collection Filtering API</title>
                <link>http://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://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://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-2193] Named native query bug?</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2193</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;@NamedNativeQueries is a useful thing, but I have found some problems during my using.&lt;br/&gt;
1&#12289;Normal&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;
 /**
 * @NamedNativeQueries({
 *      @NamedNativeQuery(
 *          name            = &lt;span class=&quot;code-quote&quot;&gt;&quot;fetchMultipleJoinsEntityResults&quot;&lt;/span&gt;,
 *          resultSetMapping= &lt;span class=&quot;code-quote&quot;&gt;&quot;mappingMultipleJoinsEntityResults&quot;&lt;/span&gt;,
 *          query            = &lt;span class=&quot;code-quote&quot;&gt;&quot;SELECT * FROM test &quot;&lt;/span&gt;
 *      )
 * })
 */
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;2&#12289;Error&#65292;cannot connect to the server&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;
 /**
 * @NamedNativeQueries({
 *      @NamedNativeQuery(
 *          name            = &lt;span class=&quot;code-quote&quot;&gt;&quot;fetchMultipleJoinsEntityResults&quot;&lt;/span&gt;,
 *          resultSetMapping= &lt;span class=&quot;code-quote&quot;&gt;&quot;mappingMultipleJoinsEntityResults&quot;&lt;/span&gt;,
 *          query            = &quot;SELECT * 
            FROM test &quot;
 *      )
 * })
 */
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;3&#12289;Cannot use alias.The same problem as the second one.&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;
.......
 query            = &lt;span class=&quot;code-quote&quot;&gt;&quot;SELECT a as test FROM test &quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14303">DDC-2193</key>
            <summary>Named native query bug?</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="10000" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="dingdangjyz">dingdangjyz</reporter>
                        <labels>
                    </labels>
                <created>Tue, 11 Dec 2012 01:43:00 +0000</created>
                <updated>Mon, 31 Dec 2012 04:02:50 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="19125" author="fabio.bat.silva" created="Wed, 12 Dec 2012 13:56:30 +0000"  >&lt;p&gt;Hi&lt;/p&gt;

&lt;p&gt;Doctrine does not change the native query at all&lt;br/&gt;
The problem seems related with database connection.&lt;/p&gt;

&lt;p&gt;Could you provide more details please?&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;</comment>
                    <comment id="19127" author="dingdangjyz" created="Thu, 13 Dec 2012 01:12:44 +0000"  >&lt;p&gt;Doctrine\Common\Lexer.php&lt;/p&gt;

&lt;p&gt;Hello, after checking&#65292; I found the problem should be here. As long as SQL wrap, or fill in alias, it will be error. It seems to be the preg_split problem?&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;
        $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE;
        $matches = preg_split($regex, $input, -1, $flags);

        foreach ($matches as $match) {
            &lt;span class=&quot;code-comment&quot;&gt;// Must remain before &apos;value&apos; assignment since it can change content
&lt;/span&gt;            $type = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getType($match[0]);

            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;tokens[] = array(
                &apos;value&apos; =&amp;gt; $match[0],
                &apos;type&apos;  =&amp;gt; $type,
                &apos;position&apos; =&amp;gt; $match[1],
            );
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="19128" author="fabio.bat.silva" created="Thu, 13 Dec 2012 10:59:21 +0000"  >&lt;p&gt;Hi&lt;/p&gt;

&lt;p&gt;Could you try to add a failing test case please ?&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;</comment>
                    <comment id="19133" author="dingdangjyz" created="Fri, 14 Dec 2012 02:06:21 +0000"  >&lt;p&gt;xp php5.3.8 Apache&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;
&amp;lt;?php

namespace Models\Entities;

/**
 * @Entity
 * @Table
 *
 * @NamedNativeQueries({
 *      @NamedNativeQuery(
 *          name             = &lt;span class=&quot;code-quote&quot;&gt;&quot;find-hotel-item&quot;&lt;/span&gt;,
 *          resultSetMapping = &lt;span class=&quot;code-quote&quot;&gt;&quot;mapping-find-item&quot;&lt;/span&gt;,
 *          query            = &quot;SELECT Top 1 VEI_SN AS SN 
            FROM tourmanager.dbo.VEndorInfo vi 
INNER JOIN tourmanager.dbo.VEndorInfo2 vi2 ON 
vi.VEI_SN = vi2.VEI2_VEI_SN LEFT OUTER JOIN tourmanager.dbo.HotelInfo hi 
ON hi.hotelid = vi2.VEI2_VEI_SN INNER JOIN tourmanager.dbo.HotelInfo2 
hi2 ON hi2.hotelid = vi2.VEI2_VEI_SN AND hi2.LGC = 1 &quot;
 *      )
 * })
 *
 * @SqlResultSetMappings({
 *      @SqlResultSetMapping(
 *          name    = &lt;span class=&quot;code-quote&quot;&gt;&quot;mapping-find-item&quot;&lt;/span&gt;,
 *          entities= {
 *              @EntityResult(
 *                  entityClass = &lt;span class=&quot;code-quote&quot;&gt;&quot;HTHotelItem&quot;&lt;/span&gt;,
 *                  fields = {
 *                      @FieldResult(name = &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;,   column=&lt;span class=&quot;code-quote&quot;&gt;&quot;SN&quot;&lt;/span&gt;)
 *                  }
 *              )
 *          }
 *      )
 * })
 *
 */

class HTHotelItem{
    /** @Id @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;) @GeneratedValue */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;
        
    /** @name */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name;
    
    /** @city */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $city;
    
    /** @url */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $url;
    
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; function loadMetadata(\Doctrine\ORM\Mapping\ClassMetadataInfo $metadata){
        $metadata-&amp;gt;addNamedNativeQuery(array(
            &apos;name&apos;              =&amp;gt; &apos;find-hotel-item&apos;,
            &apos;query&apos;             =&amp;gt; &apos;SELECT h FROM HTHotelItem h&apos;,
            &apos;resultSetMapping&apos;  =&amp;gt; &apos;\\Models\\Entities\\HTHotelItem&apos;
        ));
    }
    
    function getId(){
        &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;id;
    }
    
    function getName(){
        &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;name;
    }
    
    function getCity(){
        &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;city;
    }
    
    function getUrl(){
        &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;url;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="19134" author="dingdangjyz" created="Fri, 14 Dec 2012 07:59:21 +0000"  >&lt;p&gt;@NamedNativeQueries query  &lt;/p&gt;

&lt;p&gt;If we write the long SQL, it will be fault. NO error massage.&lt;br/&gt;
1251 charecter must be wrong.&lt;br/&gt;
I still insist it is the problem of preg_split in &lt;br/&gt;
Doctrine\Common\Lexer.php&lt;/p&gt;</comment>
                    <comment id="19152" author="fabio.bat.silva" created="Sun, 16 Dec 2012 20:50:10 +0000"  >&lt;p&gt;Can&apos;t reproduce,&lt;/p&gt;

&lt;p&gt;Could you try to change the attached test case and make it fail.&lt;/p&gt;


&lt;p&gt;Cheers&lt;/p&gt;</comment>
                    <comment id="19178" author="beberlei" created="Mon, 24 Dec 2012 09:22:16 +0000"  >&lt;p&gt;The Doctrine\Common\Lexer is never used in combination with native queries, only with the Annotation Parser, so i cannot be the preg_split that causes your SQL to be broken. Or do you get annotation errors?&lt;/p&gt;

&lt;p&gt;Also what database are you using? maybe its related to the DBAL sql parsing?&lt;/p&gt;</comment>
                    <comment id="19195" author="dingdangjyz" created="Mon, 31 Dec 2012 04:02:50 +0000"  >&lt;p&gt;I&apos;m sorry my English is too bad. &lt;/p&gt;

&lt;p&gt;I think it&apos;s Doctrine \ is \ Lexer. PHP preg_split the function of the problem in this file.&lt;br/&gt;
My system environment is xp/apache 5.3 + / php_pdo_sqlsrv_53 / mssql2000&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11363" name="DDC2193Test.php" size="2501" author="fabio.bat.silva" created="Sun, 16 Dec 2012 20:48:10 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1621] Add support for FROM Class1 a1 JOIN Class2 a2 WITH cond queries</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1621</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Check feasibility of this kind of query different from FROM Class1 a1, Class2 a2 to allow arbitrary joins between classes.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13390">DDC-1621</key>
            <summary>Add support for FROM Class1 a1 JOIN Class2 a2 WITH cond queries</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/inprogress.png">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="asm89">Alexander</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 25 Jan 2012 21:17:27 +0000</created>
                <updated>Sun, 30 Dec 2012 20:16:47 +0000</updated>
                                                    <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19079" author="alex00888" created="Fri, 30 Nov 2012 10:14:47 +0000"  >&lt;p&gt;Hi all!&lt;br/&gt;
Maybe if this task is hard, you could do a simplier variant, &quot;FROM Class1 a1 JOIN a1,a2 WITH a2 INSTANCE OF Class2&quot;?&lt;br/&gt;
Doctrine 2.3 supports it, but in fact, it does not work. I can&apos;t use Class2 fields in query, and Doctrine ignores the INSTANCE OF operator when building a native queries.&lt;br/&gt;
I am working with system where I have many inherited classes with Class Table Inheritance. When I do a JOIN query, it generates native sql query more than 1KB(?!) length, and MySQL freezes for more than 7 minutes (?!) on it. It must join only tables for Class2, but it joins all my 20 tables inherited of my base class &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;br/&gt;
I don&apos;t know where to send bugreport &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;br/&gt;
It will be very good if I could manually select a joined class to make Doctrine do a better queries.&lt;br/&gt;
Sorry for my english, I am from Moscow.&lt;/p&gt;</comment>
                </comments>
                    <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://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://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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>

<item>
            <title>[DDC-2089] Modify OneToMany to allow unidirectional associations without the need of a JoinTable</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2089</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;As I sayd in the title, it would be nice if the ORM layer could permit to map a 1:n association in the db as an unidirectional OneToMany in the classes, without using a JoinTable in the database.&lt;br/&gt;
This would permit us to get rid of the unnecessary database JoinTable, which creates disorder and decreases performance for no valuable reason.&lt;/p&gt;

&lt;p&gt;Is it possible?&lt;/p&gt;</description>
                <environment>Debian Wheezy, Mysql 5.1, Apache2, PHP 5.4</environment>
            <key id="14145">DDC-2089</key>
            <summary>Modify OneToMany to allow unidirectional associations without the need of a JoinTable</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="noise085">Enea Bette</reporter>
                        <labels>
                        <label>onetomany</label>
                        <label>persister</label>
                        <label>unidirectional</label>
                    </labels>
                <created>Fri, 19 Oct 2012 10:11:55 +0000</created>
                <updated>Sun, 16 Dec 2012 17:42:11 +0000</updated>
                                    <version>2.x</version>
                                <fixVersion>2.4</fixVersion>
                <fixVersion>3.0</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19150" author="noise085" created="Sun, 16 Dec 2012 17:42:11 +0000"  >&lt;p&gt;A little up... for inspiration from JPA &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.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;&lt;a href=&quot;http://en.wikibooks.org/wiki/Java_Persistence/OneToMany#Undirectional_OneToMany.2C_No_Inverse_ManyToOne.2C_No_Join_Table_.28JPA_2.0_ONLY.29&quot; class=&quot;external-link&quot;&gt;http://en.wikibooks.org/wiki/Java_Persistence/OneToMany#Undirectional_OneToMany.2C_No_Inverse_ManyToOne.2C_No_Join_Table_.28JPA_2.0_ONLY.29&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2200] Duplicates returned while accessing associations from @PostPersist callback</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2200</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When creating a new Post and adding it to a collection in an &lt;b&gt;existing&lt;/b&gt; Thread (i.e. loaded from the database), referencing Thread&apos;s posts collection in Post&apos;s @PostPersist callback returns the Post twice. To clarify, this only happens when Thread was previously persisted. If I&apos;m creating a new Thread object the code works as expected. I&apos;ve included some sample code to better illustrate my issue.&lt;/p&gt;

&lt;p&gt;I don&apos;t know if this is a bug, or if I&apos;m doing something that I shouldn&apos;t be, but I couldn&apos;t find this limitation mentioned in the documentation, and this seems to go against the expected behavior.&lt;/p&gt;

&lt;p&gt;Here are my sample entities:&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;

/**
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;thread&quot;&lt;/span&gt;)
 */
class &lt;span class=&quot;code-object&quot;&gt;Thread&lt;/span&gt;
{
    /** 
     * @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;protected&lt;/span&gt; $id;

    /** 
     * @OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Post&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;thread&quot;&lt;/span&gt;, cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;persist&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;remove&quot;&lt;/span&gt;})
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $posts;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __construct() {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;posts = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ArrayCollection();
    }   

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getPosts() {
        &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;posts-&amp;gt;toArray();
    }   

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addPost(Post $post) {
        $post-&amp;gt;setThread($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;posts-&amp;gt;add($post);
    }   
}

/**
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;post&quot;&lt;/span&gt;)
 * @HasLifecycleCallbacks
 */
class Post
{
    /** 
     * @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;protected&lt;/span&gt; $id;

    /** 
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-object&quot;&gt;Thread&lt;/span&gt;&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;posts&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;thread_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $thread;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getId() {
        &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;id;
    }   

    /** 
     * @PostPersist
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function onPostPersist() {
        $posts = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;thread-&amp;gt;getPosts();
        foreach ($posts as $post) {
            echo &apos;id: &apos; . $post-&amp;gt;getId() . &apos; type: &apos; . get_class($alert) . &apos;&amp;lt;br /&amp;gt;&apos;;
        }   
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setThread(&lt;span class=&quot;code-object&quot;&gt;Thread&lt;/span&gt; $thread) {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;thread = $thread;
    }   
}

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And the calling code:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;

&lt;span class=&quot;code-comment&quot;&gt;// Grab an existing thread.
&lt;/span&gt;$thread = $em-&amp;gt;getReference(&apos;&lt;span class=&quot;code-object&quot;&gt;Thread&lt;/span&gt;&apos;, 1); 
$thread-&amp;gt;addPost(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Post());
$em-&amp;gt;flush();

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This outputs:&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;

id: 1 type: Post
id: 1 type: Post

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Alternatively:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;

&lt;span class=&quot;code-comment&quot;&gt;// Create a &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; thread.
&lt;/span&gt;$thread = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;Thread&lt;/span&gt;()
$thread-&amp;gt;addPost(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Post());
$em-&amp;gt;persist($thread);
$em-&amp;gt;flush();

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This outputs:&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;

id: 1 type: Post

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14313">DDC-2200</key>
            <summary>Duplicates returned while accessing associations from @PostPersist callback</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="breathe">Brent</reporter>
                        <labels>
                    </labels>
                <created>Sat, 15 Dec 2012 02:06:07 +0000</created>
                <updated>Sat, 15 Dec 2012 02:06:07 +0000</updated>
                                    <version>2.3.1</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1590] Fix Inheritance in Code-Generation</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1590</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="13345">DDC-1590</key>
            <summary>Fix Inheritance in Code-Generation</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 9 Jan 2012 14:07:08 +0000</created>
                <updated>Mon, 10 Dec 2012 11:00:40 +0000</updated>
                                                    <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>3</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="19118" author="lukxde" created="Mon, 10 Dec 2012 11:00:31 +0000"  >&lt;p&gt;(I have no Link Privileges, but this one #&lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1379&quot; title=&quot;Entity Generator Bug with extended classes&quot;&gt;&lt;del&gt;DDC-1379&lt;/del&gt;&lt;/a&gt; is a duplicate with more extent info.)&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10002">
                <name>Dependency</name>
                                                <inwardlinks description="is required for">
                            <issuelink>
            <issuekey id="13330">DDC-1579</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2183] Second Level Cache improvements</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2183</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hibernate has a second level cache feature that is much more advanced than Doctrines result cache.&lt;/p&gt;

&lt;p&gt;With NoSQL in-memory databases such as Riak or MongoDB we could need a much more powerful cache to make Doctrine faaaaaasst. This ticket tracks the design and implementation of that feature.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14289">DDC-2183</key>
            <summary>Second Level Cache improvements</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 3 Dec 2012 22:44:09 +0000</created>
                <updated>Mon, 3 Dec 2012 22:44:09 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>4</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2164] Extend the cache support to eAccelerator</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2164</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It would be nice if the Doctrine caching drivers would support the eAccelerator library.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14262">DDC-2164</key>
            <summary>Extend the cache support to eAccelerator</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="noise085">Enea Bette</reporter>
                        <labels>
                        <label>cache</label>
                        <label>drivers</label>
                    </labels>
                <created>Fri, 23 Nov 2012 08:29:26 +0000</created>
                <updated>Mon, 26 Nov 2012 08:54:28 +0000</updated>
                                    <version>2.4</version>
                <version>3.0</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19037" author="ocramius" created="Fri, 23 Nov 2012 08:38:55 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=noise085&quot; class=&quot;user-hover&quot; rel=&quot;noise085&quot;&gt;Enea Bette&lt;/a&gt; eAccelerator is known for being stripping comments from cached source (making it impossible to use annotations)... Do you happen to know if this is fixed? Supporting it as cache driver is fine btw, I just wonder how many users will start thinking of using eAccelerator and then will be facing this huge limitation.&lt;/p&gt;</comment>
                    <comment id="19063" author="noise085" created="Mon, 26 Nov 2012 08:52:19 +0000"  >&lt;p&gt;I know that eAccelerator has this issue. It would be nice if we could utilize it with XML, YML and PHP based mapping though.&lt;br/&gt;
Do you know if the same problem would appear with these kinds of mapping strategies?&lt;/p&gt;

&lt;p&gt;To give response to your question (eAccelerator and annotations incompatibility), there is a pull request on github, &lt;a href=&quot;https://github.com/eaccelerator/eaccelerator/issues/19&quot; class=&quot;external-link&quot;&gt;https://github.com/eaccelerator/eaccelerator/issues/19&lt;/a&gt; . &lt;/p&gt;

&lt;p&gt;It seems that in the future these could be resolved, and at that time it would be very nice to have that supported with doctrine (symfony2 already has support for this library).&lt;/p&gt;

&lt;p&gt;&quot;I just wonder how many users will start thinking of using eAccelerator and then will be facing this huge limitation&quot;. Sometimes users just does not have a choice. Imagine the case when you have a hosted site that requires caching functionalities and the only available cache library is eAccelerator (as just in my case). You would be fried as a chicken hehe &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.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;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2170] Decorator base classes for query related objects</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2170</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;tt&gt;Doctrine\ORM\Query&lt;/tt&gt; should not be directly extendable but it would be nice to decorate query objects and add additional methods. Use cases are e.g. doctrine-fun (see &lt;a href=&quot;https://github.com/lstrojny/doctrine-fun/blob/master/src/Doctrine/Fun/Query.php&quot; class=&quot;external-link&quot;&gt;https://github.com/lstrojny/doctrine-fun/blob/master/src/Doctrine/Fun/Query.php&lt;/a&gt;) or even cases where users want to add domain specific methods. As &lt;tt&gt;Doctrine\ORM\Query&lt;/tt&gt; is final it is not so easy to decorate correctly. I would propose:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Add a new interfaces: &lt;tt&gt;Doctrine\ORM\QueryInterface&lt;/tt&gt; that provides a contract for all methods &lt;tt&gt;Doctrine\ORM\Query&lt;/tt&gt; provides&lt;/li&gt;
	&lt;li&gt;Add a decorator base class &lt;tt&gt;Doctrine\ORM\QueryDecorator&lt;/tt&gt; as an extension point&lt;/li&gt;
	&lt;li&gt;Some for &lt;tt&gt;NativeQuery&lt;/tt&gt; and &lt;tt&gt;QueryBuilder&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
            <key id="14273">DDC-2170</key>
            <summary>Decorator base classes for query related objects</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="lstrojny">Lars Strojny</reporter>
                        <labels>
                    </labels>
                <created>Mon, 26 Nov 2012 01:30:18 +0000</created>
                <updated>Mon, 26 Nov 2012 01:31:19 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19062" author="lstrojny" created="Mon, 26 Nov 2012 01:31:19 +0000"  >&lt;p&gt;Related:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/524&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/524&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/doctrine/common/pull/229&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/pull/229&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2166] Improve Identifier hashing in IdentiyMap</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2166</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;There are currently some drawbacks with identifier hashing:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;They only work on one level for derived keys&lt;/li&gt;
	&lt;li&gt;The code is suspect to high performance requirements&lt;/li&gt;
	&lt;li&gt;Composite Keys might be suspect to weird bugs if they contain spaces.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;There is a PR by goetas (&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/232&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/232&lt;/a&gt;) that solves some issues, however adds a performance hit.&lt;/p&gt;

&lt;p&gt;We should move the conditional logic of this code out and use a strategy pattern to improve both performance and robustness of this code.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14268">DDC-2166</key>
            <summary>Improve Identifier hashing in IdentiyMap</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 25 Nov 2012 13:38:29 +0000</created>
                <updated>Sun, 25 Nov 2012 13:38:29 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1960] mapping joins in native queries breaks if select columns are starting with columns from joined table</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1960</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Using a simple Testcase like in &lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/native-sql.html&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/native-sql.html&lt;/a&gt; there are two Tables:&lt;/p&gt;

&lt;p&gt;*) users:&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;
   Column   |  Type   | Modifiers | Storage  | Description 
------------+---------+-----------+----------+-------------
 u_id       | integer | not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;  | plain    | 
 u_name     | text    | not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;  | extended | 
 address_id | integer | not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;  | plain    | 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;*) address:&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;
  Column  |  Type   | Modifiers | Storage  | Description 
----------+---------+-----------+----------+-------------
 a_id     | integer | not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;  | plain    | 
 a_street | text    | not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;  | extended | 
 a_city   | text    | not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;  | extended | 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;address_id is a foreign key to address;&lt;/p&gt;

&lt;p&gt;Now i created the Entities and setup a native query using ResultSetMappingBuilder:&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;
$rsm = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\ORM\Query\ResultSetMappingBuilder($entityManager);
$rsm-&amp;gt;addRootEntityFromClassMetadata(&apos;MyProject\Entity\Users&apos;, &apos;u&apos;);
$rsm-&amp;gt;addJoinedEntityFromClassMetadata(&apos;MyProject\Entity\Address&apos;, &apos;a&apos;, &apos;u&apos;, &apos;address&apos;);

$query = &apos;
    SELECT
        u.*,
        a.*
    FROM
        users u
    LEFT JOIN address a ON (u.address_id = a.a_id)
&apos;;

/** @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;native&lt;/span&gt; \Doctrine\ORM\NativeQuery */
$&lt;span class=&quot;code-keyword&quot;&gt;native&lt;/span&gt; = $entityManager-&amp;gt;createNativeQuery($query, $rsm);

$ret = $&lt;span class=&quot;code-keyword&quot;&gt;native&lt;/span&gt;-&amp;gt;getResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This returns the Entities correctly:&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;
array(2) {
  [0] =&amp;gt;
  class MyProject\Entity\Users#61 (3) {
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id =&amp;gt;
    &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name =&amp;gt;
    string(5) &lt;span class=&quot;code-quote&quot;&gt;&quot;Smith&quot;&lt;/span&gt;
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $address =&amp;gt;
    class MyProject\Entity\Address#63 (4) {
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id =&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $street =&amp;gt;
      string(8) &lt;span class=&quot;code-quote&quot;&gt;&quot;Broadway&quot;&lt;/span&gt;
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $city =&amp;gt;
      string(8) &lt;span class=&quot;code-quote&quot;&gt;&quot;New York&quot;&lt;/span&gt;
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $users =&amp;gt;
      class Doctrine\ORM\PersistentCollection#64 (9) {
        ...
      }
    }
  }
  [1] =&amp;gt;
  class MyProject\Entity\Users#66 (3) {
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id =&amp;gt;
    &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(2)
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name =&amp;gt;
    string(7) &lt;span class=&quot;code-quote&quot;&gt;&quot;Sherlok&quot;&lt;/span&gt;
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $address =&amp;gt;
    class MyProject\Entity\Address#67 (4) {
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id =&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(2)
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $street =&amp;gt;
      string(13) &lt;span class=&quot;code-quote&quot;&gt;&quot;Oxford Street&quot;&lt;/span&gt;
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $city =&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;London&quot;&lt;/span&gt;
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $users =&amp;gt;
      class Doctrine\ORM\PersistentCollection#68 (9) {
        ...
      }
    }
  }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;BUT if you change the order of the select columns starting with ones from address you get borked Data:&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;
$query = &apos;
    SELECT
        a.*,
        u.*
    FROM
        users u
    LEFT JOIN address a ON (u.address_id = a.a_id)
&apos;;
&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;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
array(2) {
  [0] =&amp;gt;
  class MyProject\Entity\Users#61 (3) {
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id =&amp;gt;
    &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name =&amp;gt;
    string(5) &lt;span class=&quot;code-quote&quot;&gt;&quot;Smith&quot;&lt;/span&gt;
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $address =&amp;gt;
    class MyProject\Entity\Address#63 (4) {
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id =&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(2)
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $street =&amp;gt;
      string(13) &lt;span class=&quot;code-quote&quot;&gt;&quot;Oxford Street&quot;&lt;/span&gt;
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $city =&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;London&quot;&lt;/span&gt;
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $users =&amp;gt;
      class Doctrine\ORM\PersistentCollection#64 (9) {
        ...
      }
    }
  }
  [1] =&amp;gt;
  class MyProject\Entity\Users#66 (3) {
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id =&amp;gt;
    &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(2)
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name =&amp;gt;
    string(7) &lt;span class=&quot;code-quote&quot;&gt;&quot;Sherlok&quot;&lt;/span&gt;
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $address =&amp;gt;
    NULL
  }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This happens because the function Doctrine\ORM\Internal\Hydration\AbstractHydrator::_gatherRowData does not consider the Mapping i set up. Instead it just add the columns as they get starting with address ones.&lt;/p&gt;

&lt;p&gt;Doctrine\ORM\Internal\Hydration\ObjectHydrator::_hydrateRow then knows the Mapping and ignores the first Address as there is no User to map on, cycling to the next row will then add the address of the second row to the user from the first one.&lt;/p&gt;

&lt;p&gt;There are multiple ways to fix this. One would be to consider the mapping in _gatherRowData, the second to rewrite the _hydrateRow generating the Entities first and then the mapping in a second foreach loop.&lt;/p&gt;

&lt;p&gt;This bugger had me for 2 days until i finally figured it out.&lt;/p&gt;

&lt;p&gt;thanks&lt;/p&gt;</description>
                <environment>ubuntu kernel 2.6.32-40-server&lt;br/&gt;
php 5.3.10-1ubuntu2ppa6~lucid with Suhosin-Patch (cli)&lt;br/&gt;
apache 2 2.2.14-5ubuntu8.9&lt;br/&gt;
postgres 9.1.4-1~lucid4</environment>
            <key id="13900">DDC-1960</key>
            <summary>mapping joins in native queries breaks if select columns are starting with columns from joined table</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="dready">Thomas Subera</reporter>
                        <labels>
                    </labels>
                <created>Tue, 31 Jul 2012 11:23:21 +0000</created>
                <updated>Wed, 21 Nov 2012 23:48:37 +0000</updated>
                                    <version>2.1.4</version>
                <version>2.1.7</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="19022" author="frederes" created="Wed, 21 Nov 2012 23:30:34 +0000"  >&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;Has same issue with using DQL /createQuery() ! Try all the day to find where was my mistake but seems to be a CRITICAL bug !&lt;br/&gt;
How did you solve this ?&lt;/p&gt;


&lt;p&gt;Doctrine version used : 2.3.1-DEV&lt;/p&gt;

&lt;p&gt;&amp;lt;code&amp;gt;&lt;br/&gt;
$query = $this-&amp;gt;getEntityManager()-&amp;gt;createQuery(&quot;&lt;br/&gt;
            SELECT cc, oc&lt;br/&gt;
            FROM  category cc&lt;br/&gt;
                JOIN cc.offer_category oc&lt;br/&gt;
            WHERE cc.catalog = :catalog_id&lt;br/&gt;
            ORDER BY oc.name ASC&lt;br/&gt;
            &quot;)&lt;br/&gt;
            -&amp;gt;setParameter(&quot;:catalog_id&quot;, $catalog_id)&lt;br/&gt;
            ;&lt;/p&gt;

&lt;p&gt;&amp;lt;/code&amp;gt;&lt;/p&gt;

&lt;p&gt;Problem is that the order of the Aliases (cc, oc) is not considered on building SQL .&lt;br/&gt;
In my case, in the ObjectHydrator::hydrateRowData method :&lt;/p&gt;

&lt;p&gt;$rowData = $this-&amp;gt;gatherRowData($row, $cache, $id, $nonemptyComponents);&lt;/p&gt;

&lt;p&gt;returns &lt;/p&gt;

&lt;p&gt;Array&lt;br/&gt;
(&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;oc&amp;#93;&lt;/span&gt; =&amp;gt; Array&lt;br/&gt;
          (&lt;br/&gt;
            &lt;span class=&quot;error&quot;&gt;&amp;#91;id&amp;#93;&lt;/span&gt; =&amp;gt; 14&lt;br/&gt;
            &lt;span class=&quot;error&quot;&gt;&amp;#91;name&amp;#93;&lt;/span&gt; =&amp;gt; toto&lt;br/&gt;
        )&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;cc&amp;#93;&lt;/span&gt; =&amp;gt; Array&lt;br/&gt;
        (&lt;br/&gt;
            &lt;span class=&quot;error&quot;&gt;&amp;#91;catalog_id&amp;#93;&lt;/span&gt; =&amp;gt; 1&lt;br/&gt;
            &lt;span class=&quot;error&quot;&gt;&amp;#91;offer_category_id&amp;#93;&lt;/span&gt; =&amp;gt; 14&lt;br/&gt;
        )&lt;br/&gt;
)&lt;/p&gt;

&lt;p&gt;As &quot;oc&quot; is a mapping, on the first loop the $parentAlias is not yet known and so :&lt;br/&gt;
&amp;lt;code&amp;gt;&lt;br/&gt;
if ($this-&amp;gt;_rsm-&amp;gt;isMixed &amp;amp;&amp;amp; isset($this-&amp;gt;_rootAliases&lt;span class=&quot;error&quot;&gt;&amp;#91;$parentAlias&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
                    echo &quot;parentObject 1\n&quot;;
                    $first = reset($this-&amp;gt;_resultPointers);
                    $parentObject = $first[key($first)];
                }
&lt;p&gt; else if (isset($this-&amp;gt;_resultPointers&lt;span class=&quot;error&quot;&gt;&amp;#91;$parentAlias&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
                    echo $parentAlias.&quot; parentObject 2\n&quot;;
                    $parentObject = $this-&amp;gt;_resultPointers[$parentAlias];
                }
&lt;p&gt; else &lt;/p&gt;
{
                    // HERE : on first loop, for &quot;oc&quot;, parent not yet known so skipped !!!
                    continue;
                }
&lt;p&gt;&amp;lt;/code&amp;gt;&lt;/p&gt;

&lt;p&gt;using a workaround on ObjectHydrator::hydrateRowData like this :&lt;br/&gt;
$rowData = array_reverse($rowData);&lt;/p&gt;

&lt;p&gt;make it work...&lt;/p&gt;

&lt;p&gt;Sorry for my dirty explanation... &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11215" name="testcase.zip" size="5941" author="dready" created="Tue, 31 Jul 2012 11:23:21 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2140] [GH-512] Added addParameters() to Query and QueryBuilder</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2140</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of jappie:&lt;/p&gt;

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

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

&lt;p&gt;This method behaves like &lt;tt&gt;setParameters()&lt;/tt&gt; before version 2.3:&lt;br/&gt;
It will add new parameters to the collection, and override any existing positions/names.&lt;/p&gt;

&lt;p&gt;It can take a &lt;tt&gt;Doctrine\Common\Collections\ArrayCollection&lt;/tt&gt; with &lt;tt&gt;Doctrine\ORM\Query\Parameter&lt;/tt&gt; objects, as well as a plain &lt;tt&gt;array&lt;/tt&gt; with key/value pairs, as argument.&lt;/p&gt;

&lt;p&gt;This will greatly ease the upgrade to Doctrine 2.3, because you only need to perform a project-wide replace of &lt;tt&gt;setParameters&lt;/tt&gt; with &lt;tt&gt;addParameters&lt;/tt&gt;, in stead of going into your code and determine if calls to &lt;tt&gt;setParameters&lt;/tt&gt; are ok or need refactoring.&lt;/p&gt;

&lt;p&gt;I&apos;ve also added unit-tests to maintain integrity.&lt;/p&gt;</description>
                <environment>OS X 10.8.2, PHP 5.3.18, Nginx 1.2.4 (php through FPM)</environment>
            <key id="14218">DDC-2140</key>
            <summary>[GH-512] Added addParameters() to Query and QueryBuilder</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                        <label>Query,</label>
                        <label>QueryBuilder</label>
                    </labels>
                <created>Tue, 13 Nov 2012 08:51:04 +0000</created>
                <updated>Tue, 20 Nov 2012 08:06:05 +0000</updated>
                                    <version>2.3</version>
                <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19008" author="beberlei" created="Tue, 20 Nov 2012 02:50:39 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-512&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/512&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/512&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19011" author="jasper@nerdsweide.nl" created="Tue, 20 Nov 2012 08:06:05 +0000"  >&lt;blockquote&gt;
&lt;p&gt;I don&apos;t feel strong need to have such an API.&lt;br/&gt;
If you want to keep track and merge collection of parameters, all you have to do is create an array (or an ArrayCollection), manipulate the instance and then setParameters at the end.&lt;br/&gt;
Unless you give me a stronger argument, this code won&apos;t be in. Closing for now.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Hi Guilherme,&lt;/p&gt;

&lt;p&gt;I agree that such a method makes less sense in &lt;tt&gt;Query&lt;/tt&gt;, because when you write a DQL string all parameters are known at once. But when using the &lt;tt&gt;QueryBuilder&lt;/tt&gt; you might need different parameters in different cases, so &lt;tt&gt;addParameters()&lt;/tt&gt; becomes useful there.&lt;/p&gt;

&lt;p&gt;I guess it&apos;s just a convenience method, like IMHO &lt;tt&gt;setParameter()&lt;/tt&gt; is. (You could just do &lt;tt&gt;$qb-&amp;gt;getParameters()-&amp;gt;add()&lt;/tt&gt;)&lt;/p&gt;

&lt;p&gt;The main reason for adding the method was, like I said, upgrading to Doctrine 2.3. I&apos;ve already upgraded all my projects to Doctrine 2.3, so the method is less useful for me now. But it took me a full day to refactor my repositories, because there is no safe way to automate the process. A simple search-and-replace &lt;tt&gt;setParameters()&lt;/tt&gt; to &lt;tt&gt;addParameters()&lt;/tt&gt; would have taken me 5 minutes &lt;img class=&quot;emoticon&quot; src=&quot;http://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;I&apos;m content with your decision.&lt;br/&gt;
If others find &lt;tt&gt;addParameters()&lt;/tt&gt; useful, I hope they let us know.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2154] Traits and Code Generation</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2154</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;See &lt;a href=&quot;https://github.com/doctrine/DoctrineBundle/issues/106#issuecomment-10479116&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/DoctrineBundle/issues/106#issuecomment-10479116&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14242">DDC-2154</key>
            <summary>Traits and Code Generation</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 18 Nov 2012 13:11:41 +0000</created>
                <updated>Sun, 18 Nov 2012 13:11:41 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1765] SchemaTool Commands should accept both --force and --dump-sql</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1765</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When running SchemaTool for schema operations you can get either a --dump-sql or make the changes using --force&lt;/p&gt;

&lt;p&gt;When you run with --force you get a generic &quot;1 query executed&quot; response, there should be a way to execute it receiving feedback of the queries and making the changes.&lt;/p&gt;

&lt;p&gt;This is good for example for my automated test env builder, as the return of this command would be logged. But i see no reason why the script can&apos;t take both options.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13606">DDC-1765</key>
            <summary>SchemaTool Commands should accept both --force and --dump-sql</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="5" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/trivial.png">Trivial</priority>
                    <status id="1" iconUrl="http://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="rdohms">Rafael Dohms</reporter>
                        <labels>
                    </labels>
                <created>Wed, 4 Apr 2012 15:16:27 +0000</created>
                <updated>Sat, 17 Nov 2012 15:21:38 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19004" author="nemek_zg" created="Sat, 17 Nov 2012 15:21:38 +0000"  >&lt;p&gt;Proposed fix: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/517&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/517&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2141] Query should not be final</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2141</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The Query class should not be marked final as this makes it impossible to Mock it.&lt;/p&gt;
</description>
                <environment>All</environment>
            <key id="14219">DDC-2141</key>
            <summary>Query should not be final</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="tarjei">Tarjei Huse</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Nov 2012 09:59:23 +0000</created>
                <updated>Tue, 13 Nov 2012 09:59:23 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2104] BasicEntityPersister::load() doesn&apos;t allow for cache usage</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2104</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;BasicEntityPersister::load() calls:&lt;br/&gt;
$stmt = $this-&amp;gt;_conn-&amp;gt;executeQuery($sql, $params, $types);&lt;br/&gt;
on line 665 of master/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php&lt;/p&gt;

&lt;p&gt;The executeQuery function has an optional fourth parameter to pass a QueryCacheProfile variable to use caching on the query.  This is ignored/not implemented by BasicEntityPersister::load()&lt;/p&gt;</description>
                <environment>This is a new feature,  not a bug</environment>
            <key id="14169">DDC-2104</key>
            <summary>BasicEntityPersister::load() doesn&apos;t allow for cache usage</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="dmcfaul">Dan McFaul</reporter>
                        <labels>
                    </labels>
                <created>Thu, 25 Oct 2012 19:43:26 +0000</created>
                <updated>Mon, 12 Nov 2012 14:51:07 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2134] Add referential integrity check for MySQL to console commands</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2134</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Today I spent some time solving a PHP &apos;White Screen of Death&apos;. I traced it back to a Entity of which the proxy&apos;s __load() function was invoked because af a EXTRA_LAZY association. Due to incorrect database contents (the entry ID was changed due to an update: referential integrity broke), the __load() query resulted in no results. The EntityNotFoundException did for some reason not show up in our logs, probably because the lazy load was triggered by a magic __toString() function.&lt;/p&gt;

&lt;p&gt;The cause is because of the way we populate or tables with domain data: &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;
SET FOREIGN_KEY_CHECKS = 0;
#IMPORT STUFF from CSV
SET FOREIGN_KEY_CHECKS = 1;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;MySQL does not trigger any errors when the foreign key checks are turned back on, leaving the table in an inconsistent state. &lt;/p&gt;

&lt;p&gt;To prevent this, I found some information in this post: &lt;a href=&quot;http://www.mysqlperformanceblog.com/2011/11/18/eventual-consistency-in-mysql/&quot; class=&quot;external-link&quot;&gt;http://www.mysqlperformanceblog.com/2011/11/18/eventual-consistency-in-mysql/&lt;/a&gt;, which I used to come with the following queries&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;
#Check the constraints of a specific database
SELECT *
	FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE 
		WHERE TABLE_SCHEMA = &apos;databaseName&apos;
		AND REFERENCED_TABLE_NAME IS NOT NULL

&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;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
#Generate table specific queries to find orphaned entries
SELECT CONCAT(
	 &apos;SELECT &apos;, GROUP_CONCAT(DISTINCT CONCAT(K.CONSTRAINT_NAME, &apos;.&apos;, P.COLUMN_NAME,
	  &apos; AS `&apos;, P.TABLE_SCHEMA, &apos;.&apos;, P.TABLE_NAME, &apos;.&apos;, P.COLUMN_NAME, &apos;`&apos;) ORDER BY P.ORDINAL_POSITION), &apos; &apos;,
	 	&apos;FROM &apos;, K.TABLE_SCHEMA, &apos;.&apos;, K.TABLE_NAME, &apos; AS &apos;, K.CONSTRAINT_NAME, &apos; &apos;,
	 		&apos;LEFT OUTER JOIN &apos;, K.REFERENCED_TABLE_SCHEMA, &apos;.&apos;, K.REFERENCED_TABLE_NAME, &apos; AS &apos;, K.REFERENCED_TABLE_NAME, &apos; &apos;,
	 		&apos; ON (&apos;, GROUP_CONCAT(CONCAT(K.CONSTRAINT_NAME, &apos;.&apos;, K.COLUMN_NAME) ORDER BY K.ORDINAL_POSITION),
	 		&apos;) = (&apos;, GROUP_CONCAT(CONCAT(K.REFERENCED_TABLE_NAME, &apos;.&apos;, K.REFERENCED_COLUMN_NAME) ORDER BY K.ORDINAL_POSITION), &apos;) &apos;,
	 		&apos;WHERE &apos;, K.REFERENCED_TABLE_NAME, &apos;.&apos;, K.REFERENCED_COLUMN_NAME, &apos; IS NULL;&apos;
	  )
    INTO OUTFILE &apos;/tmp/verifyDatabaseTableIntegrity.sql&apos;
    FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE K
      INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE P
        ON (K.TABLE_SCHEMA, K.TABLE_NAME) = (P.TABLE_SCHEMA, P.TABLE_NAME)
        AND P.CONSTRAINT_NAME = &apos;PRIMARY&apos;
    WHERE K.TABLE_SCHEMA = &apos;databaseName&apos;
      AND K.REFERENCED_TABLE_NAME IS NOT NULL
      GROUP BY K.CONSTRAINT_NAME;
	
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;By running the generated queries, we can now easily find the records that break referential integrity. &lt;/p&gt;

&lt;p&gt;It might be an idea of adding this functionality to the orm:validate-schema, or a new orm:validate-database-integrity?&lt;/p&gt;</description>
                <environment>MySQL</environment>
            <key id="14208">DDC-2134</key>
            <summary>Add referential integrity check for MySQL to console commands</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="holtkamp">Menno Holtkamp</reporter>
                        <labels>
                    </labels>
                <created>Fri, 9 Nov 2012 13:08:10 +0000</created>
                <updated>Fri, 9 Nov 2012 17:17:04 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1235] Provide fluent interfaces in stub methods</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1235</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Or maybe some template-files could be provided for all stubs.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; $_setMethodTemplate =
&apos;/**
 * &amp;lt;description&amp;gt;
 *
 * @param &amp;lt;variableType&amp;gt;$&amp;lt;variableName&amp;gt;
 */
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function &amp;lt;methodName&amp;gt;(&amp;lt;methodTypeHint&amp;gt;$&amp;lt;variableName&amp;gt;)
{
&amp;lt;spaces&amp;gt;$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;&amp;lt;fieldName&amp;gt; = $&amp;lt;variableName&amp;gt;;

&amp;lt;spaces&amp;gt;&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;lt;/spaces&amp;gt;
}&apos;;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; </description>
                <environment></environment>
            <key id="12757">DDC-1235</key>
            <summary>Provide fluent interfaces in stub methods</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="h-andreas">Andreas H&#246;rnicke</reporter>
                        <labels>
                    </labels>
                <created>Tue, 28 Jun 2011 07:58:16 +0000</created>
                <updated>Mon, 29 Oct 2012 09:18:11 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18895" author="stof" created="Mon, 29 Oct 2012 09:18:11 +0000"  >&lt;p&gt;@beberlei this should be closed as it is the case since 2.2&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-813] Validate Schema should complain on bi-directional relationships with mapped superclasses</title>
                <link>http://doctrine-project.org/jira/browse/DDC-813</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;@ManyToOne and @OneToOne on mapped superclasses have to be unidirectional. The Schema Validator should verify this.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11948">DDC-813</key>
            <summary>Validate Schema should complain on bi-directional relationships with mapped superclasses</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 21 Sep 2010 18:13:26 +0000</created>
                <updated>Mon, 29 Oct 2012 09:13:47 +0000</updated>
                                    <version>2.0-BETA4</version>
                                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-993] Cookbook: Overriding the ID Generator during a database migration</title>
                <link>http://doctrine-project.org/jira/browse/DDC-993</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;If you need to override the ID Generator, e.g. during a migration, you can do that in your migration script as follows:&lt;/p&gt;

&lt;div class=&quot;panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;Overriding the ID generator&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;panelContent&quot;&gt;
&lt;p&gt;$em-&amp;gt;getClassMetadata(&apos;foo\bar\Entity&apos;)-&amp;gt;setIdGenerator(new \Doctrine\ORM\Id\AssignedGenerator());&lt;br/&gt;
$em-&amp;gt;getClassMetadata(&apos;foo\bar\Entity&apos;)-&amp;gt;setIdGeneratorType(constant(&apos;Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_NONE&apos;));&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Make sure that both calls equal to the same generator type. You can now modify the @Id fields in your entities. Additionally, make sure that you set the IdGenerator &lt;b&gt;after&lt;/b&gt; you created the database using e.g. SchemaTool-&amp;gt;create().&lt;/p&gt;</description>
                <environment></environment>
            <key id="12311">DDC-993</key>
            <summary>Cookbook: Overriding the ID Generator during a database migration</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="felicitus">Timo A. Hummel</reporter>
                        <labels>
                    </labels>
                <created>Wed, 19 Jan 2011 13:33:27 +0000</created>
                <updated>Sun, 28 Oct 2012 15:33:51 +0000</updated>
                                    <version>2.0</version>
                                                <component>Documentation</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="18892" author="kosen" created="Sat, 27 Oct 2012 21:36:37 +0000"  >&lt;p&gt;Hi, this doesn&apos;t seem to work for me. I have written a small database export / import utility. As long as I use the automatic ID generation, everything works flawlessly, but I&apos;m trying to preserve the existing IDs. I do exactly what you&apos;ve suggested in your post. It works for @OneToOne relations, but I get the following error messages when persisting entities that are parts of @ManyToOne relations:&lt;br/&gt;
Notice: Undefined index: &lt;span class=&quot;error&quot;&gt;&amp;#91;....&amp;#93;&lt;/span&gt; in &lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt;Doctrine/ORM/UnitOfWork.php on line 2655&lt;br/&gt;
I&apos;m using version 2.2.2&lt;br/&gt;
Am I doing something wrong?&lt;/p&gt;</comment>
                    <comment id="18894" author="kosen" created="Sun, 28 Oct 2012 15:33:51 +0000"  >&lt;p&gt;Never mind. I&apos;ve upgraded to Doctrine 2.3.0 and it works as expected.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2103] Add support for using AliasResultVariable in WhereClause</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2103</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It would be nice if supported writing in DQL:&lt;/p&gt;

&lt;p&gt;SELECT LOWER(a.name) AS name FROM User a WHERE name LIKE ?&lt;/p&gt;

&lt;p&gt;The resulting sql:&lt;/p&gt;

&lt;p&gt;SELECT LOWER(c0_.name) AS sclr0 FROM users c0_ WHERE LOWER(c0_.name) LIKE ?&lt;/p&gt;</description>
                <environment></environment>
            <key id="14167">DDC-2103</key>
            <summary>Add support for using AliasResultVariable in WhereClause</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="hason">Martin Haso&#328;</reporter>
                        <labels>
                    </labels>
                <created>Thu, 25 Oct 2012 12:31:49 +0000</created>
                <updated>Thu, 25 Oct 2012 12:31:49 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2102] Make optional SubselectFromClause</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2102</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Subselect ::= SimpleSelectClause &lt;span class=&quot;error&quot;&gt;&amp;#91;SubselectFromClause&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;WhereClause&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;GroupByClause&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;HavingClause&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;OrderByClause&amp;#93;&lt;/span&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14166">DDC-2102</key>
            <summary>Make optional SubselectFromClause</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="hason">Martin Haso&#328;</reporter>
                        <labels>
                    </labels>
                <created>Thu, 25 Oct 2012 11:32:54 +0000</created>
                <updated>Thu, 25 Oct 2012 11:32:54 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2100] Getting Started: Code First PHP fatal error:Call to undefined method Bug::setDescription()</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2100</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/tutorials/getting-started.html&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/tutorials/getting-started.html&lt;/a&gt;&lt;br/&gt;
in file create_bug.php&lt;br/&gt;
$bug-&amp;gt;setDescription(&quot;Something does not work!&quot;);&lt;br/&gt;
but the class Bug do not have setDescription function.&lt;/p&gt;

&lt;p&gt;ps:&lt;br/&gt;
try find &quot;setDescription&quot; on that page. there is only one .&lt;/p&gt;</description>
                <environment>ubuntu 1204 php5.3.8</environment>
            <key id="14164">DDC-2100</key>
            <summary>Getting Started: Code First PHP fatal error:Call to undefined method Bug::setDescription()</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="bronze1man">bronze1man</reporter>
                        <labels>
                    </labels>
                <created>Wed, 24 Oct 2012 14:28:15 +0000</created>
                <updated>Wed, 24 Oct 2012 14:30:06 +0000</updated>
                                    <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1889] generate persisters</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1889</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;m not sure if this is really possible..&lt;/p&gt;

&lt;p&gt;but to improve performance we should consider generate custom entity persisters.&lt;/p&gt;

&lt;p&gt;Now entity persister are not cached,  &lt;br/&gt;
if we generate it, we can create performance improvement in hidrators, avoiding checks and sql generation every time that an persister is called.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13796">DDC-1889</key>
            <summary>generate persisters</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="3" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/inprogress.png">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="fabio.bat.silva">Fabio B. Silva</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Jun 2012 13:46:04 +0000</created>
                <updated>Mon, 22 Oct 2012 01:02:08 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="18107" author="beberlei" created="Thu, 21 Jun 2012 14:09:53 +0000"  >&lt;p&gt;This should be relatively easy in the first step by ust generate the RSM and SQL statements in the constructor and extending from the default persister.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2087] Select colum Hydration</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2087</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Simple way to select colum&lt;br/&gt;
for example I want select id&apos;s of entity&apos;s to save in cache or in other select query&lt;br/&gt;
Or i vant select one distinct field.&lt;/p&gt;

&lt;p&gt;SELECT u.id FROM User as u&lt;/p&gt;

&lt;p&gt;getResult give&lt;/p&gt;

&lt;p&gt;array( &lt;br/&gt;
0=&amp;gt;array(&apos;id&apos; =&amp;gt; 1),&lt;br/&gt;
1=&amp;gt;array(&apos;id&apos; =&amp;gt; 2),&lt;br/&gt;
)&lt;/p&gt;

&lt;p&gt;but how can take this&lt;/p&gt;

&lt;p&gt;array( &lt;br/&gt;
0=&amp;gt; 1,&lt;br/&gt;
0=&amp;gt; 2,&lt;br/&gt;
)&lt;/p&gt;</description>
                <environment></environment>
            <key id="14140">DDC-2087</key>
            <summary>Select colum Hydration</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ivan1986">Ivan Borzenkov</reporter>
                        <labels>
                    </labels>
                <created>Thu, 18 Oct 2012 09:47:54 +0000</created>
                <updated>Thu, 18 Oct 2012 09:56:52 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18848" author="ivan1986" created="Thu, 18 Oct 2012 09:55:04 +0000"  >&lt;p&gt;for example&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/11327798/change-the-getresult-array-key-for-the-primary-key-value&quot; class=&quot;external-link&quot;&gt;http://stackoverflow.com/questions/11327798/change-the-getresult-array-key-for-the-primary-key-value&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;this code would be good add in library&lt;br/&gt;
(and array key maybe too )&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-213] Persist order of collections</title>
                <link>http://doctrine-project.org/jira/browse/DDC-213</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;A Collection is like a php array, an ordered map. Hence there should be the possibility to persist this order.&lt;/p&gt;</description>
                <environment></environment>
            <key id="10620">DDC-213</key>
            <summary>Persist order of collections</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="romanb">Roman S. Borschel</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Dec 2009 17:40:38 +0000</created>
                <updated>Tue, 16 Oct 2012 07:43:02 +0000</updated>
                                    <version>2.0</version>
                                <fixVersion>2.x</fixVersion>
                                        <due></due>
                    <votes>10</votes>
                        <watches>8</watches>
                        <comments>
                    <comment id="13042" author="shurakai" created="Fri, 21 May 2010 19:50:28 +0000"  >&lt;p&gt;Roman, I&apos;d like to do this one as I have currently a use case for this. Do you have any idea of how to do this? What I&apos;m wondering is whether it is possible to implement this without user intervention. (This would simply mean &quot;store the entities as they were added&quot;). But this would need another column in DB that we&apos;d have to add within oneToMany / manyToMany relationships, but in this case one could save a serialized array holding &quot;entityId =&amp;gt; position&quot; key / value pairs.&lt;/p&gt;

&lt;p&gt;Afterwards, one could easily rebuild / reorder the collection via $collection-&amp;gt;set($entity, $order&lt;span class=&quot;error&quot;&gt;&amp;#91;$entity-&amp;gt;identifier&amp;#93;&lt;/span&gt;);&lt;/p&gt;

&lt;p&gt;If you&apos;ve got another thought about this, please don&apos;t hesitate to point me into the right direction!&lt;/p&gt;</comment>
                    <comment id="13043" author="beberlei" created="Sat, 22 May 2010 02:54:25 +0000"  >&lt;p&gt;this won&apos;t be implemented until 2.1, since its a pretty complex feature. &lt;/p&gt;

&lt;p&gt;Changes are probably required in:&lt;/p&gt;

&lt;p&gt;1. CollectionPersister - Add a new collection persister that takes the position into account&lt;br/&gt;
2. SchemaTool - Add a &apos;col_position&apos; column to either the many-to-many or the one-to-many tables.&lt;br/&gt;
3. EntityPersister - Use and extend current order-by support to make the sorting happen&lt;/p&gt;

&lt;p&gt;You can implement this already though with some performance hit in update scenarios. If you use the ORDER BY support and implement an API around your entity that abstracts those changes and always sets a &quot;position&quot; field on the many entity that is supposed to be sorted.&lt;/p&gt;</comment>
                    <comment id="13044" author="romanb" created="Sat, 22 May 2010 05:35:48 +0000"  >&lt;p&gt;I don&apos;t think we necessarily need a new collection persister. Simply adjusting the ManyToManyPersister to be able to deal with it might be sufficient.&lt;/p&gt;

&lt;p&gt;For OneToMany, that is always persisted from the &quot;many&quot; side, thus there is no collection persister, we would need to adjust the normal persisters.&lt;/p&gt;

&lt;p&gt;They key element for the user should be a new annotation (or corresponding xml/yaml element) @OrderColumn. By default the order should not be persistent, only when an @OrderColumn annotation is present. The name of the order column can have a default, i.e. &quot;position&quot;. Thus this enhancement of persisting the order should be fully backwards compatible.&lt;/p&gt;</comment>
                    <comment id="13045" author="romanb" created="Sat, 22 May 2010 05:41:07 +0000"  >&lt;p&gt;On another note, the getInsertDiff/getDeleteDiff methods of PersistentCollection should already be &quot;ready&quot; for this. That is, when an element in the collection changed only its position, this is already tracked as a change. However the ManyToManyPersister issues no &quot;UPDATE&quot; queries, it simply deletes and inserts. A position change may be more effectively persisted with an UPDATE.&lt;/p&gt;</comment>
                    <comment id="14493" author="beberlei" created="Thu, 30 Sep 2010 03:23:11 +0000"  >&lt;p&gt;From a mailinglist entry, required check/changepoints:&lt;/p&gt;

&lt;p&gt;1. ClassMetadata of Many-To-Many associations have to be extended to publish the required datastructure to the ORM.&lt;br/&gt;
2. All Metadata Mapping Drivers have to be extended&lt;br/&gt;
3. Persisters\ManyToManyCollectionPersister has to be extended to save the key in the many to many table if desired by the user.&lt;br/&gt;
4. Schema-Tool has to be extended to create the additional column.&lt;br/&gt;
5. PersistentCollection has to be extended so that lazy loading of collections with additional key works.&lt;br/&gt;
6. Array- and ObjectHydrator have to be extended to allow fetch join of collections with key column.&lt;br/&gt;
7. Discuss wheather to support this for One-To-Many also with the key-column on the many side. This is much more tricky internally though.&lt;/p&gt;</comment>
                    <comment id="15006" author="beberlei" created="Fri, 24 Dec 2010 04:48:03 +0000"  >&lt;p&gt;Push back to 2.x, we will have support for &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-250&quot; title=&quot;ArrayCollection Key Column @indexBy&quot;&gt;&lt;del&gt;DDC-250&lt;/del&gt;&lt;/a&gt; first and for this at a later release.&lt;/p&gt;</comment>
                    <comment id="17377" author="armetiz" created="Tue, 7 Feb 2012 17:25:33 +0000"  >&lt;p&gt;Hi there,&lt;br/&gt;
I&apos;m looking for this feature.&lt;/p&gt;

&lt;p&gt;Benjamin Eberlei said that : &quot;You can implement this already&quot;, but I don&apos;t understand the &quot;how to&quot;.&lt;/p&gt;

&lt;p&gt;Also,&lt;br/&gt;
The problem should be solve if RDBMS had a &quot;natural&quot; order. An order based on item position inside table.&lt;/p&gt;

&lt;p&gt;To get this feature without any change on Doctrine, I have remplace the PK defined by the target &amp;amp; mapped field identifier. The new PK is a new field with type &quot;integer&quot; and with auto-increment enable.&lt;br/&gt;
In this configuration, Doctrine use the &quot;natural&quot; order of the RDBMS. And I can change order of my item inside Collection and persist it.&lt;/p&gt;

&lt;p&gt;It&apos;s an very bad solution, but It work before an official support.&lt;/p&gt;

&lt;p&gt;Waiting for advices, and solutions,&lt;/p&gt;

&lt;p&gt;Thomas.&lt;/p&gt;</comment>
                    <comment id="17379" author="armetiz" created="Wed, 8 Feb 2012 10:41:00 +0000"  >&lt;p&gt;Answering to Benjamin Eberlei on the &quot;7. Discuss wheather to support this for One-To-Many also with the key-column on the many side. This is much more tricky internally though.&quot;.&lt;/p&gt;

&lt;p&gt;I think that for One-To-Many relations, if user want to store the collection order, Doctrine can store the One-To-Many as Many-To-Many with a &quot;model&quot; limitation. &lt;br/&gt;
In that case, if storing order collection for Many-To-Many work, it should work for One-To-Many.&lt;/p&gt;

&lt;p&gt;What do you think about it ?&lt;/p&gt;</comment>
                    <comment id="17486" author="ndm" created="Wed, 29 Feb 2012 05:41:55 +0000"  >&lt;p&gt;I think that it must be possible to have two keys ordering : the order isn&apos;t obligatory reversible.&lt;/p&gt;

&lt;p&gt;For exemple  with user and group : &lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;You can order groups for one user : with preference by exemple, or importance.&lt;/li&gt;
	&lt;li&gt;And  with a different order,  users for a group : rank by example.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;And maybe more, if you decide to add multi-order : an user show group by his rank in it, if his rank is identical, the order is make by love preference, and after by the importance given by the user (not necessary a number, if we imagine filter on them).&lt;/p&gt;

&lt;p&gt;So a default order can be choice with parametized fields and could be : &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; 
@ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Group&quot;&lt;/span&gt;)
...
@JoinFields ( rank: { type: &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;} , preference:{type:&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;}, importance:{type: string, length: 40} )
@OrderByJoinFields({&lt;span class=&quot;code-quote&quot;&gt;&quot;rank&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;ASC&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;preference&quot;&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;ASC&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;importance&quot;&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;ASC&quot;&lt;/span&gt; } )
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;In this case the order must be optional and would be clean if another order appears in the same scope (DQL...). And manytomany became virtual entities act as other entities except they don&apos;t appears permetting in the same time a better conception.&lt;/p&gt;

&lt;p&gt;So if the solution take in &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-181&quot; class=&quot;external-link&quot;&gt;DDC-181&lt;/a&gt; will become the only solution. This would a good idea to document this. Because, this seems to me a very important point.&lt;/p&gt;

&lt;p&gt;My last point is &lt;b&gt;even an unique ordering field&lt;/b&gt; created in the join table will be a &lt;b&gt;big and usefull improvement&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Thank a lot for your beautiful work.&lt;/b&gt;&lt;/p&gt;</comment>
                    <comment id="17487" author="armetiz" created="Wed, 29 Feb 2012 07:05:59 +0000"  >&lt;p&gt;In my point of view, a collection can be order in a single way only.&lt;br/&gt;
If you want to add more than one order between User &amp;amp; Group, it&apos;s a new collection, a new relation.&lt;br/&gt;
Like : &lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;User.memberOf() : Group[]&lt;/li&gt;
	&lt;li&gt;Group.members() : User[]&lt;/li&gt;
	&lt;li&gt;Group.importantMembers() : User[]&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;And it&apos;s your role to keep a consistency between members &amp;amp; importantMembers array.&lt;/p&gt;

&lt;p&gt;Because ManyToMany join table is the reflection of a state of an ArrayCollection. It&apos;s not a usefull feature to be able to store all of the state of an ArrayCollection, even the order of this Array. It&apos;s just a normal feature that is really missing &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/tongue.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;Thomas.&lt;/p&gt;</comment>
                    <comment id="17488" author="ndm" created="Wed, 29 Feb 2012 10:14:27 +0000"  >&lt;p&gt;I don&apos;t think:&lt;/p&gt;

&lt;p&gt;If you have three collection, you &lt;b&gt;duplicate one relation 3 times&lt;/b&gt; and it&apos;s easy in consequence &lt;b&gt;to lost the data integrity and unicity&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;By example :&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Thomas have rank 10 in Admin&lt;/li&gt;
	&lt;li&gt;Thomas think the admin group has importance noted 3 on all of his groups.&lt;/li&gt;
	&lt;li&gt;If a responsable of admin group decide to delete Thomas from it.&lt;/li&gt;
	&lt;li&gt;Thomas, in his ordered list of groups, think always to be in group admin.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;So in my idea, the &lt;b&gt;many to many relation&lt;/b&gt; isn&apos;t just an array collection, but &lt;b&gt;should be an virtual entity&lt;/b&gt;. In UML or in Merise method this is a common problem to have a parametized relation. I think an orm should just implement this.&lt;/p&gt;
</comment>
                    <comment id="17489" author="armetiz" created="Wed, 29 Feb 2012 10:43:59 +0000"  >&lt;p&gt;Hum,&lt;br/&gt;
I agree with you.. In a SQL Schema, it&apos;s a good choice to add many fields in a ManyToMany join table to description &quot;order&quot;.&lt;/p&gt;</comment>
                    <comment id="17535" author="armetiz" created="Wed, 7 Mar 2012 15:12:35 +0000"  >&lt;p&gt;I just want to add a piece of Doctrine ORM Document : &lt;/p&gt;

&lt;p&gt;&quot;When working with collections, keep in mind that a Collection is essentially an &lt;b&gt;ordered map&lt;/b&gt; (just like a PHP array). That is why the remove operation accepts an index/key. removeElement is a separate method that has O ( n) complexity using array_search, where n is the size of the map.&quot;&lt;/p&gt;</comment>
                    <comment id="17636" author="armetiz" created="Fri, 23 Mar 2012 09:45:13 +0000"  >&lt;p&gt;Hi there,&lt;br/&gt;
After several discussions. on IRC, I have changed my point of view.&lt;/p&gt;

&lt;p&gt;Doctrine Documentation says : &quot;When working with collections, keep in mind that a Collection is essentially an ordered map (just like a PHP array)&quot;.&lt;br/&gt;
So, I think that Doctrine have to be able to store or not the order of a Collection. By adding a new field on the Joined table to store the position of each elements.&lt;/p&gt;

&lt;p&gt;But I not agree with @Nicolas. Because in his case, he&apos;s talking about Association Class : &lt;a href=&quot;http://etutorials.org/Programming/UML/Chapter+6.+Class+Diagrams+Advanced+Concepts/Association+Class/&quot; class=&quot;external-link&quot;&gt;http://etutorials.org/Programming/UML/Chapter+6.+Class+Diagrams+Advanced+Concepts/Association+Class/&lt;/a&gt;&lt;br/&gt;
Because he&apos;s talking of a business logic, he&apos;s talking of a dedicated Entity class.&lt;/p&gt;

&lt;p&gt;What do you think about it ?&lt;/p&gt;

&lt;p&gt;Thomas;&lt;/p&gt;
</comment>
                    <comment id="18593" author="armetiz" created="Fri, 31 Aug 2012 13:43:00 +0000"  >&lt;p&gt;Any news ? &lt;/p&gt;</comment>
                    <comment id="18841" author="mnapoli" created="Tue, 16 Oct 2012 07:43:02 +0000"  >&lt;p&gt;Hi, any news on this?&lt;/p&gt;

&lt;p&gt;If I may add any info to this feature request, maybe something like JPA/Hibernate could be a good start?&lt;/p&gt;

&lt;p&gt;See &lt;a href=&quot;http://docs.oracle.com/javaee/6/api/javax/persistence/OrderColumn.html&quot; class=&quot;external-link&quot;&gt;http://docs.oracle.com/javaee/6/api/javax/persistence/OrderColumn.html&lt;/a&gt; or &lt;a href=&quot;http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/collections.html#collections-indexed&quot; class=&quot;external-link&quot;&gt;http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/collections.html#collections-indexed&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The idea in Hibernate is that you persist the order of the list in an extra column. This column is not a field of the entity however.&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="10523">DDC-181</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                                <inwardlinks description="is referenced by">
                            <issuelink>
            <issuekey id="10718">DDC-250</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2076] Optimization for MEMBER OF</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2076</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Currently, using MEMBER OF for a ManyToMany collection does a join on the table of the related entity, whereas all it needs is in the join table.&lt;/p&gt;

&lt;p&gt;Using the following DQL:&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-sql&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; p &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; Player p
&lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; NOT :team MEMBER OF p.targetedBy
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Here is the current generated SQL:&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-sql&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; NOT EXISTS (&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; 1 &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; player_team p1_ INNER JOIN Team t2_ ON p1_.team_id = t2_.id &lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; p1_.player_id = p0_.id AND t2_.id = ?)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;whereas it could drop the join:&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-sql&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; NOT EXISTS (&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; 1 &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; player_team p1_ &lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; p1_.player_id = p0_.id AND p1_.team_id = ?)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14126">DDC-2076</key>
            <summary>Optimization for MEMBER OF</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="stof">Christophe Coevoet</reporter>
                        <labels>
                        <label>dql</label>
                    </labels>
                <created>Sun, 14 Oct 2012 08:43:09 +0000</created>
                <updated>Sun, 14 Oct 2012 08:43:09 +0000</updated>
                                    <version>Git Master</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-54] Trigger postLoad events and callbacks after associations have been initialized</title>
                <link>http://doctrine-project.org/jira/browse/DDC-54</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Currently the postLoad events and callbacks are triggered after the entity has been created and filled with its &quot;primitive&quot; state but before associations are available. The postLoad events and callbacks should be postponed so that they are triggered after associations have been initialized.&lt;/p&gt;</description>
                <environment></environment>
            <key id="10198">DDC-54</key>
            <summary>Trigger postLoad events and callbacks after associations have been initialized</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://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="romanb">Roman S. Borschel</reporter>
                        <labels>
                    </labels>
                <created>Thu, 15 Oct 2009 18:34:38 +0000</created>
                <updated>Thu, 11 Oct 2012 10:37:46 +0000</updated>
                                    <version>2.0-ALPHA2</version>
                                <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>6</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="14159" author="romanb" created="Mon, 30 Aug 2010 06:36:48 +0000"  >&lt;p&gt;If this is to be included in 2.0 it needs to happen for RC1. However, it is not clear yet whether it will be done in time.&lt;/p&gt;</comment>
                    <comment id="14454" author="beberlei" created="Thu, 23 Sep 2010 17:57:07 +0000"  >&lt;p&gt;How would you solve this Roman? I thought of adding a query hint so that the postLoad inside unit of work is not triggered and gathering all the entities that have a post load event in an array inside the object hydrator, then iterating it after taking the snapshots of all collections inside hydrateAll&lt;/p&gt;</comment>
                    <comment id="14461" author="romanb" created="Fri, 24 Sep 2010 14:37:25 +0000"  >&lt;p&gt;@Benjamin: Not sure what you would use the query hint for but in general that is the approach I had in mind, yes. You can&apos;t get around iterating over the entities after the actual hydration.&lt;/p&gt;</comment>
                    <comment id="14477" author="beberlei" created="Mon, 27 Sep 2010 16:45:30 +0000"  >&lt;p&gt;The query hint would do something like:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;        &lt;span class=&quot;code-comment&quot;&gt;//TODO: These should be invoked later, after hydration, because associations may not yet be loaded here.
&lt;/span&gt;        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($class-&amp;gt;lifecycleCallbacks[Events::postLoad]) &amp;amp;&amp;amp; !isset($hints[&apos;hydrationPostLoad&apos;])) {
            $class-&amp;gt;invokeLifecycleCallbacks(Events::postLoad, $entity);
        }
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;evm-&amp;gt;hasListeners(Events::postLoad) &amp;amp;&amp;amp; !isset($hints[&apos;hydrationPostLoad&apos;])) {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;evm-&amp;gt;dispatchEvent(Events::postLoad, &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; LifecycleEventArgs($entity, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em));
        }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;another way would be to move that code out of UoW::createEntity completly and have the persisters call it when they use that method.&lt;/p&gt;</comment>
                    <comment id="14486" author="romanb" created="Tue, 28 Sep 2010 16:11:38 +0000"  >&lt;p&gt;Leaving that code in UoW does not make sense to me, if it is moved, it needs to be moved completely. Why do you think the persisters should do it? Initially I thought collecting the affected entities during hydration and then when hydration is done iterating over them and triggering the postLoad events.&lt;/p&gt;</comment>
                    <comment id="14488" author="beberlei" created="Tue, 28 Sep 2010 16:30:04 +0000"  >&lt;p&gt;Yes but postLoad has to be triggered for non Hydrated entities (i.e. Persister) also&lt;/p&gt;</comment>
                    <comment id="14620" author="beberlei" created="Sat, 30 Oct 2010 11:36:57 +0000"  >&lt;p&gt;Moved back&lt;/p&gt;</comment>
                    <comment id="17849" author="cakper" created="Sun, 15 Apr 2012 19:51:18 +0000"  >&lt;p&gt;Hi Gyus, I need access to associations in postLoad or similar event, and my idea is to dispatch new event after full initialisation of object, what do You think about it? If I can help please let me know &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; It&apos;s important for me.&lt;/p&gt;</comment>
                    <comment id="18731" author="brizzz" created="Tue, 25 Sep 2012 21:41:06 +0000"  >&lt;p&gt;Now in my PostLoad access to associations is work fine. Why this issue is still in Unresolved status?&lt;/p&gt;</comment>
                    <comment id="18822" author="chives" created="Thu, 11 Oct 2012 10:37:46 +0000"  >&lt;p&gt;What do you (Roman and Benjamin) think about adding postHydrate event which would be called within ObjectHydrator::hydrateAllData() on every entity collected during hydration? I could prepare a patch for this. I personally think this would be better than adding a hint that changes behaviour of postLoad event.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2061] Matching Criteria on a PersistentCollection only works on OneToMany associations</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2061</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;What is needed to make it also work for ManyToMany associations?&lt;/p&gt;

&lt;p&gt;May be a better fallback would be do an ArrayCollection-&amp;gt;matching() instead of just giving a runtime exception?&lt;/p&gt;

&lt;p&gt;Is this something that is difficult to implement?&lt;/p&gt;</description>
                <environment></environment>
            <key id="14107">DDC-2061</key>
            <summary>Matching Criteria on a PersistentCollection only works on OneToMany associations</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="terjeb">Terje Br&#229;ten</reporter>
                        <labels>
                        <label>criteria</label>
                        <label>matching</label>
                    </labels>
                <created>Mon, 8 Oct 2012 20:30:35 +0000</created>
                <updated>Mon, 8 Oct 2012 20:32:21 +0000</updated>
                                    <version>Git Master</version>
                                <fixVersion>Git Master</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-567] Foreign Key to Unique Field Update Failure</title>
                <link>http://doctrine-project.org/jira/browse/DDC-567</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am getting an error: &apos;Notice: Undefined index: sysname in ./libraries/Doctrine/ORM/Persisters/BasicEntityPersister.php on line 434&apos; when I try to flush a change to a property that references a unique field on another object.&lt;/p&gt;

&lt;p&gt;From poking around in the _prepareUpdateData function, it seems that it only allows you to use identifier fields: &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;$newValId = $uow-&amp;gt;getEntityIdentifier($newVal);

..

$result[$owningTable][$sourceColumn] = $newValId[$targetClass-&amp;gt;fieldNames[$targetColumn]];
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I&apos;ll see if I can get a test case for this set up.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11310">DDC-567</key>
            <summary>Foreign Key to Unique Field Update Failure</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="5" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/trivial.png">Trivial</priority>
                    <status id="4" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="mridgway">Michael Ridgway</reporter>
                        <labels>
                    </labels>
                <created>Mon, 3 May 2010 10:07:03 +0000</created>
                <updated>Mon, 8 Oct 2012 14:56:08 +0000</updated>
                                    <version>2.0-BETA2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="12821" author="romanb" created="Mon, 3 May 2010 10:25:32 +0000"  >&lt;p&gt;Hi. That is right. Foreign keys (join columns) must point to primary keys, not arbitrary other columns, whether they&apos;re unique or not, Doctrine does not know.&lt;/p&gt;

&lt;p&gt;In other words, joinColumn must always refer to an identifier/pk. I&apos;m not sure but I think anything else would be a pretty strange relational model, too, but there may be usecases we have not yet encountered.&lt;/p&gt;

&lt;p&gt;I&apos;m afraid this will not be possible and would be very hard to implement. Of course if somebody has a patch we happily accept it (after reviewing).&lt;/p&gt;

&lt;p&gt;Leaving this open in the case somebody wants to work on it.&lt;/p&gt;</comment>
                    <comment id="12822" author="mridgway" created="Mon, 3 May 2010 10:25:48 +0000"  >&lt;p&gt;A minimal test case.  Removing the first flush produces the same error, so this seems to be a bug on inserts as well.&lt;/p&gt;</comment>
                    <comment id="12823" author="romanb" created="Mon, 3 May 2010 10:27:10 +0000"  >&lt;p&gt;Its not really a bug but rather a new feature &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; This was not intended to work so far.&lt;/p&gt;</comment>
                    <comment id="12824" author="mridgway" created="Mon, 3 May 2010 10:39:51 +0000"  >&lt;p&gt;Ah, ok.  Maybe it didn&apos;t work before. I don&apos;t know where I got the idea that it did.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</comment>
                    <comment id="12825" author="mridgway" created="Mon, 3 May 2010 10:40:55 +0000"  >&lt;p&gt;Oops, closed it before I noticed you said you wanted to leave it open.&lt;/p&gt;</comment>
                    <comment id="12826" author="romanb" created="Mon, 3 May 2010 10:50:32 +0000"  >&lt;p&gt;Thanks for the testcase though, it is useful. In your concrete example, is it not an option to make the sysname the @Id ?&lt;/p&gt;</comment>
                    <comment id="12827" author="mridgway" created="Mon, 3 May 2010 10:59:37 +0000"  >&lt;p&gt;Yes.  That is definitely the way it should be done in this case.  I can&apos;t really think of a case to have a reference to a unique key while still having an Id on it, except when you&apos;re working with an existing, poorly designed database (which is our case).&lt;/p&gt;

&lt;p&gt;The reason I assumed this was possible is that the references actually work for lazy loading, but as soon as you start changing the references it throws this error.&lt;/p&gt;</comment>
                    <comment id="12951" author="romanb" created="Fri, 14 May 2010 08:39:11 +0000"  >&lt;p&gt;Lowering priority.&lt;/p&gt;</comment>
                    <comment id="18809" author="dready" created="Mon, 8 Oct 2012 14:56:08 +0000"  >&lt;p&gt;although we would also need this i would suggest adding an error message if the associated column is not found in $newValId. (class BasicEntityPersister.php _prepareUpdateData)&lt;/p&gt;

&lt;p&gt;otherwise the field is populated with null leaving the developer debugging an hour :-/&lt;/p&gt;

&lt;p&gt;thx&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10589" name="DDC567Test.php" size="1676" author="mridgway" created="Mon, 3 May 2010 10:25:48 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2053] [GH-460] added support to extend strategies for IdGenerators</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2053</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Powerhamster:&lt;/p&gt;

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

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

&lt;p&gt;Mapping drivers now use extended classmetadata class to find constants of generator types.&lt;br/&gt;
Method completeIdGeneratorMapping is now protected and can be extended&lt;/p&gt;</description>
                <environment></environment>
            <key id="14088">DDC-2053</key>
            <summary>[GH-460] added support to extend strategies for IdGenerators</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 2 Oct 2012 18:40:49 +0000</created>
                <updated>Wed, 3 Oct 2012 08:33:52 +0000</updated>
                                    <version>Git Master</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18762" author="beberlei" created="Wed, 3 Oct 2012 08:33:52 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-460&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/460&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/460&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2035] XML Mapping : add attribute &quot;length&quot; for tag &quot;id&quot;</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2035</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;b&gt;XML mapping :&lt;/b&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;&amp;lt;id name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt; type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt; length=&lt;span class=&quot;code-quote&quot;&gt;&quot;16&quot;&lt;/span&gt;/&amp;gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;b&gt;Generate SQL :&lt;/b&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;id varchar(255) not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;b&gt;It&apos;s not possible with XML mapping to have :&lt;/b&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; id varchar(16) not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Because tag &quot;id&quot; doesn&apos;t support &quot;length&quot; attribute.&lt;br/&gt;
Please add this attribute&lt;/p&gt;</description>
                <environment>Linux, Doctrine ORM 2.3.0, MySQL</environment>
            <key id="14047">DDC-2035</key>
            <summary>XML Mapping : add attribute &quot;length&quot; for tag &quot;id&quot;</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="10000" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="seros">Erik M&#252;ller</reporter>
                        <labels>
                    </labels>
                <created>Thu, 20 Sep 2012 10:59:22 +0000</created>
                <updated>Sat, 29 Sep 2012 19:17:03 +0000</updated>
                                    <version>2.2.3</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="18686" author="fabio.bat.silva" created="Thu, 20 Sep 2012 12:45:20 +0000"  >&lt;p&gt;Hi Erik,&lt;/p&gt;

&lt;p&gt;The atribute &quot;id&quot; arealdy support &quot;length&quot; in the current doctrine version&lt;br/&gt;
: &lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/2.3/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php#L259&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/2.3/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php#L259&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Which version are you using ?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2048] [GH-457] Fixes case when an entity has a relationship with a class with joined inheritance</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2048</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Fran6co:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="14080">DDC-2048</key>
            <summary>[GH-457] Fixes case when an entity has a relationship with a class with joined inheritance</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 29 Sep 2012 16:11:00 +0000</created>
                <updated>Sat, 29 Sep 2012 16:11:00 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2043] Extra cache operation in DBAL\Cache\ResultCacheStatement.php</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2043</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This is the closeCursor() method in DBAL\Cache\ResultCacheStatement.php:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function closeCursor()
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;statement-&amp;gt;closeCursor();
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;emptied &amp;amp;&amp;amp; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;data !== &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;) {
            $data = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;resultCache-&amp;gt;fetch($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;cacheKey);
            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ( ! $data) {
                $data = array();
            }
            $data[$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;realKey] = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;data;

            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;resultCache-&amp;gt;save($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;cacheKey, $data, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;lifetime);
            unset($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;data);
        }
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We are using Memcache and I noticed an extra GET operation on all cache misses. In the code above I believe the fetch call is not necessary and that the code would do the same without it. &lt;br/&gt;
Also, may I ask why is the SQL used as a key in the cached data?&lt;/p&gt;</description>
                <environment>CentOS, PHP 5.3.10</environment>
            <key id="14069">DDC-2043</key>
            <summary>Extra cache operation in DBAL\Cache\ResultCacheStatement.php</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="bogdan.albei">Bogdan Albei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Sep 2012 11:59:59 +0000</created>
                <updated>Wed, 26 Sep 2012 14:18:04 +0000</updated>
                                    <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="18733" author="stof" created="Wed, 26 Sep 2012 14:12:15 +0000"  >&lt;p&gt;The SQL is used as a key because it is what identifies the query which is done (well, the statement and the parameters)&lt;/p&gt;</comment>
                    <comment id="18734" author="bogdan.albei" created="Wed, 26 Sep 2012 14:18:04 +0000"  >&lt;p&gt;The cacheKey already identifies the query(or at least it should). Would we have cases where different queries would want to use the same cache key?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2042] Metadata association overriding : allow to override &apos;targetEntity&apos;</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2042</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;While associating object to an descriminated table I wasn&apos;t enable to fix the entityTarget (only one can be set in entity annotation).&lt;/p&gt;

&lt;p&gt;It could be resolve by adding the possibility to override &apos;targetEntity&apos; value in Doctrine\ORM\Mapping\ClassMetadataInfo::ClassMetadataInfo().&lt;/p&gt;

&lt;p&gt;Such as :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;if (isset($overrideMapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;targetEntity&amp;#39;&amp;#93;&lt;/span&gt;)) {&lt;br/&gt;
    $mapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;targetEntity&amp;#39;&amp;#93;&lt;/span&gt; = $overrideMapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;targetEntity&amp;#39;&amp;#93;&lt;/span&gt;;&lt;br/&gt;
}&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;That would need to add a control on the new targetEntity in Doctrine\ORM\Mapping\ClassMetadataInfo::_validateAndCompleteAssociationMapping().&lt;/p&gt;

&lt;p&gt;Such as :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;if ( ! ClassLoader::classExists($mapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;targetEntity&amp;#39;&amp;#93;&lt;/span&gt;) ) {&lt;br/&gt;
throw MappingException::invalidTargetEntityClass($mapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;targetEntity&amp;#39;&amp;#93;&lt;/span&gt;, $this-&amp;gt;name, $mapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;fieldName&amp;#39;&amp;#93;&lt;/span&gt;);&lt;br/&gt;
}&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;cro.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14067">DDC-2042</key>
            <summary>Metadata association overriding : allow to override &apos;targetEntity&apos;</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="cro">Charles Rouillon</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Sep 2012 08:57:40 +0000</created>
                <updated>Wed, 26 Sep 2012 08:59:38 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-391] Allow to specifiy custom Entity and Collection Persister classes</title>
                <link>http://doctrine-project.org/jira/browse/DDC-391</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It should be allowed to overwrite the default persisters for collections and entities. This should go along the lines of Hibernate which allows to set the custom implementations like:&lt;/p&gt;

&lt;p&gt;XML:&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;&amp;lt;entity persister=&lt;span class=&quot;code-quote&quot;&gt;&quot;persisterClass&quot;&lt;/span&gt; /&amp;gt;
&amp;lt;OneToMany persister=&lt;span class=&quot;code-quote&quot;&gt;&quot;persisterClass&quot;&lt;/span&gt; /&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Annotation&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;/**
 * @Entity(persister=&lt;span class=&quot;code-quote&quot;&gt;&quot;persisterClass&quot;&lt;/span&gt;)
 * @OneToMany(persister=&lt;span class=&quot;code-quote&quot;&gt;&quot;persisterClass&quot;&lt;/span&gt;)
 */
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="10999">DDC-391</key>
            <summary>Allow to specifiy custom Entity and Collection Persister classes</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="3" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 6 Mar 2010 07:07:22 +0000</created>
                <updated>Mon, 24 Sep 2012 08:30:25 +0000</updated>
                                    <version>2.0-ALPHA4</version>
                                <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>5</votes>
                        <watches>7</watches>
                        <comments>
                    <comment id="12997" author="romanb" created="Wed, 19 May 2010 06:32:18 +0000"  >&lt;p&gt;Rescheduling for beta3.&lt;/p&gt;</comment>
                    <comment id="13538" author="romanb" created="Wed, 7 Jul 2010 11:18:14 +0000"  >&lt;p&gt;Pushing back to beta4.&lt;/p&gt;</comment>
                    <comment id="13570" author="romanb" created="Mon, 12 Jul 2010 11:49:44 +0000"  >&lt;p&gt;Moved to 2.1 due to lack of time for any larger new features for 2.0.&lt;/p&gt;</comment>
                    <comment id="14559" author="beberlei" created="Wed, 13 Oct 2010 02:43:57 +0000"  >&lt;p&gt;implemented this in a feature branch for now, it really doesnt touch any other runtime code so maybe we can still merge this before RC1&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://github.com/doctrine/doctrine2/tree/OverridePersisters&quot; class=&quot;external-link&quot;&gt;http://github.com/doctrine/doctrine2/tree/OverridePersisters&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="15369" author="gediminasm" created="Fri, 25 Feb 2011 10:14:30 +0000"  >&lt;p&gt;Is this forgotten? you should merge it since it does not affect any other parts of ORM, this is a great feature&lt;/p&gt;</comment>
                    <comment id="15390" author="beberlei" created="Sat, 26 Feb 2011 08:50:32 +0000"  >&lt;p&gt;This has not been forgotten, but the Persister is due for a heavy refactoring for 2.2 probably, when we will make it use the SQL Query object that we are working on.&lt;/p&gt;

&lt;p&gt;So I cannot merge this, because the API will probably break big time.&lt;/p&gt;</comment>
                    <comment id="15500" author="jonaswouters" created="Wed, 16 Mar 2011 09:31:23 +0000"  >&lt;p&gt;Does that mean we will not see this feature before 2.2? &lt;/p&gt;</comment>
                    <comment id="15501" author="beberlei" created="Wed, 16 Mar 2011 12:15:24 +0000"  >&lt;p&gt;Yes, that is correct. I dont want to add it as experimental/undocumented feature because people will take it for granted and make us responsible for possible bc breaks.&lt;/p&gt;

&lt;p&gt;I will update the target version accordingly.&lt;/p&gt;

&lt;p&gt;Sorry for disappointing you, but this feature is fundamentally important at the core of the library. That means we have to get it right and not rush into it.&lt;/p&gt;</comment>
                    <comment id="15509" author="gediminasm" created="Thu, 17 Mar 2011 04:32:11 +0000"  >&lt;p&gt;Just as I thought that first you will want to make a query builder object for all persisters. since now they use plain sql. Thanks for all your work on this&lt;/p&gt;</comment>
                    <comment id="17218" author="adambro" created="Wed, 11 Jan 2012 13:28:00 +0000"  >&lt;p&gt;I might be mistaken, but AFAICS mentioned Persister heavy refactoring did not made through to 2.2 version. Is there any plan to have it in 2.3 or at any later stage?&lt;/p&gt;</comment>
                    <comment id="17229" author="guilhermeblanco" created="Fri, 13 Jan 2012 04:49:35 +0000"  >&lt;p&gt;@Adam I refactored all Persisters optimizing their code, but I could not complete the move from SQL string generation to Doctrine\DBAL\Query.&lt;br/&gt;
We missed it, yes. I may reschedule for 2.3&lt;/p&gt;</comment>
                    <comment id="18599" author="burnred" created="Wed, 5 Sep 2012 13:10:35 +0000"  >&lt;p&gt;Why is it still missing in 2.3? I would require this for an extension that uses its own overridden entity persister and using a custom persister is the solution that you guys recomend for not overriding the entity manager.&lt;/p&gt;</comment>
                    <comment id="18700" author="sstok" created="Sun, 23 Sep 2012 12:10:47 +0000"  >&lt;p&gt;Any change seeing this soon? I really need this for a security feature.&lt;/p&gt;

&lt;p&gt;What is making this so hard? just adding an setEntityPersister($entityName, $object) should do the trick.&lt;br/&gt;
I don&apos;t need any fancy stuff, just a way to limit the fields in the SELECT list.&lt;/p&gt;

&lt;p&gt;Edit: OK, I&apos;m shot I CAN NOT overwrite the entity manager as the UnitOfWork is private!&lt;br/&gt;
Got any other idea?&lt;/p&gt;</comment>
                    <comment id="18705" author="st_koegel" created="Mon, 24 Sep 2012 08:30:25 +0000"  >&lt;p&gt;Any chance you could add this quickly? I need this feature urgently to complete an extension using a custom persister. Thanks in advance.&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                                <inwardlinks description="is referenced by">
                            <issuelink>
            <issuekey id="11094">DDC-445</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="11650">DDC-699</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1283] Possible issue with PersistentCollection#getDelete/InsertDiff()</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1283</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Using the following code, when you go from (1, 2) to (1), (2) is deleted as expected. However, if you go from (1, 2) to (2), (1) and (2) are deleted and (2) is then inserted. Is this the desired behaviour? (i.e. 2 extra queries)&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;$bracket-&amp;gt;getTournamentLocations()-&amp;gt;takeSnapshot();

$col = $bracket-&amp;gt;getTournamentLocations()-&amp;gt;unwrap();

$col-&amp;gt;clear();

foreach ($form-&amp;gt;getValue(&apos;tournamentLocations&apos;) as $id) {
    $col-&amp;gt;add($em-&amp;gt;getReference(&apos;Tournaments_Model_TournamentLocation&apos;, $id));
}

$bracket-&amp;gt;getTournamentLocations()-&amp;gt;setDirty(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="12840">DDC-1283</key>
            <summary>Possible issue with PersistentCollection#getDelete/InsertDiff()</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="4" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="darkangel">Glen Ainscow</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Jul 2011 20:02:02 +0000</created>
                <updated>Thu, 20 Sep 2012 06:20:49 +0000</updated>
                                    <version>2.1</version>
                                <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16211" author="beberlei" created="Tue, 26 Jul 2011 20:27:28 +0000"  >&lt;p&gt;First, you are using internal API therefore you are on your own anyways.&lt;/p&gt;

&lt;p&gt;This is marked as improvment now, the functionality works, it may just be inefficient.&lt;/p&gt;</comment>
                    <comment id="16952" author="guilhermeblanco" created="Fri, 9 Dec 2011 04:43:59 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I&apos;m marking issue as invalid because you&apos;re conceptually wrong.&lt;br/&gt;
What you&apos;re trying to do is telling that a collection of new entities is holded by a collection of Persistent entities.&lt;br/&gt;
The reference internally of PersistentCollection to ArrayCollection means a lot here.&lt;/p&gt;

&lt;p&gt;Correct code would be you to regenerate the collection (a new ArrayCollection) and just assign it to setTournamentLocations($newCollection);&lt;/p&gt;

&lt;p&gt;Does this explanation is enough for you?&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                    <comment id="17096" author="darkangel" created="Fri, 23 Dec 2011 18:38:31 +0000"  >&lt;p&gt;Hi Guilherme,&lt;/p&gt;

&lt;p&gt;If I do 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;$locations = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ArrayCollection();

foreach ($form-&amp;gt;getValue(&apos;tournamentLocations&apos;) as $id) {
    $locations-&amp;gt;add($em-&amp;gt;getReference(&apos;Tournaments_Model_TournamentLocation&apos;, $id));
}

$bracket-&amp;gt;setTournamentLocations($locations);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;... then all the records are deleted, before adding the new records. This is inefficient and causes extra, unnecessary write operations.&lt;/p&gt;

&lt;p&gt;Can&apos;t Doctrine perform diffs when persisting the collection, so that only the necessary deletes and inserts are executed?&lt;/p&gt;</comment>
                    <comment id="17236" author="guilhermeblanco" created="Fri, 13 Jan 2012 06:18:55 +0000"  >&lt;p&gt;We could add it, but I don&apos;t think it worth the effort.&lt;br/&gt;
Main problem with this one is that we use C-level binary comparison to get the diff. That&apos;s what you entities/hash pointers are different.&lt;br/&gt;
We would have to write our own diff-comparator for both collections, which would probably slowdown the entire Doctrine.&lt;/p&gt;

&lt;p&gt;I&apos;d rather consider that it&apos;s not possible to be done at the moment, but I need much more investigation for that. This will be something that I&apos;ll probably only do when I look at this issue again with a lot of time (which is really hard to happen).&lt;/p&gt;

&lt;p&gt;If you have some spare time, feel free to make some attempts.&lt;br/&gt;
Just don&apos;t forget to enable performance tests in Doctrine Unit Test suite.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1599] OnFlush event in transaction</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1599</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Is there any particular reason why onFlush event is not triggered when the transaction is allready open? &lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/UnitOfWork.php#L290&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/UnitOfWork.php#L290&lt;/a&gt; It would help a lot developing listeners since this event is the mostly used one and since theres preFlush now it seems a logical solution if onFlush would be a start of transaction in general&lt;/p&gt;</description>
                <environment></environment>
            <key id="13357">DDC-1599</key>
            <summary>OnFlush event in transaction</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="gediminasm">Gediminas Morkevicius</reporter>
                        <labels>
                    </labels>
                <created>Sat, 14 Jan 2012 15:51:55 +0000</created>
                <updated>Thu, 20 Sep 2012 06:20:49 +0000</updated>
                                    <version>Git Master</version>
                                <fixVersion>2.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17244" author="beberlei" created="Sat, 14 Jan 2012 16:36:43 +0000"  >&lt;p&gt;onFluish is not the start of a transaction. It has nothing to do with this.&lt;/p&gt;</comment>
                    <comment id="17693" author="ocramius" created="Sat, 31 Mar 2012 02:07:52 +0000"  >&lt;p&gt;Is a third event needed? Or is this to be marked as &quot;won&apos;t fix&quot;?&lt;/p&gt;</comment>
                    <comment id="17695" author="beberlei" created="Sat, 31 Mar 2012 07:14:31 +0000"  >&lt;p&gt;Maybe onBeginTransaction, onCommit and onRollback.&lt;/p&gt;

&lt;p&gt;However since you can start transactions manually using $em-&amp;gt;beginTransaction(), the Flush events are somehwat independent of transactions anyways.&lt;/p&gt;</comment>
                    <comment id="17697" author="gediminasm" created="Sat, 31 Mar 2012 07:41:46 +0000"  >&lt;p&gt;Well, user can start transaction anytime, but the fact is that if we think ORM we do not know nothing about the database. we just persist and flush objects.&lt;/p&gt;

&lt;p&gt;Yes I think these would be very useful, from how I see it, if you use event listeners, is:&lt;/p&gt;

&lt;p&gt;loadClassMetadata: you can apply extra mapping&lt;/p&gt;

&lt;p&gt;onFlush: you can modify entity changesets, or persist recalculate new ones, without triggering the database, since it is not used to begin the database modifications yet.&lt;/p&gt;

&lt;p&gt;onBeginTransaction: could use the database modifications keeping in sync the entity changesets. the thing about this event is that usually in behavioral way atomic updates are required. for example nestedset tree sync lft rgt columns, sortable sync the sort index, materialized path, all these requires atomic updates, and the best place is the start of transaction.&lt;/p&gt;

&lt;p&gt;onCommit: could be useful to execute right before commit, finalizing database modifications could be done.&lt;/p&gt;

&lt;p&gt;onRollback: this one is really something, since if you go far, there might be something like files uploaded during the entity processing, and you may want to remove them if transaction fails.&lt;/p&gt;</comment>
                    <comment id="17958" author="guilhermeblanco" created="Mon, 21 May 2012 02:26:05 +0000"  >&lt;p&gt;This situation was barely documented here: &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1443&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1443&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We need a better Transaction API that completely fixes the computation of changesets and also allow more fine grained control over Entities and their corresponding information.&lt;/p&gt;

&lt;p&gt;I&apos;d postpone this one until 3.0.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1624] Locking CTI doesnt work on SQL Server</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1624</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The WITH Keyowrd is appended to the whole FROM .. JOIN .. block instead of behind the FROM block.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13396">DDC-1624</key>
            <summary>Locking CTI doesnt work on SQL Server</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 29 Jan 2012 14:18:18 +0000</created>
                <updated>Thu, 20 Sep 2012 06:20:48 +0000</updated>
                                    <version>2.2</version>
                                <fixVersion>2.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1852] Doctrine\ORM\Tools\SchemaValidator should check validity of lifecycle callbacks</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1852</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The schema validator should analyze mapped lifecycle callbacks and:&lt;/p&gt;

&lt;p&gt; a) if some lifecycle callbacks were defined, but no @HasLifecycleCallbacks annotation/mapping was set, warn the user&lt;br/&gt;
 b) if some lifecycle callbacks were defined, but methods are not public, warn the user&lt;/p&gt;</description>
                <environment></environment>
            <key id="13752">DDC-1852</key>
            <summary>Doctrine\ORM\Tools\SchemaValidator should check validity of lifecycle callbacks</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="ocramius">Marco Pivetta</reporter>
                        <labels>
                    </labels>
                <created>Mon, 4 Jun 2012 09:47:12 +0000</created>
                <updated>Thu, 20 Sep 2012 06:20:48 +0000</updated>
                                    <version>Git Master</version>
                                <fixVersion>2.4</fixVersion>
                <fixVersion>2.x</fixVersion>
                <fixVersion>Git Master</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="18038" author="ocramius" created="Mon, 4 Jun 2012 22:25:23 +0000"  >&lt;p&gt;Existing PR at &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/361&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/361&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1840] Create ParameterCollection indexed and implement it on AbstractQuery and QueryBuilder</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1840</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Currently, method setParameters in AbstractQuery and QueryBuilder only appends new parameters to the list. It should actually override the existing ones.&lt;br/&gt;
To be able to correctly fix this, we need to create a ParameterCollection which we can use/reuse to set/remove/append new parameters.&lt;br/&gt;
These elements should also support parameter types.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13733">DDC-1840</key>
            <summary>Create ParameterCollection indexed and implement it on AbstractQuery and QueryBuilder</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Sat, 26 May 2012 16:57:36 +0000</created>
                <updated>Thu, 20 Sep 2012 06:20:48 +0000</updated>
                                                    <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17987" author="beberlei" created="Sun, 27 May 2012 08:07:59 +0000"  >&lt;p&gt;Not a bug&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1738] Allow multiple Generators per class</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1738</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;We should be able to support multiple generators per class.&lt;br/&gt;
When doing partition per table, the partitioned column must be part of PK, which may enter in our limitation.&lt;/p&gt;

&lt;p&gt;Currently we only support 1 generator per class.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13576">DDC-1738</key>
            <summary>Allow multiple Generators per class</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Thu, 29 Mar 2012 21:54:27 +0000</created>
                <updated>Thu, 20 Sep 2012 06:20:48 +0000</updated>
                                    <version>Git Master</version>
                                <fixVersion>2.4</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1723] Custom ID Generators</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1723</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Allow specify custom id generators, pull request is GH-206&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/206&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/206&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13551">DDC-1723</key>
            <summary>Custom ID Generators</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Mar 2012 21:27:59 +0000</created>
                <updated>Thu, 20 Sep 2012 06:20:48 +0000</updated>
                                                    <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1247] Implement AnnotationDriver::addExcludePath</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1247</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi, &lt;br/&gt;
I&apos;ve been having issues with AnnotationDriver crawling in my directories and loading files. &lt;br/&gt;
I have a few classes that require specific libraries loaded, and I don&apos;t want the AnnotationDriver to load them. &lt;/p&gt;

&lt;p&gt;For example, I have my descendant of PHPUnit_Framework_TestCase in libs and the driver just dies, because PHPUnit is not loaded, and I don&apos;t want to load it, to be able to finish the process.&lt;/p&gt;

&lt;p&gt;Solution would be add method &lt;tt&gt;AnnotationDriver::addExcludePath&lt;/tt&gt;, whose name speaks for itself &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.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;Temporarily, I had to extend the AnnotationDriver and overload the crawling process, which is realy annoing, because I had to copy the whole method with all its exceptions and I would have to maintain it, till this will be in Doctrine. Can be viewed here &lt;a href=&quot;https://github.com/Kdyby/Framework/blob/master/libs/Kdyby/Doctrine/Mapping/Driver/AnnotationDriver.php&quot; class=&quot;external-link&quot;&gt;https://github.com/Kdyby/Framework/blob/master/libs/Kdyby/Doctrine/Mapping/Driver/AnnotationDriver.php&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks&lt;br/&gt;
Filip&lt;/p&gt;</description>
                <environment></environment>
            <key id="12784">DDC-1247</key>
            <summary>Implement AnnotationDriver::addExcludePath</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="hosiplan">Filip Proch&#225;zka</reporter>
                        <labels>
                    </labels>
                <created>Mon, 4 Jul 2011 09:26:49 +0000</created>
                <updated>Wed, 19 Sep 2012 16:10:00 +0000</updated>
                                    <version>Git Master</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="17875" author="juzna" created="Fri, 20 Apr 2012 12:33:23 +0000"  >&lt;p&gt;This behavior really messes with my projects, as it automatically loads all php files. Not just those with classes, but also simple scripts, which can do horrible stuff (e.g. I&apos;ve got scripts to make changes in the source code!)&lt;/p&gt;

&lt;p&gt;Annotations should be read without executing the scripts, e.g. by TokenReflection library: &lt;a href=&quot;https://github.com/Andrewsville/PHP-Token-Reflection&quot; class=&quot;external-link&quot;&gt;https://github.com/Andrewsville/PHP-Token-Reflection&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18546" author="vrtak-cz" created="Mon, 27 Aug 2012 17:05:46 +0000"  >&lt;p&gt;pull &lt;a href=&quot;https://github.com/doctrine/common/pull/176&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/pull/176&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18683" author="stof" created="Wed, 19 Sep 2012 11:13:23 +0000"  >&lt;p&gt;@Jan Tokenizing the file was the way annotations were handled in 2.0. Doctrine 2.1 switched to using Reflection to read annotation because it is faster.&lt;/p&gt;

&lt;p&gt;@Filip I&apos;m wondering why you would have PHPUnit testcases in a path storing entities.&lt;/p&gt;</comment>
                    <comment id="18684" author="hosiplan" created="Wed, 19 Sep 2012 13:39:24 +0000"  >&lt;p&gt;@stof&lt;/p&gt;

&lt;p&gt;&amp;gt; Tokenizing the file was the way annotations were handled in 2.0. Doctrine 2.1 switched to using Reflection to read annotation because it is faster.&lt;/p&gt;

&lt;p&gt;And it is obviousely the wrong one. There is no argument, that could beat the fact, that the result can and should be cached, as it does already. Correct behaviour is much more valuable than few miliseconds on first run.&lt;/p&gt;

&lt;p&gt;&amp;gt; I&apos;m wondering why you would have PHPUnit testcases in a path storing entities.&lt;/p&gt;

&lt;p&gt;I don&apos;t. They are base classes for the actual tests. I agree they might (or should) be somewhere else, but the fact, that they should not be executed, when readed, stays.&lt;/p&gt;</comment>
                    <comment id="18685" author="stof" created="Wed, 19 Sep 2012 16:10:00 +0000"  >&lt;p&gt;@Filip The AnnotationReader is not loading any file. It simply expects a ReflectionClass.&lt;br/&gt;
And for the performances, we are talking about running several times faster here (I don&apos;t have the benchmark results anymore but you could search in the merged PRs on Doctrine Common)&lt;/p&gt;

&lt;p&gt;The ORM AnnotationDriver expects a path in which it should look for annotated classes, to be able to implement getAllClasses() (as it cannot expect all classes to be already loaded). And btw, the behavior was the same in 2.0 when the reader was using tokenization.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2030] better way to detect class parents</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2030</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi!&lt;br/&gt;
Currently i&apos;m heavy using doctrine to generate entities starting form database schema (aprox 500 tables with thousand of relations).&lt;/p&gt;

&lt;p&gt;I&apos;m trying to detect some inheritance cases, but there is a problem.&lt;/p&gt;

&lt;p&gt;Doctrine always uses PHP class inheritance to detect entity hierarchy, but generating entities starting from database, i have not yet any php class.&lt;/p&gt;

&lt;p&gt;There is a better way to detect entities hierarchy? Without php classes... &lt;br/&gt;
Mapping files should be self-sufficient, even without php files.&lt;/p&gt;

&lt;p&gt;The practical case is:&lt;br/&gt;
in &lt;tt&gt;DatabaseDriver&lt;/tt&gt; i&apos;m trying to call &lt;tt&gt;$metadata-&amp;gt;addDiscriminatorMapClass($name, $className)&lt;/tt&gt; method, but it raises an exception if &lt;tt&gt;$classNam&lt;/tt&gt; does not exists.&lt;/p&gt;

&lt;p&gt;Even if i manualy create XML mapping files, and then i try to generate php entityes. There is the same problem. &lt;tt&gt;XmlDriver&lt;/tt&gt; tries to call &lt;tt&gt;setDiscriminatorMap&lt;/tt&gt; method that raises the same exception.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14035">DDC-2030</key>
            <summary>better way to detect class parents</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="goetas">Asmir Mustafic</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 Sep 2012 10:59:17 +0000</created>
                <updated>Thu, 13 Sep 2012 10:59:17 +0000</updated>
                                                                    <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2021] Array Data in Member OF</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2021</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi.&lt;br/&gt;
First sorry for my bad english.&lt;br/&gt;
In &lt;br/&gt;
SELECT u.id FROM CmsUser u WHERE :groupId MEMBER OF u.groups&lt;br/&gt;
DQL we can&apos;t use Array of groupId like&lt;/p&gt;</description>
                <environment></environment>
            <key id="14024">DDC-2021</key>
            <summary>Array Data in Member OF</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="vahid4134">vahid sohrabloo</reporter>
                        <labels>
                        <label>array</label>
                        <label>dql</label>
                    </labels>
                <created>Sun, 9 Sep 2012 09:10:02 +0000</created>
                <updated>Sun, 9 Sep 2012 09:10:02 +0000</updated>
                                    <version>2.2.3</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2002] [GH-432] Add DBAL\TypeAwareObject type inference.</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2002</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Romain-Geissler:&lt;/p&gt;

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

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

&lt;p&gt;DBAL allows you to define custom field types for your entities, and those are seamlessly converted from PHP to SQL value. However, you can&apos;t those custom types as parameters without type hinting it :&lt;/p&gt;

&lt;p&gt;```php&lt;br/&gt;
$qb-&amp;gt;select(&apos;e&apos;)&lt;br/&gt;
   -&amp;gt;from(&apos;Entity&apos;, &apos;e&apos;)&lt;br/&gt;
   -&amp;gt;where(&apos;e.customField = :customFieldValue&apos;)&lt;br/&gt;
   -&amp;gt;setParameter(&apos;customFieldValue&apos;,$customFieldValue,$customFieldDBALType);&lt;br/&gt;
   //this third argument is for now compulsory&lt;br/&gt;
:&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;In my case, ``$customFieldValue`` is an object that won&apos;t work well if converted with the default string type. I added a new DBAL interface (see doctrine/dbal#193 ) and tweaked the parameter type inference so that custom values can advertise their DBAL type.&lt;/p&gt;

&lt;p&gt;There is currently no way to dynamically override the parameter type inference logic, this is one design that allows it in some cases. &lt;/p&gt;</description>
                <environment></environment>
            <key id="13997">DDC-2002</key>
            <summary>[GH-432] Add DBAL\TypeAwareObject type inference.</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 29 Aug 2012 16:05:38 +0000</created>
                <updated>Wed, 5 Sep 2012 17:21:34 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18589" author="beberlei" created="Thu, 30 Aug 2012 13:27:31 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-432&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/432&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/432&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2007] [GH-434] allowed to pass filter objects to the configurator</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2007</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of bamarni:&lt;/p&gt;

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

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

&lt;p&gt;If &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-2004&quot; title=&quot;Allowing objects as filters&quot;&gt;&lt;del&gt;DDC-2004&lt;/del&gt;&lt;/a&gt; gets approved.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14004">DDC-2007</key>
            <summary>[GH-434] allowed to pass filter objects to the configurator</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 31 Aug 2012 13:30:27 +0000</created>
                <updated>Wed, 5 Sep 2012 17:18:24 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1999] Lazy loading doesn&apos;t get the field type when generating sql</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1999</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When calling with lazy loading the Sql generated doesn&apos;t convert the parameters according to their types. After debugging the problem I found that the problem is in the getType($field, $value) function in the BasicEntityPersister as it is it will never be able to return the filed type when called for lazy loading for oneToMany or ManyToMany. I put a quick fix for my self&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
 &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; function getType($field, $value)
    {

        &lt;span class=&quot;code-keyword&quot;&gt;switch&lt;/span&gt; (&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;) {
           &lt;span class=&quot;code-comment&quot;&gt;//here we have original code
&lt;/span&gt;            &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;:

            	$type = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
               &lt;span class=&quot;code-comment&quot;&gt;// my fix starts here
&lt;/span&gt;            	$fieldParts = explode(&apos;.&apos;, $field);
            	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (count($fieldParts &amp;gt; 1)) {
	            	foreach ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_class-&amp;gt;associationMappings as $mapping) {
						&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($mapping[&apos;joinColumnFieldNames&apos;][$fieldParts[1]])) {
							$targetClass  = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getClassMetadata($mapping[&apos;targetEntity&apos;]);

							&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($targetClass-&amp;gt;fieldNames[$fieldParts[1]])) {
								$type = $targetClass-&amp;gt;fieldMappings[$targetClass-&amp;gt;fieldNames[$fieldParts[1]]][&apos;type&apos;];
							}

							&lt;span class=&quot;code-keyword&quot;&gt;break&lt;/span&gt;;
						}
	            	}
            	}
&lt;span class=&quot;code-comment&quot;&gt;//my fix end here
&lt;/span&gt;        }

       &lt;span class=&quot;code-comment&quot;&gt;//here we have original code
&lt;/span&gt;
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $type;
    }


&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;i have only added that check in the default case of the switch. I am not sure if that is the most elegant way. I hope that helps and that it will be fixed soon. Thanks for the great work &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.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;</description>
                <environment></environment>
            <key id="13992">DDC-1999</key>
            <summary>Lazy loading doesn&apos;t get the field type when generating sql</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="vigor_bg">victor Velkov</reporter>
                        <labels>
                    </labels>
                <created>Wed, 29 Aug 2012 06:50:27 +0000</created>
                <updated>Wed, 29 Aug 2012 20:15:29 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="18564" author="beberlei" created="Wed, 29 Aug 2012 11:49:20 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=fabio.bat.silva&quot; class=&quot;user-hover&quot; rel=&quot;fabio.bat.silva&quot;&gt;Fabio B. Silva&lt;/a&gt; &lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=guilhermeblanco&quot; class=&quot;user-hover&quot; rel=&quot;guilhermeblanco&quot;&gt;Guilherme Blanco&lt;/a&gt; do we have a current best practice/policy regarding casting of join column types? There are some issues regarding it, this is another one.&lt;/p&gt;</comment>
                    <comment id="18581" author="guilhermeblanco" created="Wed, 29 Aug 2012 20:15:29 +0000"  >&lt;p&gt;We avoid the manual breakdown of path expressions.&lt;br/&gt;
Also, in BasicEntityPersister it is done behind the scenes and can get into weird scenarios. Personally speaking, I don&apos;t see how we can easily fix this issue.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1995] &quot;Query Exception: Invalid parameter number: number of bound variables does not match number of tokens&quot; when using an &quot;Instance Of&quot; expression</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1995</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Similar to &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1848&quot; class=&quot;external-link&quot;&gt;this issue&lt;/a&gt; I think, but triggered when performing a query on entities modelled with Class Table Inheritance, e.g.&lt;/p&gt;

&lt;p&gt;$qb = $repository-&amp;gt;createQueryBuilder(&apos;entity&apos;);&lt;br/&gt;
$metadata = $em-&amp;gt;getClassMetadata($class);&lt;br/&gt;
$qb-&amp;gt;where(&apos;entity INSTANCE OF :type&apos;)-&amp;gt;setParameter(&apos;type&apos;, $metadata);&lt;br/&gt;
$qb-&amp;gt;getQuery()-&amp;gt;execute();&lt;/p&gt;

&lt;p&gt;Seems that there isn&apos;t a corresponding entry in the parameter mapping array for this clause, which triggers the exception at line 254 of Doctrine\ORM\Query:&lt;/p&gt;

&lt;p&gt;if (count($paramMappings) != count($this-&amp;gt;parameters)) &lt;/p&gt;
{
    throw QueryException::invalidParameterNumber();
}</description>
                <environment></environment>
            <key id="13982">DDC-1995</key>
            <summary>&quot;Query Exception: Invalid parameter number: number of bound variables does not match number of tokens&quot; when using an &quot;Instance Of&quot; expression</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="craigmarvelley">Craig Marvelley</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 Aug 2012 14:13:39 +0000</created>
                <updated>Wed, 29 Aug 2012 11:53:15 +0000</updated>
                                    <version>Git Master</version>
                                <fixVersion>Git Master</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="18532" author="craigmarvelley" created="Wed, 22 Aug 2012 14:24:48 +0000"  >&lt;p&gt;Pull request with a potential fix: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/429&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/429&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18566" author="beberlei" created="Wed, 29 Aug 2012 11:53:15 +0000"  >&lt;p&gt;Assigned to Guilherme&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1563] Result cache for repository queries</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1563</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Many related &quot;standing data&quot; tables are very static and seldom change. There should be a metadata config to enable result cache for ALL repository operations.&lt;/p&gt;

&lt;p&gt;@entity(resultCache=@cache(ttl=3600))&lt;/p&gt;</description>
                <environment></environment>
            <key id="13307">DDC-1563</key>
            <summary>Result cache for repository queries</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 25 Dec 2011 11:22:11 +0000</created>
                <updated>Sun, 26 Aug 2012 19:34:52 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17103" author="beberlei" created="Sun, 25 Dec 2011 13:01:47 +0000"  >&lt;p&gt;This should directly support cache invalidation through a tag. Each repository gets a key with the current version. The version is one part ofthe actual cache datas key. &lt;/p&gt;

&lt;p&gt;A new cache key version is generated:&lt;/p&gt;

&lt;p&gt;1. When none is found during find operation&lt;br/&gt;
2. When any write operation is done.&lt;/p&gt;

&lt;p&gt;For transaction consisteny the rollback operation in UoW needs to reset cache keys and only after a succesful commit operation the new cache key version should be set.&lt;/p&gt;

&lt;p&gt;We may need begin, commit, rollback events in UoW for this.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1996] [GH-429] Ensure a parameter mapping entry exists for InstanceOf DQL expressions</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1996</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of craigmarvelley:&lt;/p&gt;

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

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

&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;This is a possible fix for &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1995&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1995&lt;/a&gt;, in that it resolves the issue for me but I&apos;m afraid I haven&apos;t had time to test it extensively with more complex queries than the use case I gave in that ticket.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Craig&lt;/p&gt;</description>
                <environment></environment>
            <key id="13983">DDC-1996</key>
            <summary>[GH-429] Ensure a parameter mapping entry exists for InstanceOf DQL expressions</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 Aug 2012 14:23:10 +0000</created>
                <updated>Wed, 22 Aug 2012 14:23:10 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1993] New method required: ClassMetadataInfo::isAssociationNullable()</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1993</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I&apos;m working with Symfony 2.1, and I need to know if an association is nullable for a given entity (to know if a form field should be marked as &apos;required&apos;). So I&apos;d like to have a &lt;tt&gt;isAssociationNullable()&lt;/tt&gt; method in the &lt;tt&gt;ClassMetadataInfo&lt;/tt&gt; class, that should do the same thing that the &lt;tt&gt;isNullable()&lt;/tt&gt; method does for fields.&lt;/p&gt;

&lt;p&gt;You can see more information about the problem on the &lt;a href=&quot;https://github.com/symfony/symfony/issues/5315&quot; class=&quot;external-link&quot;&gt;Symfony issue&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13980">DDC-1993</key>
            <summary>New method required: ClassMetadataInfo::isAssociationNullable()</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="gregoire_m">gregoire_m</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 Aug 2012 08:24:33 +0000</created>
                <updated>Wed, 22 Aug 2012 08:24:33 +0000</updated>
                                    <version>2.2</version>
                                                <component>Mapping Drivers</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1991] Add parameter indexBy to EntityRepository-&gt;createQueryBuilder()</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1991</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;createQueryBuilder() currently doesn&#8217;t have a parameter to set the third option on the FROM fragment: indexBy. Right now you have to read it, create a new From with the read properties and your desired indexBy value and replace the existing one on the QueryBuilder.&lt;/p&gt;

&lt;p&gt;Should be ten minutes&#8217; work including tests. Thanks a lot!&lt;/p&gt;</description>
                <environment></environment>
            <key id="13977">DDC-1991</key>
            <summary>Add parameter indexBy to EntityRepository-&gt;createQueryBuilder()</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="corphi">Philipp Cordes</reporter>
                        <labels>
                    </labels>
                <created>Mon, 20 Aug 2012 07:52:31 +0000</created>
                <updated>Mon, 20 Aug 2012 07:52:31 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1988] Add Any and ManyToAny annotations</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1988</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It would be really nice to have @Any and @ManyToAny relations/annotations implemented like on Hibernate.&lt;br/&gt;
&lt;a href=&quot;http://docs.jboss.org/hibernate/orm/4.1/javadocs/org/hibernate/annotations/ManyToAny.html&quot; class=&quot;external-link&quot;&gt;http://docs.jboss.org/hibernate/orm/4.1/javadocs/org/hibernate/annotations/ManyToAny.html&lt;/a&gt;&lt;br/&gt;
Right now I&apos;ve implemented these in a Symfony2 bundle (that I&apos;d be happy to share once it&apos;s ready and a bit documented), using listeners on postLoad, preFlush and prePersist&lt;br/&gt;
However I think this is a very common use case that anyone will encounter at least once/twice in every middle/big-sized project, and for this reason I think this should be implemented as a core feature.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13973">DDC-1988</key>
            <summary>Add Any and ManyToAny annotations</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="sroddy">Stefano Rodriguez</reporter>
                        <labels>
                    </labels>
                <created>Sat, 18 Aug 2012 08:50:21 +0000</created>
                <updated>Sat, 18 Aug 2012 09:05:49 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1983] Incorrect use statement in 25.1.3. Configuration example (Doctrine Console)</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1983</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The code example here:&lt;br/&gt;
&lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/tools.html#configuration-non-pear&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/tools.html#configuration-non-pear&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the second &quot;use&quot; statement it references a &quot;EntityManagerHelper&quot; from the &quot;Doctrine\DBAL\Tools\Console\Helper\&quot; package. However, it does not exist there. It does exist in the &quot;Doctrine\ORM\Tools\Console\Helper\&quot; package though, and replacing it seems to work.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13966">DDC-1983</key>
            <summary>Incorrect use statement in 25.1.3. Configuration example (Doctrine Console)</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="atli">Atli Thor Jonsson</reporter>
                        <labels>
                        <label>Cli</label>
                        <label>documentation</label>
                    </labels>
                <created>Wed, 15 Aug 2012 05:58:31 +0000</created>
                <updated>Wed, 15 Aug 2012 05:58:31 +0000</updated>
                                                                    <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1971] [GH-419] Add ODM embedded-like functionality</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1971</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of djlambert:&lt;/p&gt;

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

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

&lt;p&gt;This PR adds ODM embedded-like functionality to the ORM.&lt;/p&gt;

&lt;p&gt;Including the new &lt;b&gt;@MappedAssociation&lt;/b&gt; annotation on a field having a one-to-one association adds a discriminator column to the table for storing the class name of a &quot;mapped&quot; entity.&lt;/p&gt;

&lt;p&gt;This allows a class or mapped superclass with a one-to-one identifying association to be extended by additional entities without requiring any code changes (as is required with the discriminator map when using inheritance).&lt;/p&gt;

&lt;p&gt;I apologize if this is the incorrect way to submit a feature request. Currently just the annotation driver has been updated, I wanted to get feedback before continuing with the remaining drivers. Models and tests are included.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13947">DDC-1971</key>
            <summary>[GH-419] Add ODM embedded-like functionality</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 7 Aug 2012 21:41:06 +0000</created>
                <updated>Tue, 14 Aug 2012 21:33:31 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1972] Throw an exception when setting cascade options which do not exist</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1972</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I made the assumption that the way to define a cascading delete is to do (in YAML):&lt;/p&gt;

&lt;p&gt;cascade: &lt;span class=&quot;error&quot;&gt;&amp;#91;delete&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;When it is actually:&lt;/p&gt;

&lt;p&gt;cascade: &lt;span class=&quot;error&quot;&gt;&amp;#91;remove&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;It would be nice if Doctrine would throw an exception when the user sets a cascade option which does not exist.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13949">DDC-1972</key>
            <summary>Throw an exception when setting cascade options which do not exist</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="5" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/trivial.png">Trivial</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="gzankevich">George Zankevich</reporter>
                        <labels>
                    </labels>
                <created>Wed, 8 Aug 2012 15:20:03 +0000</created>
                <updated>Wed, 8 Aug 2012 15:20:03 +0000</updated>
                                    <version>2.1.6</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1965] Multiple Index fails if index name not specified</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1965</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;@ORM\Table(name=&quot;applications&quot;, indexes={@ORM\Index(name=&quot;csl_idx&quot;, columns=&lt;/p&gt;
{&quot;createdAt&quot;, &quot;status&quot;, &quot;loanType&quot;}), @ORM\Index(name=&quot;s_idx&quot;, columns={&quot;status&quot;}), @ORM\Index(name=&quot;l_idx&quot;, columns={&quot;loanType&quot;})})&lt;br/&gt;
&lt;br/&gt;
the above Annotation creates 3 different indexes BUT when: &lt;br/&gt;
* @ORM\Table(name=&quot;applications&quot;, indexes={@ORM\Index(columns={&quot;createdAt&quot;, &quot;status&quot;, &quot;loanType&quot;}
&lt;p&gt;), @ORM\Index(columns=&lt;/p&gt;
{&quot;status&quot;}
&lt;p&gt;), @ORM\Index(columns=&lt;/p&gt;
{&quot;loanType&quot;}
&lt;p&gt;)})&lt;/p&gt;

&lt;p&gt;index-names not specified Symfony2 schemaUpdate tools shows only the last Index&lt;/p&gt;
</description>
                <environment>Ubuntu 11.04, PHP 5.3.6 with Suhosin-patch, Symfony 2.0.15</environment>
            <key id="13906">DDC-1965</key>
            <summary>Multiple Index fails if index name not specified</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="pont">Pont</reporter>
                        <labels>
                        <label>Cli</label>
                    </labels>
                <created>Thu, 2 Aug 2012 07:17:04 +0000</created>
                <updated>Thu, 2 Aug 2012 07:17:04 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1459] Move DDC-331, DDC-448, DDC-493, DDC-513, DDC-698 Tests into SQLGeneration Testsuite</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1459</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="13131">DDC-1459</key>
            <summary>Move DDC-331, DDC-448, DDC-493, DDC-513, DDC-698 Tests into SQLGeneration Testsuite</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 29 Oct 2011 17:06:43 +0000</created>
                <updated>Wed, 1 Aug 2012 21:04:34 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1963] Remove by-ref access to changeset in lifecycle event args</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1963</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;UoW currently passes computed changesets to lifecycle event args byref. This has to be changed to force users to use UoW public API to modify changesets instead.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13903">DDC-1963</key>
            <summary>Remove by-ref access to changeset in lifecycle event args</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="ocramius">Marco Pivetta</reporter>
                        <labels>
                    </labels>
                <created>Tue, 31 Jul 2012 15:45:24 +0000</created>
                <updated>Tue, 31 Jul 2012 15:45:24 +0000</updated>
                                                    <fixVersion>Git Master</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1957] DB -&gt; Entity: Reverse engeniering with two relations between two tables</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1957</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;i use the cli from the symfony 2.1 project to reverse from DB to Entity:&lt;/p&gt;

&lt;p&gt;php app/console doctrine:mapping:convert xml ./src/Acme/StoreBundle/Resources/config/doctrine/metadata/orm --from-database --force&lt;/p&gt;

&lt;p&gt;and i get tis error:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;Doctrine\ORM\Mapping\MappingException&amp;#93;&lt;/span&gt;&lt;br/&gt;
Property &quot;radUser&quot; in &quot;RadAttribute&quot; was already declared, but it must be declared only once&lt;/p&gt;

&lt;p&gt;so i have a table &quot;radUser&quot; with two m:n relations to the same table &quot;radAttributes&quot;:&lt;/p&gt;

&lt;p&gt;Table radUser:&lt;br/&gt;
check =&amp;gt; radAttributes&lt;br/&gt;
reply =&amp;gt; radAttributes&lt;/p&gt;

&lt;p&gt;so doctrine reverse mapping try to generate the radAttribute entity with two mapping to radUser with the same field name &quot;radUser&quot;, what can i do to prevent this issue ?&lt;/p&gt;</description>
                <environment>windows 7, php 5.3, symfony 2.1</environment>
            <key id="13895">DDC-1957</key>
            <summary>DB -&gt; Entity: Reverse engeniering with two relations between two tables</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="skydiablo">sky diablo</reporter>
                        <labels>
                        <label>Cli</label>
                    </labels>
                <created>Sun, 29 Jul 2012 16:13:10 +0000</created>
                <updated>Sun, 29 Jul 2012 16:14:25 +0000</updated>
                                    <version>2.2</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1954] Specialized Batch Insert Mode for the Entity Manager</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1954</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;While it is already possible to speed up batch inserts by using raw SQL, that has the disadvantage to maintain a separate set of code that needs to be kept in sync with your schema.&lt;/p&gt;

&lt;p&gt;Therefore, it would be nice if the entity manager would provide a special batch insert mode where it can skip the change tracking related features, collection snapshots, etc. This might already be good enough for many people.&lt;/p&gt;
</description>
                <environment></environment>
            <key id="13892">DDC-1954</key>
            <summary>Specialized Batch Insert Mode for the Entity Manager</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="johannes">Johannes Schmitt</reporter>
                        <labels>
                    </labels>
                <created>Sun, 29 Jul 2012 11:35:32 +0000</created>
                <updated>Sun, 29 Jul 2012 11:35:32 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1952] Add support for array parameters on the SQLFilter</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1952</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The SQLFilter currently only accepts string parameters which would result in SQL like:&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;&quot;tableAlias.column = &apos;$filterParameter&apos;&quot;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To filter an Entity that has a lifecycle, this can be usefull to filter Entities that are in a specific state, for example:&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;&quot;tableAlias.state = 1&quot;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To be able to apply the filter on an Entity that can be in multiple states, it is usefull to be able to assign an array of states using setParameter:&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;$allowedStates = array(1,2,3,4);
$filter-&amp;gt;setParameter(&apos;allowedStatesParam&apos;, $allowedStates);
sprintf(&quot;tableAlias.state IN (%s)&quot;, implode(&apos;,&apos;, $this-&amp;gt;getParameter(&apos;allowedStatesParam&apos;)));
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;to eventually result in:&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;&quot;tableAlias.state IN (1,2,3,4)&quot;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However, this is currently not supported, it seems to go wrong on the PDO::quote() of the parameter. The SQL works ok when setting it statically in the filter, not taking the parameter into account.&lt;/p&gt;

&lt;p&gt;It would be nice to have support for arrays on the setParameter()&lt;/p&gt;</description>
                <environment></environment>
            <key id="13888">DDC-1952</key>
            <summary>Add support for array parameters on the SQLFilter</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="holtkamp">Menno Holtkamp</reporter>
                        <labels>
                    </labels>
                <created>Fri, 27 Jul 2012 14:26:52 +0000</created>
                <updated>Fri, 27 Jul 2012 14:26:52 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>3</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1950] Useful exception when combining Column with ManyToOne</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1950</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When applying both @Column and @ManyToOne annotations to a field, it blows up with crazy internal errors. It would be great if this case &amp;#8211; and similar cases &amp;#8211; could throw a nice exception which tells the user what he did wrong.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13886">DDC-1950</key>
            <summary>Useful exception when combining Column with ManyToOne</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="igorw">Igor Wiedler</reporter>
                        <labels>
                    </labels>
                <created>Thu, 26 Jul 2012 20:10:42 +0000</created>
                <updated>Thu, 26 Jul 2012 20:10:42 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1947] Update EBNF with arbitrary joins</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1947</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Arbitrary joins need to be documented in EBNF&lt;/p&gt;</description>
                <environment></environment>
            <key id="13883">DDC-1947</key>
            <summary>Update EBNF with arbitrary joins</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="ocramius">Marco Pivetta</reporter>
                        <labels>
                    </labels>
                <created>Thu, 26 Jul 2012 12:10:35 +0000</created>
                <updated>Thu, 26 Jul 2012 12:10:35 +0000</updated>
                                    <version>2.3</version>
                <version>Git Master</version>
                                                <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1924] Let SQLFilters know the query type it is being applied to</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1924</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;m making an access control system and would like to automatically filter all queries based current user, targetEntity type and query type. Query type is relevant as different permissions are needed by the user for SELECT, UPDATE, DELETE and INSERT queries.&lt;/p&gt;

&lt;p&gt;I can access the first two things in my filter easily enough, but I cannot find a way to have the filter know what type of query the filter is being applied to.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13851">DDC-1924</key>
            <summary>Let SQLFilters know the query type it is being applied to</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="4" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="shne">Jan Knudsen</reporter>
                        <labels>
                    </labels>
                <created>Fri, 13 Jul 2012 09:23:12 +0000</created>
                <updated>Fri, 13 Jul 2012 10:59:35 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="18301" author="beberlei" created="Fri, 13 Jul 2012 09:42:32 +0000"  >&lt;p&gt;The Filter API only makes sense for SELECT clauses. Doctrine itself does not use DQL to do updates internally, so you need to use other mechanisms (EventListener) to prevent this operations if they are not allowed for a user.&lt;/p&gt;</comment>
                    <comment id="18302" author="shne" created="Fri, 13 Jul 2012 09:51:55 +0000"  >&lt;p&gt;But I can make custom DQL to update rows and would like to automatically filter this too.&lt;/p&gt;

&lt;p&gt;e.g. $em-&amp;gt;createQuery(&quot;UPDATE SomeEntity se SET se.field = &quot;updated!&quot;)-&amp;gt;execute();&lt;/p&gt;

&lt;p&gt;The lifecycle events preUpdate etc. are not called when doing custom DQL queries.&lt;/p&gt;

&lt;p&gt;Maybe it is bad practice and discouraged to do updates, inserts and deletes as custom DQL queries, but I would like to ensure that the other people in my organization can&apos;t accidentally bypass the Access Control, even if they make use of such bad practice.&lt;/p&gt;

&lt;p&gt;And if the filter API only makes sense for Select statements, why are filters applied to update/delete/etc. statements too?&lt;/p&gt;</comment>
                    <comment id="18304" author="beberlei" created="Fri, 13 Jul 2012 10:41:38 +0000"  >&lt;p&gt;Well, they are applied to DQL UPDATE/DELETE. But not not UPDATE/DELETE that works through the internals of Doctrine. So yes, you can use it to filter DQL DELETE/UPDATE, but doctrine does not do that internally.&lt;/p&gt;

&lt;p&gt;So you have to have two strategies, a DQL/SQL Filter - and Lifecycle events.&lt;/p&gt;</comment>
                    <comment id="18305" author="shne" created="Fri, 13 Jul 2012 10:59:19 +0000"  >&lt;p&gt;Which is fine by me. I already implemented the checks using lifecycle events before opening this issue. The access control is automatically handled when using the entitymanager and not custom DQL.&lt;/p&gt;

&lt;p&gt;Now I would also like to filter the custom DQL, but currently I can&apos;t, because as originally stated, the filter needs to know which type of query it is being applied to.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-972] MySql MyISAM support</title>
                <link>http://doctrine-project.org/jira/browse/DDC-972</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;We can not set MySql Engine for MyISAM. MySqlPlatform has a _getCreateTableSQL where you can pass some options with the engine param.&lt;br/&gt;
Not able to set it up from yml, xml or annotation schema.&lt;/p&gt;</description>
                <environment>All</environment>
            <key id="12284">DDC-972</key>
            <summary>MySql MyISAM support</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="nisnardi">nicolas isnardi</reporter>
                        <labels>
                    </labels>
                <created>Fri, 7 Jan 2011 18:25:07 +0000</created>
                <updated>Fri, 13 Jul 2012 09:53:50 +0000</updated>
                                    <version>2.0</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="15866" author="cedrictailly" created="Thu, 19 May 2011 10:55:00 +0000"  >&lt;p&gt;I have the same problem and I didn&apos;t found documentation to select the engine for a given table.&lt;/p&gt;

&lt;p&gt;I tried to understand the code by myself and made modifications of my Doctrine v2.0.5, perhaps this is not the best one but here is a beginning of a solution :&lt;/p&gt;

&lt;p&gt;-------------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;@ ORM\Mapping\Driver\DoctrineAnnotations.php:100&lt;/p&gt;

&lt;p&gt;  final class Table extends Annotation &lt;/p&gt;
{
      public $name;
      public $schema;
      public $indexes;
      public $uniqueConstraints;
      public $engine;
  }

&lt;p&gt;@ ORM\Mapping\Driver\AnnotationDriver.php:144&lt;/p&gt;

&lt;p&gt;  $primaryTable = array(&lt;br/&gt;
      &apos;name&apos; =&amp;gt; $tableAnnot-&amp;gt;name,&lt;br/&gt;
      &apos;schema&apos; =&amp;gt; $tableAnnot-&amp;gt;schema,&lt;br/&gt;
      &apos;engine&apos; =&amp;gt; $tableAnnot-&amp;gt;engine&lt;br/&gt;
  );&lt;/p&gt;

&lt;p&gt;@ ORM\Tools\SchemaTool.php:133&lt;/p&gt;

&lt;p&gt;  $table = $schema-&amp;gt;createTable($class-&amp;gt;getQuotedTableName($this-&amp;gt;_platform));&lt;/p&gt;

&lt;p&gt;  if ( isset($class-&amp;gt;table&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;engine&amp;quot;&amp;#93;&lt;/span&gt;) )&lt;br/&gt;
    $table-&amp;gt;addOption(&quot;engine&quot;,$class-&amp;gt;table&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;engine&amp;quot;&amp;#93;&lt;/span&gt;);&lt;/p&gt;

&lt;p&gt;-------------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;...and to define for instance the MyISAM engine in annotations :&lt;/p&gt;

&lt;p&gt;  /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@Entity&lt;/li&gt;
	&lt;li&gt;@Table(engine=&quot;MyISAM&quot;)&lt;br/&gt;
   */&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Because there is no foreign key on MyISAM tables, there are still problems on the schema creation/update when Doctrine executes the corresponding &quot;alter table&quot; SQL commands.&lt;/p&gt;</comment>
                    <comment id="18298" author="gabrielnn77" created="Thu, 12 Jul 2012 13:34:20 +0000"  >&lt;p&gt;in Doctrine 2.2.2 will be&lt;/p&gt;

&lt;p&gt;Doctrine/ORM/Tools/SchemaTool.php-149-                  ///     PATCH   ------------------------------------&lt;br/&gt;
Doctrine/ORM/Tools/SchemaTool.php-150-                  if ( isset($class-&amp;gt;table&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;engine&amp;quot;&amp;#93;&lt;/span&gt;) )&lt;br/&gt;
Doctrine/ORM/Tools/SchemaTool.php-151-                          $table-&amp;gt;addOption(&quot;engine&quot;,$class-&amp;gt;table&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;engine&amp;quot;&amp;#93;&lt;/span&gt;);&lt;br/&gt;
Doctrine/ORM/Tools/SchemaTool.php-152-                  ///     PATCH   ------------------------------------&lt;/p&gt;


&lt;p&gt;Doctrine/ORM/Mapping/ClassMetadataInfo.php-1719-                ///     PATCH   ------------------------------------&lt;br/&gt;
Doctrine/ORM/Mapping/ClassMetadataInfo.php-1720-                if (isset($table&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;engine&amp;#39;&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
Doctrine/ORM/Mapping/ClassMetadataInfo.php-1721-                        $this-&amp;gt;table[&apos;engine&apos;] = $table[&apos;engine&apos;];
Doctrine/ORM/Mapping/ClassMetadataInfo.php-1722-                }
&lt;p&gt;Doctrine/ORM/Mapping/ClassMetadataInfo.php-1723-                ///     PATCH   ------------------------------------&lt;/p&gt;


&lt;p&gt;Doctrine/ORM/Mapping/Table.php-42-      ///     PATCH   ------------------------------------&lt;br/&gt;
Doctrine/ORM/Mapping/Table.php-43-      /** @var string */&lt;br/&gt;
Doctrine/ORM/Mapping/Table.php-44-    public $engine;&lt;br/&gt;
Doctrine/ORM/Mapping/Table.php-45-      ///     PATCH   ------------------------------------&lt;/p&gt;


&lt;p&gt;Doctrine/ORM/Mapping/Driver/AnnotationDriver.php-181-                   ///     PATCH   ------------------------------------&lt;br/&gt;
Doctrine/ORM/Mapping/Driver/AnnotationDriver.php-182-                   $primaryTable&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;engine&amp;#39;&amp;#93;&lt;/span&gt; = $tableAnnot-&amp;gt;engine;&lt;br/&gt;
Doctrine/ORM/Mapping/Driver/AnnotationDriver.php-183-                   ///     PATCH   ------------------------------------&lt;/p&gt;


&lt;p&gt;i found a problem in ManyToMany relations, the intermediate table will be InnoDB&lt;/p&gt;</comment>
                    <comment id="18299" author="beberlei" created="Fri, 13 Jul 2012 08:23:21 +0000"  >&lt;p&gt;You can do all tables as MyISAM already through metadata using @Table(options=&lt;/p&gt;
{&quot;engine&quot;: &quot;MyISAM&quot;}
&lt;p&gt;) except Many-To-Many Join Tables. But you could create a listener to the &quot;postSchemaGenerate&quot; event and accept the schema instance there, modify everything accordingly.&lt;/p&gt;</comment>
                    <comment id="18300" author="stof" created="Fri, 13 Jul 2012 08:50:47 +0000"  >&lt;p&gt;should we add the support of the options for the @JoinTable annotation ?&lt;/p&gt;</comment>
                    <comment id="18303" author="beberlei" created="Fri, 13 Jul 2012 09:53:50 +0000"  >&lt;p&gt;Yes, that is probably what this ticket boils down to &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.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;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1923] Type conversion error with oracle</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1923</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;a href=&quot;https://github.com/symfony/symfony/pull/4730&quot; class=&quot;external-link&quot;&gt;https://github.com/symfony/symfony/pull/4730&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13850">DDC-1923</key>
            <summary>Type conversion error with oracle</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="asm89">Alexander</reporter>
                        <labels>
                    </labels>
                <created>Thu, 12 Jul 2012 10:40:41 +0000</created>
                <updated>Thu, 12 Jul 2012 10:40:41 +0000</updated>
                                                                            <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1921] Clarify Identifier definition for CTI entities</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1921</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;Reference Guide topic 4.8 Identifers/Primary Keys(&lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#identifiers-primary-keys&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#identifiers-primary-keys&lt;/a&gt;) states that: &quot;Every entity class needs an identifier/primary key.&quot;&lt;/p&gt;

&lt;p&gt;However, example in topic 7.3. Class Table Inheritance (&lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/inheritance-mapping.html#class-table-inheritance&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/inheritance-mapping.html#class-table-inheritance&lt;/a&gt;) doesn&apos;t contain any definitions for Ids.&lt;/p&gt;

&lt;p&gt;Consider following code:&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;
/**
 * @Entity
 * @InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;JOINED&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;person&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;Person&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;employee&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;Employee&quot;&lt;/span&gt;})
 */
class Person
{
    /** @Id @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;) */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getId() {
        &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;id;
    }
}

/** @Entity */
class Employee &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Person
{
    /** @Id @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;) */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;

    &lt;span class=&quot;code-comment&quot;&gt;// Overrides parent to retrieve &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt;
&lt;/span&gt;    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getId() {
        &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;id;
    }
}

&lt;span class=&quot;code-comment&quot;&gt;// create instances and $em-&amp;gt;persist(...)
&lt;/span&gt;
&lt;span class=&quot;code-comment&quot;&gt;// $person &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; Person
&lt;/span&gt;$person-&amp;gt;getId(); &lt;span class=&quot;code-comment&quot;&gt;// Returns id.
&lt;/span&gt;
&lt;span class=&quot;code-comment&quot;&gt;// $employee &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; Employee
&lt;/span&gt;$employee-&amp;gt;getId(); &lt;span class=&quot;code-comment&quot;&gt;// Returns &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;. Private $id in subclass isn&apos;t assigned.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Please clarify correct use of identifiers in CTI subclass entities. Should subclasses contain any definitions of identifiers?&lt;/p&gt;

&lt;p&gt;Thank you!&lt;/p&gt;

&lt;p&gt;Ludek&lt;/p&gt;</description>
                <environment></environment>
            <key id="13847">DDC-1921</key>
            <summary>Clarify Identifier definition for CTI entities</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="i3ncls">Ludek Stepan</reporter>
                        <labels>
                    </labels>
                <created>Wed, 11 Jul 2012 13:05:29 +0000</created>
                <updated>Wed, 11 Jul 2012 13:08:48 +0000</updated>
                                                                    <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1916] Centralize the Cache mechanism simplifying the query creation</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1916</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;in a big project if you have queries spread out in different&lt;br/&gt;
repositories,&lt;br/&gt;
when you have to modify a cache lifetime, you have to search the query and&lt;br/&gt;
modify the code, than test it.&lt;br/&gt;
Is not so easy also to answer to  &apos;how much is the cache for the query XYZ?&apos; &lt;/p&gt;

&lt;p&gt;the idea:&lt;br/&gt;
Each group of repository (bundle) should have in a single point maybe into its config file a place where you could set the lifetime of the various queries. &lt;/p&gt;

&lt;p&gt;see the code for a better explanation&lt;br/&gt;
&lt;a href=&quot;https://gist.github.com/3075742&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/3075742&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;the pro: a better handling of the cache mechanism&lt;br/&gt;
cons: ?&lt;/p&gt;

&lt;p&gt;Do you think is a good approach?&lt;br/&gt;
Have you ever had a similar problem?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;liuggio&lt;/p&gt;</description>
                <environment></environment>
            <key id="13834">DDC-1916</key>
            <summary>Centralize the Cache mechanism simplifying the query creation</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="liuggio">liuggio</reporter>
                        <labels>
                    </labels>
                <created>Mon, 9 Jul 2012 13:02:07 +0000</created>
                <updated>Mon, 9 Jul 2012 13:15:49 +0000</updated>
                                                                    <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1899] [GH-385] set metadata for interface to be able to fetch entites by interface name</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1899</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Burgov:&lt;/p&gt;

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

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

&lt;p&gt;using the new ResolveTargetEntity functionality we noticed we needed another feature:&lt;/p&gt;

&lt;p&gt;From the Symfony Bundle defining the interface, we&apos;d like to be able to fetch entities by this very interface name, e.g.:&lt;/p&gt;

&lt;p&gt;``` php&lt;br/&gt;
$em-&amp;gt;find(&apos;Foo\BarBundle\Entity\PersonInterface&apos;, 1);&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;p&gt;``` php&lt;br/&gt;
$em-&amp;gt;getRepository(&apos;Foo\BarBundle\Entity\PersonInterface&apos;)-&amp;gt;findAll();&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;This PR sets metadata for the interface when metadata for a class is loaded that the interface is configured for&lt;/p&gt;</description>
                <environment></environment>
            <key id="13808">DDC-1899</key>
            <summary>[GH-385] set metadata for interface to be able to fetch entites by interface name</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 29 Jun 2012 10:22:55 +0000</created>
                <updated>Sat, 7 Jul 2012 15:02:12 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1913] Updates for Fedora packaging</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1913</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am packaging the DoctrineDBAL PEAR package for Fedora and would like to have the following updates:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;package.xml role for LICENSE changed from &quot;data&quot; to &quot;doc&quot;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;package.xml role for UPGRADE* changed from &quot;data&quot; to &quot;doc&quot;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;package.xml role for Doctrine/ORM/README.markdown changed from &quot;data&quot; to &quot;doc&quot;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;add some content to Doctrine/ORM/README.markdown (when building RPM this file throws a warning because it is empty)&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;doctrine.bat should only be installed on Windows OS&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment>Fedora</environment>
            <key id="13830">DDC-1913</key>
            <summary>Updates for Fedora packaging</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="siwinski">Shawn Iwinski</reporter>
                        <labels>
                    </labels>
                <created>Sat, 7 Jul 2012 03:40:25 +0000</created>
                <updated>Sat, 7 Jul 2012 03:56:52 +0000</updated>
                                    <version>2.2.2</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1602] Executors for Class Table Inheritance (JOINED) are extremely slow on MySQL</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1602</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Update and delete executors for Class Table Inheritance (JOINED) are extremely slow on MySQL platform. It is most probably due to use of subselect on the temporary table.&lt;br/&gt;
The slowdown is really significant as the table size increases. As an example, lets have a root entity with one subclass:&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;/**
 * @Entity
 * @InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;JOINED&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;root&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;Root&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;a&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;SubA&quot;&lt;/span&gt;})
 */
class Root
{
	/**
	 * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
	 * @Id
	 * @GeneratedValue
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;

	/**
	 * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $xyz;
}
&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;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * @Entity
 */
class SubA &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Root
{
	/**
	 * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $foo;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now lets perform a simple DQL UPDATE:&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;UPDATE Entities\Root r SET r.xyz = 123 WHERE r.id &amp;gt; ?
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;(note: always the upper half of entries)&lt;br/&gt;
Which creates following SQLs:&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;CREATE TEMPORARY TABLE Root_id_tmp (id INT NOT NULL)
INSERT INTO Root_id_tmp (id) SELECT t0.id FROM Root t0 LEFT JOIN SubA s0_ ON t0.id = s0_.id WHERE t0.id &amp;gt; 25000
UPDATE Root SET xyz = 123 WHERE (id) IN (SELECT id FROM Root_id_tmp)
DROP TEMPORARY TABLE Root_id_tmp
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The time spent on this on MySQL 5.5.17 and PostgreSQL 9.1 is:&lt;/p&gt;

&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; no. of entries &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 500   &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 1000  &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 2500 &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 5000 &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 10000 &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 20000 &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 50000 &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; &lt;b&gt;MySQL&lt;/b&gt;             &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.26s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;  0.35s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 1.1s  &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 3.68s  &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 14.13s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 54.44s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 338s &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; &lt;b&gt;PostgreSQL&lt;/b&gt;   &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.10s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.10s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.13s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.15s  &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.22s   &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.35s   &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 1.01s &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;


&lt;p&gt;As you can see, MySQL is drastically slower on even relatively small tables. This currently makes Doctrine unusable for this type of inheritance on MySQL. The solution probably would be to avoid subselect in WHERE clause in Doctrine\ORM\Query\Exec\MultiTableUpdateExecutor and Doctrine\ORM\Query\Exec\MultiTableDeleteExecutor.&lt;/p&gt;

&lt;p&gt;Feel free to try/modify the test script yourself, it&apos;s &lt;a href=&quot;https://github.com/Majkl578/doctrine2-slow-executors&quot; class=&quot;external-link&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</description>
                <environment>Debian, MySQL 5.5.17</environment>
            <key id="13362">DDC-1602</key>
            <summary>Executors for Class Table Inheritance (JOINED) are extremely slow on MySQL</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="majkl578">Michael Moravec</reporter>
                        <labels>
                    </labels>
                <created>Sun, 15 Jan 2012 19:45:05 +0000</created>
                <updated>Wed, 27 Jun 2012 17:57:43 +0000</updated>
                                    <version>2.2-BETA2</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>3</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="17269" author="beberlei" created="Sun, 15 Jan 2012 22:59:14 +0000"  >&lt;p&gt;Its not a bug as it works. The performance drawback of JTI is discussed in the manual &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.1/en/reference/inheritance-mapping.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.1/en/reference/inheritance-mapping.html&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Changing this would be an improvement where we would hint if databases prefer subselects or joins for different operations. This would increase complexity of the SQL generation since now we are getting along with just one SQL generation strategy.&lt;/p&gt;</comment>
                    <comment id="17938" author="majkl578" created="Fri, 11 May 2012 11:02:42 +0000"  >&lt;p&gt;Any chance to get this implemented before 2.3?&lt;/p&gt;</comment>
                    <comment id="17939" author="majkl578" created="Fri, 11 May 2012 14:03:31 +0000"  >&lt;p&gt;I&apos;ve made a change in DBAL and ORM code to implement a solution issue. It&apos;s currently more likely a proof of concept.&lt;/p&gt;

&lt;p&gt;With the change, my results are (approximately):&lt;/p&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; no. of entries &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 500   &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 1000  &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 2500 &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 5000 &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 10000 &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 20000 &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 50000 &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; &lt;b&gt;MySQL&lt;/b&gt;             &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.17s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;  0.19s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.21s  &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.26s  &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.27s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.37s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.92s &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;


&lt;p&gt;Currently only update executor was changed.&lt;br/&gt;
DBAL branch with changes: &lt;a href=&quot;https://github.com/Majkl578/doctrine-dbal/tree/DDC-1602&quot; class=&quot;external-link&quot;&gt;https://github.com/Majkl578/doctrine-dbal/tree/DDC-1602&lt;/a&gt;&lt;br/&gt;
ORM branch with changes: &lt;a href=&quot;https://github.com/Majkl578/doctrine2/tree/DDC-1602&quot; class=&quot;external-link&quot;&gt;https://github.com/Majkl578/doctrine2/tree/DDC-1602&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking forward for your opinions.&lt;/p&gt;</comment>
                    <comment id="18148" author="majkl578" created="Wed, 27 Jun 2012 17:57:43 +0000"  >&lt;p&gt;bump&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1894] Cannot view Doctrine 2.2 QueryBuilder documentation</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1894</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Visiting the following page:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/api/orm/2.2/class-Doctrine.ORM.QueryBuilder.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/api/orm/2.2/class-Doctrine.ORM.QueryBuilder.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;always redirects back to &lt;a href=&quot;http://www.doctrine-project.org/api/orm/2.2/&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/api/orm/2.2/&lt;/a&gt;&lt;/p&gt;</description>
                <environment>Chrome, Firefox, Safari on OS X</environment>
            <key id="13803">DDC-1894</key>
            <summary>Cannot view Doctrine 2.2 QueryBuilder documentation</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="dteoh">Douglas Teoh</reporter>
                        <labels>
                    </labels>
                <created>Wed, 27 Jun 2012 06:09:24 +0000</created>
                <updated>Wed, 27 Jun 2012 06:09:24 +0000</updated>
                                    <version>2.2</version>
                                                <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1484] GH-162: ProxyFactory creates proxy&apos;s parent structure if it doesn&apos;t exist</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1484</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Pull-Request was automatically synchronized: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/162&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/162&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wheeee, nested proxies can be generated without hassle!&lt;/p&gt;</description>
                <environment></environment>
            <key id="13163">DDC-1484</key>
            <summary>GH-162: ProxyFactory creates proxy&apos;s parent structure if it doesn&apos;t exist</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 8 Nov 2011 23:50:39 +0000</created>
                <updated>Tue, 26 Jun 2012 20:40:34 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16802" author="beberlei" created="Sun, 13 Nov 2011 15:47:40 +0000"  >&lt;p&gt;Marked as improvement&lt;/p&gt;</comment>
                    <comment id="18090" author="beberlei" created="Sat, 16 Jun 2012 07:55:43 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-162&amp;#93;&lt;/span&gt; was opened&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/dbal/pull/162&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/162&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18143" author="beberlei" created="Tue, 26 Jun 2012 20:40:33 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-162&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/dbal/pull/162&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/162&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1888] generate hydrators</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1888</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;To improve performance we should consider generate custom hydrators per entity or per rsm.&lt;/p&gt;

&lt;p&gt;I think that will create a huge performance improvement, avoiding checks every time that an entity/result is hydrated.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13795">DDC-1888</key>
            <summary>generate hydrators</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="fabio.bat.silva">Fabio B. Silva</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Jun 2012 13:39:38 +0000</created>
                <updated>Thu, 21 Jun 2012 13:39:38 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1882] AbstractQuery#getResultCacheId() should be public to be able to manage the cache</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1882</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The method getResultCacheId of Doctrine\ORM\AbstractQuery should be public.&lt;/p&gt;

&lt;p&gt;I&apos;m trying to customize the cache refresh mechanism to clear previously cached objects in my app.&lt;br/&gt;
To do that I&apos;m adding a prefix to define regions in the cache.&lt;br/&gt;
To be able to set the Id&apos;s correctly (adding region prefixes) I need to get the &quot;normal&quot; hash doctrine were used in the normal scenario (trying to avoid introduce new code).&lt;br/&gt;
That&apos;s why I will prefer the method to be public.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13788">DDC-1882</key>
            <summary>AbstractQuery#getResultCacheId() should be public to be able to manage the cache</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="ignaciolarranaga">Ignacio Larranaga</reporter>
                        <labels>
                    </labels>
                <created>Tue, 19 Jun 2012 17:37:43 +0000</created>
                <updated>Tue, 19 Jun 2012 17:38:39 +0000</updated>
                                    <version>2.1.6</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="18099" author="ignaciolarranaga" created="Tue, 19 Jun 2012 17:38:39 +0000"  >&lt;p&gt;Attaching the patch despite is a trivial change.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11198" name="AbstractQuery.patch" size="762" author="ignaciolarranaga" created="Tue, 19 Jun 2012 17:38:39 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1860] Make usage of Composer for CLI optional</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1860</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;There&apos;s two problems with current CLI implementation:&lt;/p&gt;

&lt;p&gt; 1 - composer `autoload.php` file is hardcoded, which means that it is making assumptions about where `doctrine/orm` has been installed, and it also makes the assumption that `doctrine/orm` is not the main package.&lt;br/&gt;
 2 - composer is a requirement, while requiring it should just fail silently and allow the end user to use his own autoloading strategy&lt;/p&gt;</description>
                <environment></environment>
            <key id="13763">DDC-1860</key>
            <summary>Make usage of Composer for CLI optional</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="ocramius">Marco Pivetta</reporter>
                        <labels>
                    </labels>
                <created>Sat, 9 Jun 2012 09:06:53 +0000</created>
                <updated>Sat, 9 Jun 2012 12:56:33 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18072" author="ocramius" created="Sat, 9 Jun 2012 12:56:33 +0000"  >&lt;p&gt;Merged at &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/365&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/365&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1729] Translate queries into graphs of value objects (instead of array hydration?)</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1729</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In decoupled applications the model layer returns &quot;data-transfer-objects&quot; through the boundary into the controller/view layer. It would make sense to have Doctrine directly generate any data-transfer/value-object from native and dql queries.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13564">DDC-1729</key>
            <summary>Translate queries into graphs of value objects (instead of array hydration?)</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 27 Mar 2012 22:35:35 +0000</created>
                <updated>Sat, 9 Jun 2012 11:26:40 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="18067" author="beberlei" created="Sat, 9 Jun 2012 11:26:40 +0000"  >&lt;p&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-java&quot;&gt;$dql = &quot;SELECT &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; CustomerAddressView(c.id, c.name, a.id, a.street, a.number, a.city, a.code)
             FROM Customer c INNER JOIN c.address a WHERE c.id = ?1&quot;;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This supersedes &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1819&quot; title=&quot;Allow ResultSetMapping to be used for objects that are not entities&quot;&gt;DDC-1819&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;1. One additional property in ResultSetMapping =&amp;gt; $viewModelClass?&lt;br/&gt;
2. Changes to Parser (new ... syntax)&lt;br/&gt;
3. Changes to sQL Walker?&lt;br/&gt;
4. Changes to Hydration (Only object hydration!)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1847] Do not check for type equality in scalars when computing changeset?</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1847</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Decimal type in mysql converts as a string in php. This is great as Decimal has a much higher precision than a float or double and that precision would be lost if converted to a float in PHP. Fine! But when doing calculations (as my numbers do not require an enormous precision gmp_ functions are not necessary) php converts these strings into floats. Then, when computing the changeset, as the value is compared with === is marked as a change even though there is none (&quot;5.00&quot; string vs 5.00 float) and an UPDATE for that row is made. Would it be possible to check only for simple equality &quot;==&quot; instead of type equality &quot;===&quot; when dealing with scalar types?&lt;/p&gt;

&lt;p&gt;Another example of this would be the boolean type, that it is stored as an integer 1 in mysql but converted to a boolean true in php. If during the execution of my code that boolean gets converted to an integer 1, that will trigger an UPDATE also because 1 !== true.&lt;/p&gt;

&lt;p&gt;Should this be my responsability or doctrine should be a little more flexible regarding comparisons? Thanks!!&lt;/p&gt;</description>
                <environment></environment>
            <key id="13743">DDC-1847</key>
            <summary>Do not check for type equality in scalars when computing changeset?</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="acasademont">Albert Casademont</reporter>
                        <labels>
                    </labels>
                <created>Wed, 30 May 2012 15:28:40 +0000</created>
                <updated>Fri, 8 Jun 2012 13:08:49 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18057" author="ocramius" created="Fri, 8 Jun 2012 07:14:37 +0000"  >&lt;p&gt;Hi there!&lt;br/&gt;
Actually, doctrine orm converts floats from DB string to double at &lt;a href=&quot;https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Types/FloatType.php#L52&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Types/FloatType.php#L52&lt;/a&gt; . Keeping the correct type in for your fields is up to you, so be sure to cast in every setter &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.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;</comment>
                    <comment id="18061" author="acasademont" created="Fri, 8 Jun 2012 08:22:23 +0000"  >&lt;p&gt;Hi marco!&lt;/p&gt;

&lt;p&gt;Actually i am using DECIMAL (or NUMERIC), not FLOAT, That type is not casted as it would lose precision. Therefore, my problem is when working with DECIMAL (Which is, btw, the type that mysql recommends for storing money values)&lt;br/&gt;
thet&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Types/DecimalType.php&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Types/DecimalType.php&lt;/a&gt;&lt;/p&gt;

</comment>
                    <comment id="18062" author="ocramius" created="Fri, 8 Jun 2012 10:56:21 +0000"  >&lt;p&gt;Unsure if the cast should happen in the type (just ignorant about the implication in precision), but I&apos;ll suggest it then.&lt;/p&gt;</comment>
                    <comment id="18064" author="acasademont" created="Fri, 8 Jun 2012 11:03:55 +0000"  >&lt;p&gt;It should not happen as the DECIMAL type in MySQL has much more precision than a double or float in PHP. It was previously cast but there was an issue regarding this cast and the cast was deleted&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DBAL-121&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DBAL-121&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that, in another issue a user points out the same problem i am facing, that i have to cast back to string if i do not want doctrine to issue an UPDATE command for values that have not changed&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DBAL-180&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DBAL-180&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As i said, my only point is that maybe, when computing the changeset, the comparison for scalar types should be more relaxed with a == instead of a ===&lt;/p&gt;
</comment>
                    <comment id="18066" author="ocramius" created="Fri, 8 Jun 2012 13:08:49 +0000"  >&lt;p&gt;Don&apos;t think this can be done, as you don&apos;t really know what types (and so also the conversion rules) the user applies to his own model. I wouldn&apos;t do that, leaving the implementor of the entities to have strict checks on types during operations in setters...&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1859] Implement console command to convert DQL into object running NativeQuery</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1859</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;As per our conversation during SFLive Paris 2012, we should create a command that receives a DQL and exposes back to you a PHP code of an object holding a conversion to NativeQuery, which is faster.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13762">DDC-1859</key>
            <summary>Implement console command to convert DQL into object running NativeQuery</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Fri, 8 Jun 2012 10:02:01 +0000</created>
                <updated>Fri, 8 Jun 2012 10:02:01 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-691] doctrine.readOnly query hint</title>
                <link>http://doctrine-project.org/jira/browse/DDC-691</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Setting such a query hint to TRUE should result in all entities being retrieved by that query to be read-only for the purposes of change-tracking. Note that the entities themselves need not necessarily be read-only in general.&lt;/p&gt;

&lt;p&gt;This feature is a flush performance tweak that can be used to query for objects but not let the returned objects run through change-tracking on flush. Any other managed objects are tracked as usual so you can do a read-only query for 100 entities and persist a new entity in the same unit of work with optimal flushing performance.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11628">DDC-691</key>
            <summary>doctrine.readOnly query hint</summary>
                <type id="5" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/subtask_alternate.png">Sub-task</type>
                    <parent id="10612">DDC-209</parent>
                        <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="romanb">Roman S. Borschel</reporter>
                        <labels>
                    </labels>
                <created>Thu, 15 Jul 2010 10:17:19 +0000</created>
                <updated>Thu, 31 May 2012 08:16:43 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>5</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="17106" author="koc" created="Mon, 26 Dec 2011 19:54:15 +0000"  >&lt;p&gt;Any news?&lt;br/&gt;
Why query hint? What about temporary switching like fetch mode changing via query object?&lt;/p&gt;</comment>
                    <comment id="18031" author="acid24" created="Thu, 31 May 2012 08:16:43 +0000"  >&lt;p&gt;Any news on this?&lt;/p&gt;

&lt;p&gt;I think this is a must have feature. Thanks for all your work.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1750] [GH-319] [WIP] Added support to Multiple ID Generators</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1750</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of guilhermeblanco:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="13588">DDC-1750</key>
            <summary>[GH-319] [WIP] Added support to Multiple ID Generators</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 1 Apr 2012 16:55:51 +0000</created>
                <updated>Sun, 27 May 2012 17:15:44 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17724" author="beberlei" created="Sun, 1 Apr 2012 20:19:37 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-319&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/319&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/319&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17725" author="beberlei" created="Sun, 1 Apr 2012 20:48:16 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-319&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/319&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/319&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17726" author="beberlei" created="Mon, 2 Apr 2012 04:21:38 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-319&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/319&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/319&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17730" author="beberlei" created="Mon, 2 Apr 2012 19:15:14 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-319&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/319&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/319&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17733" author="beberlei" created="Tue, 3 Apr 2012 03:42:14 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-319&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/319&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/319&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17734" author="beberlei" created="Tue, 3 Apr 2012 03:55:21 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-319&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/319&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/319&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17752" author="beberlei" created="Wed, 4 Apr 2012 19:59:03 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-319&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/319&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/319&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17787" author="beberlei" created="Fri, 6 Apr 2012 13:50:37 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-319&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/319&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/319&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17816" author="beberlei" created="Sat, 7 Apr 2012 07:21:04 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-319&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/319&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/319&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1820] [GH-348] [DDC-1819][WIP] Arbitrary object hydrator</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1820</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of marijn:&lt;/p&gt;

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

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

&lt;p&gt;Initial work (in progress) on a test suite for the arbitrary object hydrator, as discussed in &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1819&quot; title=&quot;Allow ResultSetMapping to be used for objects that are not entities&quot;&gt;DDC-1819&lt;/a&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;. Any tips are appreciated. I&apos;m not too sure what the test suite should and should not cover. &lt;/p&gt;

&lt;p&gt;Other questions I have include:&lt;/p&gt;

&lt;p&gt;1. Should the `HYDRATE_ARBITRARY_OBJECT` constant be added to the `AbstractQuery` class or the `NativeQuery` class? It only makes sense in the former but it might be missed when more constants are added in the future...&lt;br/&gt;
2. Should I use data providers in my tests for the result set data?&lt;br/&gt;
3. Should my tests be added to a `DDC1819` namespace?&lt;br/&gt;
4. Should I add functional tests?&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;: &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1819&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1819&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13697">DDC-1820</key>
            <summary>[GH-348] [DDC-1819][WIP] Arbitrary object hydrator</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 14 May 2012 10:25:15 +0000</created>
                <updated>Sun, 27 May 2012 10:52:38 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1551] postFlush event listeners should be able to get a list of all flushed entities</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1551</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Testing the new Doctrine 2.2 Beta we finally got the postFlush event which is a nice way to handle things after all the DB work has finished. The main problem is that there is no way to get all the flushed entities. In the onFlush event you are able to use the getScheduledEntityUpdates/Inserts/Deletions but as these entities are flushed, those arrays are now empty. To solve this i see 2 aproaches:&lt;/p&gt;

&lt;p&gt;1. Not unseting the array that holds the scheduled entities so the getScheduledEntityUpdates/Inserts/Deletions still have data. Those arrays are reset just before finishing the commit method so maybe unsetting them one by one as they are flushed is not necessary&lt;br/&gt;
2. Unset the arrays but at the same time, fill another &quot;flushedEntities&quot; array with the flushed entities and then be able to get that array with a getFlushedEntities method&lt;/p&gt;

&lt;p&gt;I can make a patch if necessary, just wanted to know if that sounds ok before starting it &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.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;</description>
                <environment></environment>
            <key id="13287">DDC-1551</key>
            <summary>postFlush event listeners should be able to get a list of all flushed entities</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="acasademont">Albert Casademont</reporter>
                        <labels>
                    </labels>
                <created>Wed, 21 Dec 2011 11:52:22 +0000</created>
                <updated>Wed, 23 May 2012 19:09:26 +0000</updated>
                                    <version>2.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>8</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17971" author="jasper@nerdsweide.nl" created="Wed, 23 May 2012 19:08:43 +0000"  >&lt;p&gt;I agree that Doctrine\ORM\Event\PreFlushEventArgs should contain a record of flushed entities, preferably reachable by entity-insertions/updates/deletions and collection-updates/deletions.&lt;/p&gt;

&lt;p&gt;I have a project (using Doctrine 2.1) which wrapped the flush call in my own. My flush dispatches custom preFlush/postFlush events (as they didn&apos;t exist in Doctrine 2.1), where my postFlushEventArgs does contain such a record. I&apos;ve just upgraded my project to use Doctrine 2.2 and stumbled upon:&lt;/p&gt;

&lt;p&gt;Catchable fatal error: Argument 1 passed to Nw\Event\EntityEvent::postFlush() must be an instance of Nw\Event\Args\PostFlushEventArgs, instance of Doctrine\ORM\Event\PostFlushEventArgs given.&lt;/p&gt;

&lt;p&gt;It seems I&apos;ve now hooked into Doctrine&apos;s postFlush (because I named the events the same way). I have renamed my events to work around this error, but I&apos;d rather see my behavior implemented natively.&lt;/p&gt;

&lt;p&gt;PS: Using Doctrine 2.2.2 to be precise &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.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;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1829] [GH-352] Add the posibility to add a custom Comparator for Schema tool</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1829</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of catacgc:&lt;/p&gt;

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

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

&lt;p&gt;See catacgc/dbal#153&lt;/p&gt;</description>
                <environment></environment>
            <key id="13716">DDC-1829</key>
            <summary>[GH-352] Add the posibility to add a custom Comparator for Schema tool</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 21 May 2012 11:31:59 +0000</created>
                <updated>Tue, 22 May 2012 17:47:53 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1819] Allow ResultSetMapping to be used for objects that are not entities</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1819</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Currently &lt;tt&gt;Doctrine\ORM\Query\ResultSetMapping&lt;/tt&gt; can only be used to query the database for entities using the &lt;tt&gt;EntityManager::createNativeQuery&lt;/tt&gt; method. It would be great if we could use this as well for objects that are not entities. That way we can create simple DTO&apos;s and map them to a query using the &lt;tt&gt;ResultSetMapping&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;I&apos;ll open a PR If there are no objections.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13694">DDC-1819</key>
            <summary>Allow ResultSetMapping to be used for objects that are not entities</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="marijn">Marijn Huizendveld</reporter>
                        <labels>
                    </labels>
                <created>Fri, 11 May 2012 15:13:43 +0000</created>
                <updated>Mon, 14 May 2012 10:26:50 +0000</updated>
                                    <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17941" author="beberlei" created="Fri, 11 May 2012 19:20:38 +0000"  >&lt;p&gt;Good idea. You could make this happen by adding a ArbitraryObjectHydrator that does not use the ClassMetadata but creates ReflectionProperty instances during the hydration.&lt;/p&gt;

&lt;p&gt;Api would then be:&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;$rsm = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ResultSetMapping();
....

$query = $em-&amp;gt;createNativeQuery($sql, $rsm);
$objects = $query-&amp;gt;getResult(Query::HYDRATOR_ARBITRARY_OBJECTS);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="17944" author="marijn" created="Sun, 13 May 2012 23:24:53 +0000"  >&lt;p&gt;Thanks for your input. I&apos;ll try to work on some tests this week. &lt;/p&gt;</comment>
                    <comment id="17945" author="marijn" created="Mon, 14 May 2012 10:26:50 +0000"  >&lt;p&gt;I&apos;ve &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/348&quot; class=&quot;external-link&quot;&gt;started working on the test suite in this PR&lt;/a&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1817] Allowing to specify MySQL Collation on Field Basis</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1817</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It would be nice to be able to specify which collation to use on a field basis.&lt;/p&gt;

&lt;p&gt;This would for example be useful when you have case-sensitive (utf8_bin), and case-insensitive (utf8_general_ci) values. Right now, this needs to be manually added to migration files (which is ok for projects, but it is not so nice for distributable libraries).&lt;/p&gt;</description>
                <environment></environment>
            <key id="13691">DDC-1817</key>
            <summary>Allowing to specify MySQL Collation on Field Basis</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="johannes">Johannes Schmitt</reporter>
                        <labels>
                    </labels>
                <created>Tue, 8 May 2012 20:13:01 +0000</created>
                <updated>Tue, 8 May 2012 20:13:01 +0000</updated>
                                                                    <component>Mapping Drivers</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1814] Save quoted info in ClassmetadataInfo#quotedColumns instead of ClassmetadataInfo#fieldmappings[&apos;fieldname&apos;][&apos;quoted&apos;]</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1814</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Similar to &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1813&quot; title=&quot;Save column types in ClassMetadataInfo#columnTypes array instead of ClassMetadataInfo#fieldMappings[&amp;#39;type&amp;#39;]&quot;&gt;DDC-1813&lt;/a&gt; I propose saving &apos;quote&apos; status in ClassmetadataInfo#quotedColumns instead of ClassmetadataInfo#fieldmappings&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;fieldname&amp;#39;&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;quoted&amp;#39;&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Otherwise you have quotation info only for fieldColumns and not association columns&lt;/p&gt;</description>
                <environment></environment>
            <key id="13687">DDC-1814</key>
            <summary>Save quoted info in ClassmetadataInfo#quotedColumns instead of ClassmetadataInfo#fieldmappings[&apos;fieldname&apos;][&apos;quoted&apos;]</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="rivaros">ross neacoders</reporter>
                        <labels>
                    </labels>
                <created>Sun, 6 May 2012 11:39:54 +0000</created>
                <updated>Sun, 6 May 2012 11:39:54 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1813] Save column types in ClassMetadataInfo#columnTypes array instead of ClassMetadataInfo#fieldMappings[&apos;type&apos;]</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1813</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Because you save column types in fieldmappings only, type information is not saved for join columns.&lt;/p&gt;

&lt;p&gt;Not having type info for join columns, makes it impossible to do call &apos;convertToPhpValue&apos; on join columns.&lt;/p&gt;

&lt;p&gt;For example see a demo of problem here:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/347&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/347&lt;/a&gt;&lt;/p&gt;
</description>
                <environment></environment>
            <key id="13686">DDC-1813</key>
            <summary>Save column types in ClassMetadataInfo#columnTypes array instead of ClassMetadataInfo#fieldMappings[&apos;type&apos;]</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="rivaros">ross neacoders</reporter>
                        <labels>
                    </labels>
                <created>Sun, 6 May 2012 11:36:16 +0000</created>
                <updated>Sun, 6 May 2012 11:36:41 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1812] Modify ResultSetMapping#addMetaResult function definition</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1812</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Give correct names to arguments&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addMetaResult($alias, $columnName, $fieldName, $isIdentifierColumn = &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    {
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;$alias - should be $tableAlias&lt;br/&gt;
$columnName should be $columnAlias&lt;br/&gt;
$fieldName should be $columnName&lt;/p&gt;

&lt;p&gt;Here are some exmple calls from code:&lt;br/&gt;
AbstractEntityInheritancePersister.php&lt;br/&gt;
79: $this-&amp;gt;_rsm-&amp;gt;addMetaResult(&apos;r&apos;, $columnAlias, $joinColumnName); &lt;br/&gt;
SqlWalker.php&lt;br/&gt;
$this-&amp;gt;_rsm-&amp;gt;addMetaResult($dqlAlias, $columnAlias, $discrColumn&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;fieldName&amp;#39;&amp;#93;&lt;/span&gt;); &lt;br/&gt;
$this-&amp;gt;_rsm-&amp;gt;addMetaResult($dqlAlias, $columnAlias, $srcColumn, (isset($assoc&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;id&amp;#39;&amp;#93;&lt;/span&gt;) &amp;amp;&amp;amp; $assoc&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;id&amp;#39;&amp;#93;&lt;/span&gt; === true)); &lt;br/&gt;
$this-&amp;gt;_rsm-&amp;gt;addMetaResult($dqlAlias, $columnAlias, $srcColumn); &lt;/p&gt;




</description>
                <environment></environment>
            <key id="13685">DDC-1812</key>
            <summary>Modify ResultSetMapping#addMetaResult function definition</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="rivaros">ross neacoders</reporter>
                        <labels>
                    </labels>
                <created>Sun, 6 May 2012 11:28:54 +0000</created>
                <updated>Sun, 6 May 2012 11:28:54 +0000</updated>
                                    <version>2.2</version>
                <version>2.2.1</version>
                <version>2.2.2</version>
                <version>Git Master</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1792] [GH-340] add public has() method to filter collection.</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1792</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of pjedrzejewski:&lt;/p&gt;

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

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

&lt;p&gt;Sorry if there is any reason why this is not implemented already.&lt;br/&gt;
This is useful when some feature, for example `soft-deleteable` filter may be optional.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13650">DDC-1792</key>
            <summary>[GH-340] add public has() method to filter collection.</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 19 Apr 2012 18:03:16 +0000</created>
                <updated>Fri, 4 May 2012 17:58:14 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1806] DQL with and without fetch join cause</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1806</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When running following DQL in newly cleared EntityManager, with the provided entities (see attached archive or gist at &lt;a href=&quot;https://gist.github.com/2473775&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/2473775&lt;/a&gt; ), results in different fetched association:&lt;/p&gt;

&lt;p&gt;DQL without join:&lt;br/&gt;
SELECT a FROM Entity\A a WHERE a.id = :id&lt;/p&gt;

&lt;p&gt;SQL without join:&lt;br/&gt;
SELECT a0_.a_id AS a_id0, a0_.id AS id1 FROM a a0_ WHERE a0_.a_id = ?&lt;/p&gt;

&lt;p&gt;Result without join:&lt;br/&gt;
$query-&amp;gt;getOneOrNullResult()&lt;del&gt;&amp;gt;getB()&lt;/del&gt;&amp;gt;getName(); // &apos;correct&apos;&lt;/p&gt;


&lt;p&gt;DQL with fetch join:&lt;br/&gt;
SELECT a, b FROM Entity\A a LEFT JOIN a.b b WHERE a.id = :id&lt;/p&gt;

&lt;p&gt;SQL with fetch join:&lt;br/&gt;
SELECT a0_.a_id AS a_id0, b1_.id AS id1, b1_.name AS name2, a0_.id AS id3 FROM a a0_ LEFT JOIN b b1_ ON a0_.id = b1_.id WHERE a0_.a_id = ?&lt;/p&gt;

&lt;p&gt;Result with fetch join:&lt;br/&gt;
$query-&amp;gt;getOneOrNullResult()&lt;del&gt;&amp;gt;getB()&lt;/del&gt;&amp;gt;getName(); // &apos;wrong&apos; (different result)&lt;/p&gt;


&lt;p&gt;The problem seems to be strictly related with how the `@JoinColumn` is configured.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13675">DDC-1806</key>
            <summary>DQL with and without fetch join cause</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="ocramius">Marco Pivetta</reporter>
                        <labels>
                    </labels>
                <created>Tue, 1 May 2012 21:09:00 +0000</created>
                <updated>Tue, 1 May 2012 21:15:33 +0000</updated>
                                    <version>2.2</version>
                <version>2.2.1</version>
                <version>2.2.2</version>
                <version>Git Master</version>
                                                <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17900" author="ocramius" created="Tue, 1 May 2012 21:15:32 +0000"  >&lt;p&gt;Attaching failing test from &lt;a href=&quot;https://github.com/Ocramius/doctrine2/compare/DDC-1806&quot; class=&quot;external-link&quot;&gt;https://github.com/Ocramius/doctrine2/compare/DDC-1806&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11188" name="DDC1806Test.php" size="2518" author="ocramius" created="Tue, 1 May 2012 21:15:32 +0000" />
                    <attachment id="11187" name="gist2473775-d202a38fdfb91921ef010df36322fb646561593a.tar.gz" size="19832" author="ocramius" created="Tue, 1 May 2012 21:09:00 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1716] Better unique constraints handling or even updateIfExists/findOneOrCreate</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1716</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It is too hard handle rows duplication now. As adviced here &lt;a href=&quot;http://stackoverflow.com/questions/3967226/checking-for-duplicate-keys-with-doctrine-2&quot; class=&quot;external-link&quot;&gt;http://stackoverflow.com/questions/3967226/checking-for-duplicate-keys-with-doctrine-2&lt;/a&gt; we should catch \PDOException with code 23000. This is bad behavior.&lt;/p&gt;

&lt;p&gt;So I propose:&lt;br/&gt;
a. Add DuplicateRowException wich will throwed by flush method (maybe wrapped PDOException) with method &quot;getDuplicatedProperties&quot; (based on sql error description parsing + mapping)&lt;br/&gt;
b. Add method findOneOrCreate (hello, Propel!) or updateIfExists to ObjectInterface, EntityManager&lt;br/&gt;
c. Combine a, b&lt;/p&gt;</description>
                <environment></environment>
            <key id="13542">DDC-1716</key>
            <summary>Better unique constraints handling or even updateIfExists/findOneOrCreate</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="koc">Konstantin</reporter>
                        <labels>
                    </labels>
                <created>Mon, 19 Mar 2012 21:11:04 +0000</created>
                <updated>Thu, 19 Apr 2012 09:15:57 +0000</updated>
                                    <version>2.2.1</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>5</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="17866" author="dynom" created="Thu, 19 Apr 2012 07:46:36 +0000"  >&lt;p&gt;I don&apos;t think it should be limited to the flush method, however, as this can occur with &quot;custom&quot; queries also. It would be ideal if the errors being generated can be much more easily (read: standardized) caught or read. &lt;/p&gt;

&lt;p&gt;I&apos;m in favor of letting the database handle integrity checks, and not run a query to decide wether or not the update or insert queries will violate. Hence the desire to handle this more gracefully.&lt;/p&gt;</comment>
                    <comment id="17867" author="lucasvanlierop" created="Thu, 19 Apr 2012 09:15:57 +0000"  >&lt;p&gt;The DBAL statement class (&lt;a href=&quot;https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Statement.php&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Statement.php&lt;/a&gt;) has and execute method which might be a good place to catch and convert the generic PDOExceptions by wrapping the line&lt;/p&gt;

&lt;p&gt;$stmt = $this-&amp;gt;stmt-&amp;gt;execute($params);&lt;/p&gt;

&lt;p&gt;in a try/catch statement which then calls some kind of PDOException to Doctrine Exception method&lt;/p&gt;




</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1787] Fix for JoinedSubclassPersister, multiple inserts with versioning throws an optimistic locking exception</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1787</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Attached is a small patch for a bug in the file JoinedSubclassPersister.php. When persisting multiple new entities that are subclasses of a baseclass (joined), and having the @Version attribute set, only for the last one a query is run to fetch the new value of the version field. The other one is tested with NULL, and throws an optimistic locking exception.&lt;/p&gt;
</description>
                <environment></environment>
            <key id="13644">DDC-1787</key>
            <summary>Fix for JoinedSubclassPersister, multiple inserts with versioning throws an optimistic locking exception</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="jack@actinum.nl">Jack van Galen</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 Apr 2012 19:40:56 +0000</created>
                <updated>Wed, 18 Apr 2012 19:40:56 +0000</updated>
                                    <version>2.2.2</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11185" name="JoinedSubclassPersister.php.patch" size="744" author="jack@actinum.nl" created="Wed, 18 Apr 2012 19:40:56 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1754] Allow use of Foregin Keys in DQL LIKE condition</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1754</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When using a LIKE condition in a WHERE clause, I would like to be able to use the foreign key of a single value association. For example:&lt;/p&gt;

&lt;p&gt;Imagine Product and Department are both entities. Department has the field Name with a unique index. Product is has a ManyToOne association called Department with the Department entity, referencing the field Name.&lt;/p&gt;

&lt;p&gt;I would like to write:&lt;br/&gt;
SELECT FROM Product p WHERE p.Department LIKE &apos;% Tools&apos;&lt;/p&gt;

&lt;p&gt;However, at present I need to write:&lt;br/&gt;
SELECT FROM Product p&lt;br/&gt;
JOIN p.Department d&lt;br/&gt;
WHERE d.name LIKE &apos;% Tools&apos;&lt;/p&gt;

&lt;p&gt;The issue is one of performance. On large record sets the first query runs several magnatudes more quickly than the second, particularly when four or five joins are involved.&lt;/p&gt;

&lt;p&gt;Looking at the DQL grammar from the online docs, the relveant lines are:&lt;/p&gt;

&lt;p&gt;LikeExpression           ::= StringExpression &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;NOT&amp;quot;&amp;#93;&lt;/span&gt; &quot;LIKE&quot; string &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;ESCAPE&amp;quot; char&amp;#93;&lt;/span&gt;&lt;br/&gt;
StringExpression       ::= StringPrimary | &quot;(&quot; Subselect &quot;)&quot;&lt;br/&gt;
StringPrimary          ::= StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression&lt;/p&gt;

&lt;p&gt;The problem is the StateFieldPathExpression in StringPrimary. When used with a LikeExpression a SingleValuedAssociationField should be allowed also.&lt;/p&gt;</description>
                <environment>Php 5.3</environment>
            <key id="13593">DDC-1754</key>
            <summary>Allow use of Foregin Keys in DQL LIKE condition</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="superdweebie">Tim Roediger</reporter>
                        <labels>
                    </labels>
                <created>Tue, 3 Apr 2012 01:57:41 +0000</created>
                <updated>Mon, 9 Apr 2012 22:47:54 +0000</updated>
                                    <version>2.2.1</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17829" author="beberlei" created="Sat, 7 Apr 2012 08:33:52 +0000"  >&lt;p&gt;This would only work if Department#Name is the primary key. Is it?&lt;/p&gt;

&lt;p&gt;DQL is not about optimized performance in very single edge case. We need to keep some parts open to keep the code simple. This is at best a feature request, not a bug.&lt;/p&gt;</comment>
                    <comment id="17836" author="superdweebie" created="Mon, 9 Apr 2012 22:47:54 +0000"  >&lt;p&gt;Thanks for your reply Benjamin,&lt;/p&gt;

&lt;p&gt;I agree with your assesment that this is more accurately an improvement request than a bug. My appologies it was placed in the wrong category.&lt;/p&gt;

&lt;p&gt;No, Department#Name is not the primary key, but it does have a unique index.&lt;/p&gt;

&lt;p&gt;I&apos;ve worked a little more to understand the DQL grammar. It appears that only one small, simple change is required:&lt;/p&gt;

&lt;p&gt;FROM:&lt;br/&gt;
StringPrimary ::= StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression&lt;/p&gt;

&lt;p&gt;TO:&lt;br/&gt;
StringPrimary ::= SingleValuedPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression&lt;/p&gt;

&lt;p&gt;This would improve consistancy with other aspects of DQL. For example, AggregateExpression COUNT, NullComparisonExpression , GroupByItem, and ArithmeticPrimary all allow a SingleValuedPathExpression rather than the more strict StateFieldPathExpression.&lt;/p&gt;

&lt;p&gt;Bascially my frustration is that as DQL currently stands, foregin keys which are already existant in a db table cannot be used in a LIKE expression without doing an unnessessary JOIN. Foreign keys can already be used in DQL for BETWEEN, IS NULL and comparison expressions, so why not LIKE expressions also? It appears the only thing holding this back is an unrequired restriction in the DQL grammar.&lt;/p&gt;

&lt;p&gt;Cheers, Tim&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1760] [GH-324] simplified __call method</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1760</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of brikou:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="13599">DDC-1760</key>
            <summary>[GH-324] simplified __call method</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 3 Apr 2012 15:34:06 +0000</created>
                <updated>Sat, 7 Apr 2012 07:25:24 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17756" author="beberlei" created="Wed, 4 Apr 2012 19:59:07 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-324&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/324&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/324&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17794" author="beberlei" created="Fri, 6 Apr 2012 13:50:37 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-324&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/324&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/324&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17820" author="beberlei" created="Sat, 7 Apr 2012 07:21:04 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-324&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/324&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/324&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1739] [GH-314] [WIP] Doctrine\Common metadata drivers reuse</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1739</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Ocramius:&lt;/p&gt;

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

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

&lt;p&gt;This PR is strictly related with &lt;a href=&quot;https://github.com/doctrine/common/pull/98&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/pull/98&lt;/a&gt; and tests won&apos;t pass until the doctrine-common submodule points to a merged version of it (will do so later, so &lt;b&gt;please don&apos;t merge now&lt;/b&gt; ).&lt;/p&gt;

&lt;p&gt;Basically, I just stripped any code duplicate of what already available in dcom master under Doctrine\Common\Persistence\Mapping\Driver.&lt;/p&gt;

&lt;p&gt;Tests are OK on my environment when using the new commons submodule.&lt;/p&gt;

&lt;p&gt;(This is a cleanup for #263, where I sadly did pull from the remote branch after rebasing)&lt;/p&gt;

&lt;p&gt;Tests are still failing.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13577">DDC-1739</key>
            <summary>[GH-314] [WIP] Doctrine\Common metadata drivers reuse</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Mar 2012 16:10:32 +0000</created>
                <updated>Sat, 7 Apr 2012 07:21:02 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17678" author="beberlei" created="Fri, 30 Mar 2012 17:56:45 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-314&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/314&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/314&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17680" author="beberlei" created="Fri, 30 Mar 2012 19:37:27 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-314&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/314&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/314&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17684" author="beberlei" created="Fri, 30 Mar 2012 19:55:57 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-314&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/314&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/314&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17687" author="beberlei" created="Fri, 30 Mar 2012 20:01:01 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-314&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/314&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/314&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17710" author="beberlei" created="Sun, 1 Apr 2012 09:02:14 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-314&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/314&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/314&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17747" author="beberlei" created="Wed, 4 Apr 2012 19:59:02 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-314&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/314&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/314&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17792" author="beberlei" created="Fri, 6 Apr 2012 13:50:37 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-314&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/314&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/314&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17809" author="beberlei" created="Sat, 7 Apr 2012 07:21:02 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-314&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/314&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/314&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1216] A way to mark an entity to always use result cache. Like @UseResultCache class annotation.</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1216</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;So that even associations, find(), findBy() etc will be affected. Very useful for entities that are being used on every request.&lt;/p&gt;

&lt;p&gt;Is that thinkable?&lt;/p&gt;</description>
                <environment></environment>
            <key id="12726">DDC-1216</key>
            <summary>A way to mark an entity to always use result cache. Like @UseResultCache class annotation.</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="hypno">Reio Piller</reporter>
                        <labels>
                    </labels>
                <created>Sun, 19 Jun 2011 12:49:04 +0000</created>
                <updated>Fri, 6 Apr 2012 13:07:25 +0000</updated>
                                    <version>2.x</version>
                                <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="17780" author="holtkamp" created="Fri, 6 Apr 2012 13:07:25 +0000"  >&lt;p&gt;During development, I tried to have the out-of-the-box ORM layer handle as much of the queries as possible, essentially I used the Repository functions a lot: &lt;/p&gt;

&lt;p&gt;For example, having a specific Repository extend the Doctrine EntityRepository and do something like:&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; 
    public function findByName($name)
    {
        $criteria = array(&apos;_name&apos; =&amp;gt; $name);
        return parent::findBy($criteria);
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Now all functionality is developed, I am optimizing performance and I find myself having to refer my Repository to my DAO layer which uses DQL, so I can enable the DQL Result Cache...&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; 
    public function findByName($name)
    {
       //Use the DAO so we can enable DQL ResultSet caching
        return $this-&amp;gt;_getDao()-&amp;gt;loadByName($name);
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;It would be nice to be able to configure &apos;DQL Result Cache = on&apos; on Repository level as well...&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1441] Metadata cannot be loaded for not registered proxy objects</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1441</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;We are using several Doctrine managers in our project with the same entity classes and different database tables.&lt;/p&gt;

&lt;p&gt;The problem appears when we are willing to merge entity with lazy associations from one manager to another. The second entity manager instance hasn&apos;t got the proxy object metadata defined yet so it fails with Doctrine\ORM\Mapping\MappingException exception &quot;Class EntityProxy is not a valid entity or mapped super class.&quot;.&lt;/p&gt;

&lt;p&gt;If both entity managers share the proxy objects the problem can be fixed by calling &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;$em-&amp;gt;getProxyFactory()-&amp;gt;getProxy(&apos;Entity&apos;, -1);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;which will register the entity metadata for the proxy classname as well.&lt;/p&gt;

&lt;p&gt;Still if the proxy configuration differs, there is no fix found without changing the Doctrine ORM code.&lt;/p&gt;

&lt;p&gt;The fix inside the Doctrine would be to detect Proxy classes before loading the metadata and load the metadata for it&apos;s parent class instead. Please see the diff attached with proposed solution.&lt;/p&gt;

&lt;p&gt;Also I think this issue could arise when unserialized entity objects will be merged into the entity manager. I will try creating test case for this.&lt;/p&gt;</description>
                <environment>MySQL, Ubuntu, PHP 5.3.6</environment>
            <key id="13106">DDC-1441</key>
            <summary>Metadata cannot be loaded for not registered proxy objects</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="gedrox">Aigars Gedroics</reporter>
                        <labels>
                    </labels>
                <created>Thu, 20 Oct 2011 13:02:43 +0000</created>
                <updated>Thu, 5 Apr 2012 08:39:55 +0000</updated>
                                    <version>2.1.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16913" author="gedrox" created="Thu, 24 Nov 2011 14:45:46 +0000"  >&lt;p&gt;Test case attached.&lt;/p&gt;</comment>
                    <comment id="17768" author="gedrox" created="Thu, 5 Apr 2012 08:39:55 +0000"  >&lt;p&gt;See my pull request in &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/332&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/332&lt;/a&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11116" name="DDC1441Test.php" size="2539" author="gedrox" created="Thu, 24 Nov 2011 14:45:46 +0000" />
                    <attachment id="11077" name="not-loaded-proxy-patch.diff" size="1096" author="gedrox" created="Thu, 20 Oct 2011 13:02:43 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1761] Small error on DQL documentation page</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1761</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;On this document page:&lt;br/&gt;
&lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/2.0.x/reference/dql-doctrine-query-language.html#dql-select-examples&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/2.0.x/reference/dql-doctrine-query-language.html#dql-select-examples&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The following lines are present:&lt;br/&gt;
$query = $em-&amp;gt;createQuery(&apos;SELECT u.username, u.name FROM CmsUser u&apos;);&lt;br/&gt;
$users = $query-&amp;gt;getResults(); // array of CmsUser username and name values&lt;br/&gt;
echo $users&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;username&amp;#39;&amp;#93;&lt;/span&gt;;&lt;/p&gt;

&lt;p&gt;There is an error in:&lt;br/&gt;
$query-&amp;gt;getResults();&lt;/p&gt;

&lt;p&gt;It should read&lt;br/&gt;
$query-&amp;gt;getResult();&lt;/p&gt;</description>
                <environment></environment>
            <key id="13600">DDC-1761</key>
            <summary>Small error on DQL documentation page</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="5" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/trivial.png">Trivial</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="superdweebie">Tim Roediger</reporter>
                        <labels>
                    </labels>
                <created>Tue, 3 Apr 2012 23:27:57 +0000</created>
                <updated>Tue, 3 Apr 2012 23:28:41 +0000</updated>
                                    <version>2.2.1</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1756] Allow for master table only models on joined subclass inheritance</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1756</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Think of a joined subclass inheritance setup where abstract base class A has many concrete child classes C1 ... CN. For each child class a table necessarily has to created. Yet if there are many child classes not defining any additional fields you will get many &quot;id only&quot; child tables. This leads to unnecessary join and insert overhead on database operations as well as a bunch of quite senseless tables in your schema that need to be maintained.&lt;/p&gt;

&lt;p&gt;While there are already tickets requesting support for mixed inheritance mapping (e.g. &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-138&quot; title=&quot;Allow for mixed inheritance mapping&quot;&gt;DDC-138&lt;/a&gt;) I want to propose another - obviously easy to implement - solution that addresses the &quot;id only table&quot; problem. The basic idea is to extend ClassMetadata by a flag &quot;hasOwnTable&quot; which is true by default and applicable for child classes of a joined subclass tree. Setting this flag to &amp;lt;false&amp;gt; would lead to...&lt;br/&gt;
1.) no child table creation for corresponding model&lt;br/&gt;
2.) no joins to this table while rendering SQL from DQL statements&lt;br/&gt;
3.) no INSERT, UPDATE and DELETE statements for this table in methods executeInserts(), update() and delete() on Doctrine\ORM\Persisters\JoinedSubclassPersister.&lt;/p&gt;

&lt;p&gt;(3) can easily be implemented since the mentioned methods all loop on ClassMetadata::parentClasses. For those classes which set the flag &quot;hasOwnTable&quot; to false the operation will be skipped. On the other hand (2) doesn&apos;t seem to a big deal either. Extending SqlWalker::_generateClassTableInheritanceJoins() by means of a flag test seems to be enough. Of course setting the flag to &amp;lt;false&amp;gt; while defining additional fields on child class level must be rejected.&lt;/p&gt;

&lt;p&gt;If you go for this feature I would be pleased to provide an implementation.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13595">DDC-1756</key>
            <summary>Allow for master table only models on joined subclass inheritance</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="markus.woessner">Markus W&#246;&#223;ner</reporter>
                        <labels>
                    </labels>
                <created>Tue, 3 Apr 2012 11:41:01 +0000</created>
                <updated>Tue, 3 Apr 2012 11:41:01 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1732] Unserialized non-initialized proxy classes should throw an exception when a method is called</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1732</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When we serialize entities in a session, we often have pointers to uninitialized proxies.&lt;br/&gt;
These proxies have $_entityPersister == null.&lt;/p&gt;

&lt;p&gt;The problem is that if you happen to call by mistake a method on such a proxy, you&apos;re not aware that this is an uninitialized proxy, and the business methods are called, with null values for every property.&lt;/p&gt;

&lt;p&gt;I think the proxy should throw an exception in that case.&lt;br/&gt;
Attached, a patch with the proposed modification.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13568">DDC-1732</key>
            <summary>Unserialized non-initialized proxy classes should throw an exception when a method is called</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="benjamin">Benjamin Morel</reporter>
                        <labels>
                    </labels>
                <created>Wed, 28 Mar 2012 19:29:13 +0000</created>
                <updated>Wed, 28 Mar 2012 19:29:13 +0000</updated>
                                    <version>2.2</version>
                <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                                <attachments>
                    <attachment id="11173" name="ProxyFactory.php.patch" size="679" author="benjamin" created="Wed, 28 Mar 2012 19:29:13 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1728] There is no exact alternative function like MONTH in mysql </title>
                <link>http://doctrine-project.org/jira/browse/DDC-1728</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;i am not able to extract only month from the date field using doctrine2 using &apos;MONTH&apos; function&lt;/p&gt;</description>
                <environment>Ubuntu 11.10</environment>
            <key id="13563">DDC-1728</key>
            <summary>There is no exact alternative function like MONTH in mysql </summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="sudheeshms1">Sudheesh MS</reporter>
                        <labels>
                    </labels>
                <created>Tue, 27 Mar 2012 13:44:12 +0000</created>
                <updated>Tue, 27 Mar 2012 13:44:12 +0000</updated>
                                    <version>2.2.0-RC1</version>
                <version>2.2</version>
                <version>2.2.1</version>
                                                <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1549] GH-232: Recursive check for entity identifiers and hashes</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1549</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Pull-Request was automatically synchronized: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/232&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/232&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hi all!&lt;br/&gt;
This PR will add a better support for entities with association keys.&lt;/p&gt;

&lt;p&gt;getType will check recursively to find a type for the identifier.&lt;br/&gt;
getIndividualValue will search recursively to find the identifier value&lt;/p&gt;

&lt;p&gt;trygetById improved, using a recursive function to find an id value instead of implode functions (that cause exceptions if the identifier is an object and do not implements __toString method).  &lt;/p&gt;
</description>
                <environment></environment>
            <key id="13284">DDC-1549</key>
            <summary>GH-232: Recursive check for entity identifiers and hashes</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 20 Dec 2011 08:26:06 +0000</created>
                <updated>Thu, 22 Mar 2012 22:07:11 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17120" author="beberlei" created="Wed, 28 Dec 2011 08:03:40 +0000"  >&lt;p&gt;Mark as improvement&lt;/p&gt;</comment>
                    <comment id="17630" author="beberlei" created="Thu, 22 Mar 2012 22:07:11 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-232&amp;#93;&lt;/span&gt; was &lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/232&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/232&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1720] SqlWalter private variables should be protected to allow walker extensions</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1720</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;m attaching a patch with the suggestion.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13547">DDC-1720</key>
            <summary>SqlWalter private variables should be protected to allow walker extensions</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="ignaciolarranaga">Ignacio Larranaga</reporter>
                        <labels>
                    </labels>
                <created>Wed, 21 Mar 2012 16:44:52 +0000</created>
                <updated>Wed, 21 Mar 2012 16:45:25 +0000</updated>
                                    <version>2.1.6</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11170" name="SqlWalker.patch" size="2632" author="ignaciolarranaga" created="Wed, 21 Mar 2012 16:44:52 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1714] Prevent inverse side lazy loading owning side of the oneToOne relationsip if owning side&apos;s id is an assosiationKey of inversed side</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1714</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue was originally discussed in &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-357&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-357&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Say there is User and UserData with oneToOne bidirectional relationship. When we fetch User objects, UserData is lazy loaded right away. &lt;/p&gt;

&lt;p&gt;If we were to set UserData &apos;s id as asssosiationKey of User, then user_id becomes the id of UserData and User object can already know that UserData owning side&apos;s id will equal it&apos;s own User-&amp;gt;id.&lt;/p&gt;

&lt;p&gt;Can this be implemented?&lt;/p&gt;</description>
                <environment></environment>
            <key id="13540">DDC-1714</key>
            <summary>Prevent inverse side lazy loading owning side of the oneToOne relationsip if owning side&apos;s id is an assosiationKey of inversed side</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="dwalter">David</reporter>
                        <labels>
                    </labels>
                <created>Sun, 18 Mar 2012 23:56:32 +0000</created>
                <updated>Sun, 18 Mar 2012 23:56:32 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1702] EBNF for IN expressions should be updated for 2.2</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1702</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Following the changes made for &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1472&quot; title=&quot;WHERE &amp;lt;&amp;lt;function&amp;gt;&amp;gt; IN ... doesn&amp;#39;t work&quot;&gt;&lt;del&gt;DDC-1472&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1416&quot; title=&quot;bug in simple test with sub query&quot;&gt;&lt;del&gt;DDC-1416&lt;/del&gt;&lt;/a&gt;, the EBNF for InExpression should have been updated. It now takes an ArithmeticExpression instead of a SingleValuePathExpression.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13525">DDC-1702</key>
            <summary>EBNF for IN expressions should be updated for 2.2</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="pschwisow">Patrick Schwisow</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Mar 2012 17:40:48 +0000</created>
                <updated>Tue, 13 Mar 2012 17:45:54 +0000</updated>
                                    <version>2.2</version>
                                                <component>Documentation</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="17563" author="pschwisow" created="Tue, 13 Mar 2012 17:45:54 +0000"  >&lt;p&gt;I marked this as &quot;Major&quot; because this change represents a BC break.  Because EBNF was not updated, I initially believed this to be a bug in ORM and wasted a lot of time debugging Doctrine code before I discovered this change was intentional.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1398] loading one item at a time when indexBy and EXTRA_LAZY fetch mode is used on a collection</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1398</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;collection-&amp;gt;get($key)&lt;/p&gt;

&lt;p&gt;Atm in 2.1.2 this is loading the entire collection. It would be really handy that it would extra lazy load only one item using the association and indexBy fields and given key value (if collection is not initialized and the key havent been loaded yet ofc)&lt;/p&gt;

&lt;p&gt;Am i making sense with this? &lt;/p&gt;</description>
                <environment></environment>
            <key id="13053">DDC-1398</key>
            <summary>loading one item at a time when indexBy and EXTRA_LAZY fetch mode is used on a collection</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="hypno">Reio Piller</reporter>
                        <labels>
                    </labels>
                <created>Thu, 29 Sep 2011 18:34:38 +0000</created>
                <updated>Sat, 10 Mar 2012 16:30:19 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>3</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="17075" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:22:20 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                    <comment id="17526" author="gcaseres" created="Mon, 5 Mar 2012 22:02:25 +0000"  >&lt;p&gt;Is there any fix for this? i have the same problem.&lt;/p&gt;</comment>
                    <comment id="17544" author="deatheriam" created="Sat, 10 Mar 2012 16:29:38 +0000"  >&lt;p&gt;It makes a perfect sense here, I wish it was possible, it would give us a room for even more optimization. Any input on the issue from the developers?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1681] loadRelated() - Method to efficiently load sets of related entities in &quot;sub&quot;-select strategies</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1681</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;As per Request of Seldaek &lt;img class=&quot;emoticon&quot; src=&quot;http://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;</description>
                <environment></environment>
            <key id="13496">DDC-1681</key>
            <summary>loadRelated() - Method to efficiently load sets of related entities in &quot;sub&quot;-select strategies</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 5 Mar 2012 20:14:44 +0000</created>
                <updated>Mon, 5 Mar 2012 21:22:52 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="17522" author="seldaek" created="Mon, 5 Mar 2012 20:43:09 +0000"  >&lt;p&gt;Sample:&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;$result = $queryBuilder-&amp;gt;select(&apos;a&apos;)-&amp;gt;from(&apos;User&apos;, &apos;a&apos;)-&amp;gt;getQuery()-&amp;gt;getResult();
$result-&amp;gt;loadRelated(&apos;roles&apos;); &lt;span class=&quot;code-comment&quot;&gt;// loads all a.roles&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Would be the equivalent of:&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;$result = $queryBuilder-&amp;gt;select(&apos;a, r&apos;)-&amp;gt;from(&apos;User&apos;, &apos;a&apos;)-&amp;gt;join(&apos;a.roles&apos;, &apos;r&apos;)-&amp;gt;getQuery()-&amp;gt;getResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Except that the above does one simple query without join, then one WHERE IN query with all ids from the collection.&lt;br/&gt;
The latter obviously does a join and retrieves everything in one - more complex - query.&lt;/p&gt;

&lt;p&gt;Bonus points if you can loadRelated multiple relations at once.&lt;/p&gt;</comment>
                    <comment id="17523" author="stof" created="Mon, 5 Mar 2012 21:09:31 +0000"  >&lt;p&gt;I see an issue here: if you do a WHERE IN with the multiple ids, how do you know which entity the role is related to ?&lt;/p&gt;

&lt;p&gt;and btw, the interface you suggested above would require breaking the BC: ``$result`` is an array right now.&lt;/p&gt;</comment>
                    <comment id="17524" author="seldaek" created="Mon, 5 Mar 2012 21:15:47 +0000"  >&lt;p&gt;The interface is just an example mimicking the way it worked in D1, take it with a grain of salt.&lt;/p&gt;

&lt;p&gt;As for the implementation, if you assume the roles table has a user_id and role column, then you can do WHERE user_id IN (1, 2, 3) and you&apos;ll get back the user ids so you know where to attach them. It might still require some joining in some cases, but the point is to keep the joins out of the main query.&lt;/p&gt;</comment>
                    <comment id="17525" author="guilhermeblanco" created="Mon, 5 Mar 2012 21:22:52 +0000"  >&lt;p&gt;The one to be implemented would be:&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;$result = $queryBuilder-&amp;gt;select(&apos;a&apos;)-&amp;gt;from(&apos;User&apos;, &apos;a&apos;)-&amp;gt;getQuery()-&amp;gt;getResult();
$em-&amp;gt;loadRelated($result, &apos;roles&apos;); &lt;span class=&quot;code-comment&quot;&gt;// loads all a.roles&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The reason for that is not all the times you have a PersistentCollection. You may have an ArrayCollection too.&lt;br/&gt;
I just don&apos;t know yet how to handle array and ArrayCollection situations, since you may not know which class you&apos;re trying to fetch.&lt;br/&gt;
Maybe I can try to grab the first item of array and retrieve Association information from ClassMetadata retrieved via get_class on first item. That would solve the problem.&lt;/p&gt;

&lt;p&gt;Any other ideas, feel free to give me.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1206] Add option to SchemaTool for ignoring unsupported tables</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1206</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I suggest adding a new feature to SchemaTool, which allows you to ignore tables, which contain unsupported column types.&lt;/p&gt;

&lt;p&gt;Use case:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;You have a legacy database, or a database that is also shared with another application&lt;/li&gt;
	&lt;li&gt;You want to use SchemaTool to speed up development&lt;/li&gt;
	&lt;li&gt;The database contains tables which are not used in the Doctrine 2 application, and contain unsupported column types&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I&apos;ve encountered this already a few  times myself - Basically if you try to use orm:schema-tool:update with a database that contains tables with unsupported column types, it&apos;ll throw an error and you won&apos;t be able to use it at all. Because schema tool is extermely convenient when developing, I think it would be very useful to have support for this feature.&lt;/p&gt;

&lt;p&gt;Implementation:&lt;/p&gt;

&lt;p&gt;I think this should be doable by just changing SchemaTool/SchemaManager so, that SchemaManager would contain an additional method (or flag) which works like createSchema, but ignores tables that cause an exception, and SchemaTool would include a flag for using this instead of the standard approach.&lt;/p&gt;

&lt;p&gt;I&apos;m looking into implementing this myself, and will submit a patch if this seems like a reasonable approach.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12711">DDC-1206</key>
            <summary>Add option to SchemaTool for ignoring unsupported tables</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="jhartikainen">Jani Hartikainen</reporter>
                        <labels>
                    </labels>
                <created>Mon, 13 Jun 2011 13:06:46 +0000</created>
                <updated>Mon, 5 Mar 2012 19:43:14 +0000</updated>
                                                                    <component>Tools</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="15986" author="jhartikainen" created="Wed, 15 Jun 2011 05:33:52 +0000"  >&lt;p&gt;Relevant patches (pull request made):&lt;/p&gt;

&lt;p&gt;DBAL &lt;a href=&quot;https://github.com/jhartikainen/dbal/tree/DDC-1206&quot; class=&quot;external-link&quot;&gt;https://github.com/jhartikainen/dbal/tree/DDC-1206&lt;/a&gt;&lt;br/&gt;
ORM &lt;a href=&quot;https://github.com/jhartikainen/doctrine2/tree/DDC-1206&quot; class=&quot;external-link&quot;&gt;https://github.com/jhartikainen/doctrine2/tree/DDC-1206&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17520" author="maerf0x0" created="Mon, 5 Mar 2012 19:43:14 +0000"  >&lt;p&gt;has there been any progres on this feature? I have POINT  in my DB and would rather ignore the table  than create a custom type. &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1675] PDO::FETCH_GROUP</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1675</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;PDO supports grouping by a field when doing a fetchAll() by using PDO::FETCH_GROUP. This can in many places be useful. &lt;a href=&quot;http://blog.stealth35.com/2011/08/17/pdo-fetch-group.html&quot; class=&quot;external-link&quot;&gt;http://blog.stealth35.com/2011/08/17/pdo-fetch-group.html&lt;/a&gt; desribes the behavior quite well.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13486">DDC-1675</key>
            <summary>PDO::FETCH_GROUP</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="henrikbjorn">Henrik Bjornskov</reporter>
                        <labels>
                    </labels>
                <created>Thu, 1 Mar 2012 19:50:34 +0000</created>
                <updated>Thu, 1 Mar 2012 19:50:34 +0000</updated>
                                                                    <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1373] Map file with specific class</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1373</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi there,&lt;br/&gt;
AbsractFileDriver is using the filename to know the managed class.&lt;/p&gt;

&lt;p&gt;It&apos;s a cool feature because it&apos;s allow loading on-demand.&lt;br/&gt;
The problem is, that the filename must be the name of the Class.&lt;/p&gt;

&lt;p&gt;It should be great to be able to manually map XML/YAML File description to a Class, like :&lt;br/&gt;
$drivers-&amp;gt;addMappingFile ( array ( &quot;filename&quot; =&amp;gt; &quot;class&quot;, &quot;filename2&quot; =&amp;gt; &quot;class2&quot;) );&lt;/p&gt;

&lt;p&gt;This feature is simple to implement, just add a new array inside AbsractFileDriver to know the mapping.&lt;br/&gt;
When using the current method with addPaths, parse the folder to get traditional XML/YAML file where filename corresponding to classname and add it to the mapping array.&lt;/p&gt;

&lt;p&gt;AbsractFileDriver-&amp;gt;getAllClassNames () just return value of mapping array.&lt;br/&gt;
The mapping array is store inside cache.&lt;/p&gt;

&lt;p&gt;With this new feature, it allow developers to create a pretty folder that contains entities mapping.&lt;/p&gt;

&lt;p&gt;Armetiz.&lt;/p&gt;</description>
                <environment>Debian LAMP - PHP5.3 - Apache 2</environment>
            <key id="13015">DDC-1373</key>
            <summary>Map file with specific class</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="armetiz">Thomas Tourlourat - Armetiz</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Sep 2011 12:08:01 +0000</created>
                <updated>Tue, 14 Feb 2012 22:53:37 +0000</updated>
                                    <version>2.1.1</version>
                                <fixVersion>2.x</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17078" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:23:45 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-450] Add TableGenerator Implementation</title>
                <link>http://doctrine-project.org/jira/browse/DDC-450</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The TableGenerator Id Generator is not yet implemented, here is some code i came up with:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;class TableGenerator &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; AbstractIdGenerator
{
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $_tableName;
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $_sequenceName;
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $_allocationSize;
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $_nextValue;
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $_maxValue;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __construct($tableName, $sequenceName = &apos;&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;&apos;, $allocationSize = 10)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_tableName = $tableName;
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_sequenceName = $sequenceName;
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_allocationSize = $allocationSize;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function generate(EntityManager $em, $entity)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_maxValue === &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; || $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nextValue == $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_maxValue) {
            &lt;span class=&quot;code-comment&quot;&gt;// Allocate &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; values
&lt;/span&gt;            $conn = $em-&amp;gt;getConnection();
            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($conn-&amp;gt;getTransactionNestingLevel() == 0) {

                &lt;span class=&quot;code-comment&quot;&gt;// use select &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; update
&lt;/span&gt;                $sql = $conn-&amp;gt;getDatabasePlatform()-&amp;gt;getTableHiLoCurrentValSql($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_tableName, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_sequenceName);
                $currentLevel = $conn-&amp;gt;fetchColumn($sql);
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($currentLevel != &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;) {
                    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nextValue = $currentLevel;
                    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_maxValue = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_nextValue + $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_allocationSize;

                    $updateSql = $conn-&amp;gt;getDatabasePlatform()-&amp;gt;getTableHiLoUpdateNextValSql(
                        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_tableName, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_sequenceName, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_allocationSize
                    );
                    
                    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($conn-&amp;gt;executeUpdate($updateSql, array(1 =&amp;gt; $currentLevel, 2 =&amp;gt; $currentLevel+1)) !== 1) {
                        &lt;span class=&quot;code-comment&quot;&gt;// no affected rows, concurrency issue, &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; exception
&lt;/span&gt;                    }
                } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
                    &lt;span class=&quot;code-comment&quot;&gt;// no current level returned, TableGenerator seems to be broken, &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; exception
&lt;/span&gt;                }
            } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
                &lt;span class=&quot;code-comment&quot;&gt;// only table locks help here, implement &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; or &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; exception?
&lt;/span&gt;                &lt;span class=&quot;code-comment&quot;&gt;// or &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; we want to work with table locks exclusively?
&lt;/span&gt;            }
        }
        &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;_nextValue++;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="11100">DDC-450</key>
            <summary>Add TableGenerator Implementation</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="4" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 20 Mar 2010 14:02:43 +0000</created>
                <updated>Mon, 13 Feb 2012 14:11:35 +0000</updated>
                                    <version>2.0-ALPHA4</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="13771" author="guilhermeblanco" created="Wed, 4 Aug 2010 00:44:41 +0000"  >&lt;p&gt;Already merged into core.&lt;/p&gt;</comment>
                    <comment id="13772" author="beberlei" created="Wed, 4 Aug 2010 03:39:01 +0000"  >&lt;p&gt;But it is not enabled yet &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; Plus we need tests to verify this works in high concurrency enviroments and does not pass the same id twice.&lt;/p&gt;

&lt;p&gt;Furthermore the DAtabase Platform Methods are completly missing. No implementations yet.&lt;/p&gt;</comment>
                    <comment id="13773" author="beberlei" created="Wed, 4 Aug 2010 03:39:18 +0000"  >&lt;p&gt;Schema-Tool support is also missing.&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10002">
                <name>Dependency</name>
                                <outwardlinks description="depends on">
                            <issuelink>
            <issuekey id="13443">DBAL-223</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1645] Paths to Annotations classes are not considered</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1645</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi, my battle is described here: &lt;a href=&quot;http://groups.google.com/group/doctrine-user/browse_thread/thread/db9c77b6bc000f13&quot; class=&quot;external-link&quot;&gt;http://groups.google.com/group/doctrine-user/browse_thread/thread/db9c77b6bc000f13&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When I follow bugtracker tutorial I think that there is an error when working with Annotations, see these examples:&lt;/p&gt;

&lt;p&gt;Start a new bugtracker project as described in tutorial from scratch, create folders and files as tutorial expose, then do following changes:&lt;/p&gt;

&lt;p&gt;1) put Product, Bug, User class files at root level, same level as bootstraps files and create_xxxxx files&lt;br/&gt;
2) Create &apos;entities&apos; folder, but leave it empty.&lt;br/&gt;
3) Create &apos;yaml&apos; and &apos;xml&apos; at root level too and add related files.&lt;br/&gt;
4) Open bootstrap and edit paths to Product, Bug and User class files to read from root files as in 1) so they can be read from scripts.&lt;/p&gt;

&lt;p&gt;1) YAML&lt;br/&gt;
   a) When using YAML as mapping driver you need a path to Setup::createYAMLMetadataConfiguration( ) method, I use this&lt;br/&gt;
         Setup::createYAMLMetadataConfiguration(array(_&lt;em&gt;DIR&lt;/em&gt;_.&quot;/yaml&quot;), $isDevMode);&lt;br/&gt;
        where &quot;yaml&quot; directory is same level as bootstraps and create_xxxxx files are. When executing script to create a product&lt;br/&gt;
        Doctrine work as expected, creating a row inside table correctly.&lt;br/&gt;
   b) If you comment line where class Product is included, the object can&apos;t be found at runtime and will throw an exception as expected.&lt;br/&gt;
   c) With uncommented require Product line, change yaml name folder to anything, and Doctrine throw an exception (MappingException) as expected&lt;/p&gt;

&lt;p&gt;so Setup method path argument is considered correctly, Doctrine engine must know where yaml files for classes are.&lt;/p&gt;

&lt;p&gt;2) XML&lt;br/&gt;
   a) When using XML as mapping driver you need a path to Setup::createXMLMetadataConfiguration( ) method, I use this&lt;br/&gt;
         Setup::createXMLMetadataConfiguration(array(_&lt;em&gt;DIR&lt;/em&gt;_.&quot;/xml&quot;), $isDevMode);&lt;br/&gt;
        where &quot;xml&quot; directory is same level as bootstraps and create_xxxxx files are. When executing script to create a product&lt;br/&gt;
        Doctrine work as expected, creating a row inside table correctly.&lt;br/&gt;
   b) If you comment line where class Product is included, the object can&apos;t be found at runtime and will throw an exception as expected.&lt;br/&gt;
   c) With uncommented require Product line, change xml name folder to anything, and Doctrine throw an exception (MappingException) as expected&lt;/p&gt;

&lt;p&gt;so Setup method path argument is considered correctly again, Doctrine engine must know where xml files for classes are.&lt;/p&gt;

&lt;p&gt;3) Annotations&lt;br/&gt;
   a) When using Annotations as mapping driver you need a path to Setup::createAnnotationsMetadataConfiguration( ) method, I use this&lt;br/&gt;
         Setup::createAnnotationsMetadataConfiguration(array(_&lt;em&gt;DIR&lt;/em&gt;_.&quot;/entities&quot;), $isDevMode);&lt;br/&gt;
        where &quot;entities&quot; directory is same level as bootstraps and create_xxxxx files are (but remember THEY ARE EMPTY). When executing script to create a product&lt;br/&gt;
        Doctrine WORK AS EXPECTED, creating a row inside table correctly and still I don&apos;t know how if THERE IS NO Annotations files.&lt;br/&gt;
   b) If you comment line where class Product is included, the object can&apos;t be found at runtime and will throw an exception as expected.&lt;br/&gt;
   c) With uncommented require Product line, change name folder to anything, and Doctrine WILL NOT throw an exception, continue with execution.&lt;br/&gt;
   d) Copy /Product.php to /entities/Product.php, then comment docblocks from /Product class (using // or delete them). When running script Doctrine throw a MappingException with message: &quot;Class Product is not a valid entity or mapped super class&quot;, when as follow concepts from 1) (yaml) and 2) (xml) it should search docblocks from /entities/Product.php file (path argument from Setup), right?&lt;/p&gt;

&lt;p&gt;so Setup method path argument IS NOT CONSIDERED, Doctrine engine use already defined classes to get Annotations docblocks using php reflexion classes, methods and functions.&lt;/p&gt;

&lt;p&gt;How to deal with this? I mean...&lt;/p&gt;

&lt;p&gt;a) Erase path argument from Setup::createAnnotationMetadataConfiguration methos (and similar functions for Annotations) because is not needed, classes and annotations must be defined before.&lt;br/&gt;
b) Add support to find docblocks from path argument when no valid dockblock is found from class definition, so entities classes can live without docblocks because they are found inside Setup path function argument, as YAML and XML do.&lt;/p&gt;

&lt;p&gt;       I know that is easy to follow tutorial guidelines to develop applications in Annotations point of view, load them before Doctrine script start (with require/include or autoloaders, etc) and will work, but I think that is wrong how tutorial and functional logic are given, so a) and b) are my proposed solutions. I think b) should be right, get dockblocks from a class already defined and if are not defined it follow XML and YAML logic: read metadata from other files.&lt;/p&gt;

&lt;p&gt;Attachment: My bugtracker Netbeans project.&lt;/p&gt;

&lt;p&gt;Sorry by my english &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.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;</description>
                <environment>openSUSE 12.1 x86, Apache/2.2.21, mysql 5.5.16, PHP 5.3.8 (modules: Core, ctype, curl, date, dom, ereg, filter, gd, hash, http, iconv, json, libxml, mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, pcre, PDO, pdo_mysql, pdo_sqlite, Reflection, session, SimpleXML, SPL, SQLite, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zip, zlib )</environment>
            <key id="13432">DDC-1645</key>
            <summary>Paths to Annotations classes are not considered</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="feathersanddown">feathers and down</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Feb 2012 04:54:28 +0000</created>
                <updated>Fri, 10 Feb 2012 04:54:28 +0000</updated>
                                    <version>2.2</version>
                                                <component>Documentation</component>
                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11158" name="bugtracker.zip" size="1764088" author="feathersanddown" created="Fri, 10 Feb 2012 04:54:28 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1530] HIDDEN values cannot be used in WhereClause</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1530</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&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;SELECT  u, u.name AS HIDDEN n FROM User u WHERE n = ?1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Is broken. Error:&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;SQLSTATE[42S22]: Column not found: 1054 Unknown column &apos;sclr16&apos; in &apos;where clause
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;On a query like:&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;SELECT s0_.id AS id0, s0_.a AS a1, s0_.b AS b2, s0_.c AS c3, s0_.d AS d4, s0_.e AS e5, s0_.f AS f6, s0_.g AS g7, s0_.h AS h8, s0_.i AS i9, s0_.j AS j10, s0_.k AS k11, s0_.l AS l12, s0_.m AS m13, s0_.n AS n14, s0_.o AS o15, 123456789 AS sclr16, s0_.p AS p17 FROM myEntity s0_ WHERE s0_.a = 1 AND sclr16 &amp;lt;= ? ORDER BY sclr16 ASC 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13254">DDC-1530</key>
            <summary>HIDDEN values cannot be used in WhereClause</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Mon, 12 Dec 2011 17:23:37 +0000</created>
                <updated>Wed, 25 Jan 2012 21:40:26 +0000</updated>
                                    <version>Git Master</version>
                                <fixVersion>2.x</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17068" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:20:23 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                    <comment id="17209" author="craue" created="Mon, 9 Jan 2012 23:45:52 +0000"  >&lt;p&gt;It occurs even if the value is not HIDDEN.&lt;/p&gt;</comment>
                    <comment id="17212" author="beberlei" created="Tue, 10 Jan 2012 10:39:26 +0000"  >&lt;p&gt;@Christian this sounds like a completly different error, please explain why you think this belongs here or open a new ticket.&lt;/p&gt;</comment>
                    <comment id="17213" author="craue" created="Tue, 10 Jan 2012 10:47:38 +0000"  >&lt;p&gt;Benjamin: Because I get exactly the same error message regardless of using HIDDEN. So HIDDEN doesn&apos;t seem to be liable here.&lt;/p&gt;</comment>
                    <comment id="17214" author="beberlei" created="Tue, 10 Jan 2012 11:12:24 +0000"  >&lt;p&gt;Can you paste your DQL and SQL?&lt;/p&gt;</comment>
                    <comment id="17215" author="craue" created="Tue, 10 Jan 2012 12:22:18 +0000"  >&lt;p&gt;Code:&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;$queryBuilder
	-&amp;gt;select(&apos;myEntity, 123456789 AS distance&apos;)
	-&amp;gt;where(&apos;distance &amp;lt;= 10&apos;)
;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;DQL:&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;SELECT myEntity, 123456789 AS distance FROM MyCompany\MyBundle\Entity\MyEntity myEntity WHERE distance &amp;lt;= 10
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;SQL:&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;SELECT s0_.id AS id0, s0_.a AS a1, s0_.b AS b2, s0_.c AS c3, s0_.d AS d4, s0_.e AS e5, s0_.f AS f6, s0_.g AS g7, s0_.h AS h8, s0_.i AS i9, s0_.j AS j10, s0_.k AS k11, s0_.l AS l12, s0_.m AS m13, s0_.n AS n14, s0_.o AS o15, 123456789 AS sclr16, s0_.p AS p17 FROM myEntity s0_ WHERE sclr16 &amp;lt;= 10
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="17217" author="beberlei" created="Wed, 11 Jan 2012 11:33:32 +0000"  >&lt;p&gt;That is expected behavior, ANSI SQL defines SELECT to be evaluated &lt;b&gt;AFTER&lt;/b&gt; WHERE.&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;SELECT 1234 AS foo FROM `test` HAVING foo = 1234
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;DQL has a HAVING clause as well, not sure it works without the group by. Please try.&lt;/p&gt;</comment>
                    <comment id="17320" author="craue" created="Sat, 21 Jan 2012 14:04:28 +0000"  >&lt;p&gt;So we might just close this issue then?&lt;/p&gt;</comment>
                    <comment id="17335" author="beberlei" created="Wed, 25 Jan 2012 21:40:26 +0000"  >&lt;p&gt;Its not a bug, just the error message is supposed to be improved (if possible) in a cheap way.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1611] Tools Reference example is apparently wrong</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1611</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I was reading &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.1/en/reference/tools.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.1/en/reference/tools.html&lt;/a&gt;&lt;br/&gt;
In 24.2.2. Configuration (Non-PEAR)&lt;/p&gt;

&lt;p&gt;The example seems to be wrong.&lt;/p&gt;

&lt;p&gt;use Doctrine\DBAL\Tools\Console\Helper\EntityManagerHelper;&lt;br/&gt;
should be&lt;br/&gt;
use Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper;&lt;/p&gt;

&lt;p&gt;That&apos;s all.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13373">DDC-1611</key>
            <summary>Tools Reference example is apparently wrong</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="5" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/trivial.png">Trivial</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="tarcisio.fischer">Tarc&#237;sio Fischer</reporter>
                        <labels>
                    </labels>
                <created>Thu, 19 Jan 2012 05:15:54 +0000</created>
                <updated>Fri, 20 Jan 2012 09:19:14 +0000</updated>
                                                                    <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17310" author="craz" created="Fri, 20 Jan 2012 09:19:14 +0000"  >&lt;p&gt;Yes, this is a real problem.&lt;/p&gt;

&lt;p&gt;fixation and helped me&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1570] GH-243: Add ProxyFactoryInterface to allow custom proxy factories</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1570</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Pull-Request was automatically synchronized: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/243&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/243&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&apos;d love to have my custom proxy factory used with ORM, which is not possible at the moment&lt;/p&gt;

&lt;p&gt;(my experimental proxy &lt;a href=&quot;https://github.com/juzna/doctrine2/commit/7822446036201b066e390b2e182cac1dc0c85430&quot; class=&quot;external-link&quot;&gt;https://github.com/juzna/doctrine2/commit/7822446036201b066e390b2e182cac1dc0c85430&lt;/a&gt; and some comments about it &lt;a href=&quot;http://blog.juzna.cz/2011/06/lazy-loading-in-php/&quot; class=&quot;external-link&quot;&gt;http://blog.juzna.cz/2011/06/lazy-loading-in-php/&lt;/a&gt;)&lt;/p&gt;</description>
                <environment></environment>
            <key id="13316">DDC-1570</key>
            <summary>GH-243: Add ProxyFactoryInterface to allow custom proxy factories</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 28 Dec 2011 12:39:03 +0000</created>
                <updated>Wed, 28 Dec 2011 19:49:30 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1564] MySQL Failure when using setFirstResult() and omitting setMaxResults()</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1564</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When using setFirstResult() and omitting setMaxResults(), MySQL throws an error. This was very confusing for me until I dumped the SQL statements and found out the reason.&lt;/p&gt;

&lt;p&gt;I know that MySQL doesn&apos;t directly support this, their manual says that you should set the second parameter to LIMIT to a very high number (18446744073709551615 in their example).&lt;/p&gt;

&lt;p&gt;I&apos;d recommend that either throwing an error in the specific platform driver or follow the MySQL example.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13308">DDC-1564</key>
            <summary>MySQL Failure when using setFirstResult() and omitting setMaxResults()</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="felicitus">Timo A. Hummel</reporter>
                        <labels>
                    </labels>
                <created>Sun, 25 Dec 2011 11:47:33 +0000</created>
                <updated>Wed, 28 Dec 2011 08:48:17 +0000</updated>
                                    <version>2.1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17125" author="beberlei" created="Wed, 28 Dec 2011 08:48:17 +0000"  >&lt;p&gt;Changed into improvement, i am not sure how this relates to other databases.&lt;/p&gt;

&lt;p&gt;You can just use this workaround yourself so long.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1555] Reference. 8 Work. with obj. Making &quot;see &quot;Transitive Persistence&quot;&quot; as link</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1555</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;8. Working with Objects:&lt;br/&gt;
&quot;... if the relationships from X to these other entities are mapped with cascade=PERSIST or cascade=ALL (see &quot;Transitive Persistence&quot;).&quot;&lt;br/&gt;
&quot;... with cascade=REMOVE or cascade=ALL (see &quot;Transitive Persistence&quot;).&quot;&lt;br/&gt;
and so on.&lt;br/&gt;
Maybe it&apos;s reasonable to make &quot;Transitive Persistence&quot; as links to &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.1/en/reference/working-with-associations.html#transitive-persistence-cascade-operations&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.1/en/reference/working-with-associations.html#transitive-persistence-cascade-operations&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13293">DDC-1555</key>
            <summary>Reference. 8 Work. with obj. Making &quot;see &quot;Transitive Persistence&quot;&quot; as link</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="dattaya">Yaroslav Kiliba</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Dec 2011 14:51:35 +0000</created>
                <updated>Thu, 22 Dec 2011 14:55:31 +0000</updated>
                                    <version>2.1</version>
                <version>2.1.1</version>
                <version>2.1.2</version>
                <version>2.1.3</version>
                <version>2.1.4</version>
                <version>2.1.5</version>
                                                <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1552] JTI Owning table for identifier columns could/should be the entitytable</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1552</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When ordering a JTI entity on id, the generated SQL will use the table of the root entity. This is because the root entity is listed as owner of the field in the _owningTableMap, leading to non-optimal queries.&lt;/p&gt;

&lt;p&gt;More information see:&lt;br/&gt;
&lt;a href=&quot;https://groups.google.com/forum/#!topic/doctrine-user/znkkP7IF_Aw&quot; class=&quot;external-link&quot;&gt;https://groups.google.com/forum/#!topic/doctrine-user/znkkP7IF_Aw&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13289">DDC-1552</key>
            <summary>JTI Owning table for identifier columns could/should be the entitytable</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="asm89">Alexander</assignee>
                                <reporter username="asm89">Alexander</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Dec 2011 11:15:52 +0000</created>
                <updated>Thu, 22 Dec 2011 11:36:51 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17084" author="asm89" created="Thu, 22 Dec 2011 11:17:04 +0000"  >&lt;p&gt;I can pick this up if it&apos;s agreed upon that this could indeed be improved.&lt;/p&gt;</comment>
                    <comment id="17086" author="ocramius" created="Thu, 22 Dec 2011 11:33:06 +0000"  >&lt;p&gt;The problem here is that joining with a JTI causes LEFT JOINS, which don&apos;t perform very well when it comes to sorting the results.&lt;/p&gt;

&lt;p&gt;Just as a quick reference, here&apos;s where &quot;something&quot; should be changed to get this working:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Query/SqlWalker.php#L316&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Query/SqlWalker.php#L316&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When the field is part of the primary key, the field used for sorting results should be the one of the table of the entity itself, and not of the root of the CTI.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1553] JTI Joining root tables could include ON ... AND root.id IS NOT NULL for each root in the inheritance</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1553</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Would lead to more optimal queries, while still allowing for LEFT JOIN. Also related to this:&lt;br/&gt;
&lt;a href=&quot;https://groups.google.com/forum/#!topic/doctrine-user/znkkP7IF_Aw&quot; class=&quot;external-link&quot;&gt;https://groups.google.com/forum/#!topic/doctrine-user/znkkP7IF_Aw&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13290">DDC-1553</key>
            <summary>JTI Joining root tables could include ON ... AND root.id IS NOT NULL for each root in the inheritance</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="asm89">Alexander</assignee>
                                <reporter username="asm89">Alexander</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Dec 2011 11:21:32 +0000</created>
                <updated>Thu, 22 Dec 2011 11:21:52 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17085" author="asm89" created="Thu, 22 Dec 2011 11:21:52 +0000"  >&lt;p&gt;Again I can pick this up if this improvement is agreed upon.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1370] preInsert, postInsert, prePersist, postPersist, preUpdate, postUpdate code and documentation of events</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1370</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Currently we have a set of Lifecycle events, but they seem to be misleading both in actual implementation and documentation.&lt;/p&gt;

&lt;p&gt;One good example is prePersist and postPersist, which is only fired when you&apos;re creating new entities. It should be renamed to preInsert and postInsert.&lt;br/&gt;
As of preUpdate and postUpdate, they seem quite valid.&lt;/p&gt;

&lt;p&gt;But if we rename prePersist and postPersist to (pre|post)Insert, we may have a situation where you wanna cover both insert and update.&lt;br/&gt;
For this, (pre|post)Persist should be reinstated, but acting differently from what it does currently.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13007">DDC-1370</key>
            <summary>preInsert, postInsert, prePersist, postPersist, preUpdate, postUpdate code and documentation of events</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Fri, 9 Sep 2011 20:03:57 +0000</created>
                <updated>Tue, 20 Dec 2011 22:23:54 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16459" author="rdohms" created="Fri, 9 Sep 2011 20:07:39 +0000"  >&lt;p&gt;Also, documentation for post* methods is broken at the website:&lt;/p&gt;

&lt;p&gt;&quot;Changes in here are not relevant to the persistence in the database, but you can use this events to&quot; &lt;/p&gt;

&lt;p&gt;It cuts off in mid-sentence.&lt;/p&gt;</comment>
                    <comment id="16954" author="guilhermeblanco" created="Fri, 9 Dec 2011 04:51:27 +0000"  >&lt;p&gt;RDohms, this paragraph was already sorted out.&lt;/p&gt;

&lt;p&gt;The actual ticket is still valid here.&lt;/p&gt;</comment>
                    <comment id="17079" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:23:54 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1415] EventListener delegate on entity basis</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1415</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="13080">DDC-1415</key>
            <summary>EventListener delegate on entity basis</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="4" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 11 Oct 2011 21:22:28 +0000</created>
                <updated>Tue, 20 Dec 2011 22:22:59 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16970" author="beberlei" created="Mon, 12 Dec 2011 15:46:34 +0000"  >&lt;p&gt;Removed from master, as i dont like the api at all&lt;/p&gt;</comment>
                    <comment id="17077" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:22:59 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-668] add upsert support</title>
                <link>http://doctrine-project.org/jira/browse/DDC-668</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Didnt find anything in the docs on this. Is D2 capable of doing an UPSERT &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; in case I am trying to persist an object that may or may not have been saved previously. Different RDBMS support different syntax for this case. Like MySQL has INSERT .. ON DUPLICATE KEY UPDATE (or even INSERT IGNORE) while the SQL standard defines a MERGE syntax which seems to be gaining support. Of course you can always fallback to a SELECT FOR UPDATE (or if you want to be hacky an INSERT which catches duplicate key violations .. but probably not a good idea since many RDBMS rollback on a failure inside a transaction).&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; &lt;a href=&quot;http://en.wikipedia.org/wiki/Upsert&quot; class=&quot;external-link&quot;&gt;http://en.wikipedia.org/wiki/Upsert&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See also &lt;a href=&quot;http://opensource.atlassian.com/projects/hibernate/browse/HHH-3011&quot; class=&quot;external-link&quot;&gt;http://opensource.atlassian.com/projects/hibernate/browse/HHH-3011&lt;/a&gt; asking for MERGE support&lt;/p&gt;

&lt;p&gt;Ideally there would be a way to define on a model or model instance level if merge logic should be applied.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11585">DDC-668</key>
            <summary>add upsert support</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="lsmith">Lukas Kahwe</reporter>
                        <labels>
                    </labels>
                <created>Sun, 4 Jul 2010 17:20:19 +0000</created>
                <updated>Tue, 20 Dec 2011 22:22:01 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>4</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="13543" author="robertb" created="Fri, 9 Jul 2010 01:16:50 +0000"  >&lt;p&gt;Doctrine_Record defines a replace() method. &lt;/p&gt;

&lt;p&gt;In the MySQL Doctrine implementation, however, it is not the same as INSERT .. ON DUPLICATE KEY UPDATE. The replace() method implemented in Doctrine_Connection_Mysql uses the REPLACE INTO syntax, which is a DELETE and then INSERT when the key exists. This is fine, except for tables that use auto-increment fields. The delete-then-insert operation yields a new auto-incremented value, whereas INSERT .. ON DUPLICTATE KEY UPDATE would not.&lt;/p&gt;</comment>
                    <comment id="13544" author="lsmith" created="Fri, 9 Jul 2010 02:34:53 +0000"  >&lt;p&gt;MySQL (and SQLite) REPLACE is a no go. It causes way too much disc I/O and worse yet totally screws up the on disk data structures because of the deleting.&lt;/p&gt;</comment>
                    <comment id="16238" author="beberlei" created="Sun, 31 Jul 2011 08:48:13 +0000"  >&lt;p&gt;Scheduled for 2.2&lt;/p&gt;</comment>
                    <comment id="16239" author="beberlei" created="Sun, 31 Jul 2011 09:09:56 +0000"  >&lt;p&gt;Evaluating this makes me sad, except MySQL support for this is rather non-existant, and the oracle merge is aiming at batch operations.&lt;/p&gt;</comment>
                    <comment id="16681" author="beberlei" created="Sat, 22 Oct 2011 11:08:32 +0000"  >&lt;p&gt;Should this be done with&lt;/p&gt;

&lt;p&gt;1. Select first, then insert&lt;br/&gt;
2. Catch and evaluate exception then update&lt;/p&gt;

&lt;p&gt;I am leaning towards 1.&lt;/p&gt;</comment>
                    <comment id="17074" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:22:01 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1450] UnitOfWork Transaction Rollback Support</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1450</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The UnitOfWork does not handle the case very well where a rollback is necessary. Can this be optimized?&lt;/p&gt;</description>
                <environment></environment>
            <key id="13122">DDC-1450</key>
            <summary>UnitOfWork Transaction Rollback Support</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 24 Oct 2011 07:51:09 +0000</created>
                <updated>Tue, 20 Dec 2011 22:21:37 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17073" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:21:37 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1393] Skipping tables or columns in database driver or SchemaTool</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1393</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;There should be a sane way to skip sources of errors in SchemaTool and the DatabaseDriver.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13040">DDC-1393</key>
            <summary>Skipping tables or columns in database driver or SchemaTool</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 24 Sep 2011 12:23:10 +0000</created>
                <updated>Tue, 20 Dec 2011 22:21:26 +0000</updated>
                                    <version>2.1.1</version>
                <version>Git Master</version>
                                <fixVersion>2.x</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16502" author="beberlei" created="Sat, 24 Sep 2011 13:17:52 +0000"  >&lt;p&gt;Idea:&lt;/p&gt;

&lt;p&gt;Develop a datastructure of sorts that allows saving information about skipping tables and columns therein when reverse engeneering.&lt;/p&gt;</comment>
                    <comment id="16953" author="guilhermeblanco" created="Fri, 9 Dec 2011 04:48:47 +0000"  >&lt;p&gt;This is not possible unless you take advantage of Topological Sorting to map class dependencies like we do inside of UnitOfWork AFTER creating the ClassMetadata.&lt;/p&gt;

&lt;p&gt;The necessity of having this is mandatory because we can never skip classes that have associations to other ones though FK.&lt;br/&gt;
You may try that, but it doesn&apos;t compensate the effort. I&apos;d rather mark this bug as won&apos;t fix, but I&apos;m leaving for you do that. =)&lt;/p&gt;</comment>
                    <comment id="17072" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:21:26 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1445] Improve error messages</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1445</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Error messages throughout ClassMetadata validation and UnitOfWork cycles can be significantly improved.&lt;/p&gt;

&lt;p&gt;Work is being done on: &lt;a href=&quot;https://github.com/doctrine/doctrine2/tree/ImproveErrorMessages&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/tree/ImproveErrorMessages&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13110">DDC-1445</key>
            <summary>Improve error messages</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 22 Oct 2011 08:48:50 +0000</created>
                <updated>Tue, 20 Dec 2011 22:21:04 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17070" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:21:04 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1308] Add cache for transient information and invalidation for ClassMetadata</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1308</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Two different things have to be improved in the caching:&lt;/p&gt;

&lt;p&gt;1. The information isTransient() has to be moved to the ClassMetadataFactory and cached there.&lt;br/&gt;
2. The information getAllClassMetadataNames() can be cached&lt;br/&gt;
3. A debug/development mode should be introduced, leading to filemtime caching and checks so that you can use ApcCache and such in development.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12882">DDC-1308</key>
            <summary>Add cache for transient information and invalidation for ClassMetadata</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 31 Jul 2011 18:45:24 +0000</created>
                <updated>Tue, 20 Dec 2011 22:20:51 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17069" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:20:51 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1543] Support for Mapping Files on Traits</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1543</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;With PHP 5.4 and traits coming we should find a way where you can add xml and yml configurations for a trait and upon loading an entity X, it also loads the trait configuration of this entity.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13277">DDC-1543</key>
            <summary>Support for Mapping Files on Traits</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 17 Dec 2011 17:08:06 +0000</created>
                <updated>Sat, 17 Dec 2011 17:08:06 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1538] GH-217: [BUG] Schema Manager had no way to define extra options</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1538</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Pull-Request was automatically synchronized: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/217&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/217&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Schema Manager had no way to define extra options (&quot;comment&quot; option for example). It is possible to add these options via Annotations. After the fix adding `@ORM\Column(type=&quot;string&quot;, options=&lt;/p&gt;
{&quot;comment&quot; = &quot;test&quot;}
&lt;p&gt;)` starts to work producing valid SQL schema with COMMENT output.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13266">DDC-1538</key>
            <summary>GH-217: [BUG] Schema Manager had no way to define extra options</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 14 Dec 2011 16:45:03 +0000</created>
                <updated>Sat, 17 Dec 2011 11:52:55 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1532] PostFlush lifecycle event</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1532</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In some cases, the database-id of the newly created record is needed in some postproccessing steps, like sending an e-mail containing a link to the just created entity. I&apos;ve recently seen the added support for PostFlush, but this is not a lifecycle event. &lt;/p&gt;

&lt;p&gt;class SomeEntityClass{&lt;/p&gt;

&lt;p&gt;    /** @PostFlush */&lt;br/&gt;
    function sendSomeEmail()&lt;/p&gt;
{
        sendEmail(&apos;
            &apos;Hi, you&apos;re new invoice can be found online: http://www.example.com/invoices/invoice_&apos;.$this-&amp;gt;id
        &apos;;
    }

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

&lt;p&gt;Perhaps it&apos;s even possible to have multiple PostFlush events, that differentiate between the first time a record is created, and when the record is merely updated.&lt;/p&gt;
</description>
                <environment></environment>
            <key id="13257">DDC-1532</key>
            <summary>PostFlush lifecycle event</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="jack@actinum.nl">Jack van Galen</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Dec 2011 11:43:26 +0000</created>
                <updated>Wed, 14 Dec 2011 11:13:14 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16985" author="jack@actinum.nl" created="Wed, 14 Dec 2011 11:13:14 +0000"  >&lt;p&gt;Okay, please ignore this issue, as I now see that the @PostPersist does exactly what I need. I was thrown by the name, because to me, the order in which stuff happens is persist -&amp;gt; flush. The ID&apos;s are only known after flush, so i&apos;d expected something like postflush to exist. Sorry.&lt;/p&gt;
</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1025] Please repalce &apos;Doctrine\XXX\YYY&apos; with &apos;\Doctrine\XXX\YYY&apos; in code and document</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1025</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It will help us use the namespace and code autocomplete in some IDE.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12370">DDC-1025</key>
            <summary>Please repalce &apos;Doctrine\XXX\YYY&apos; with &apos;\Doctrine\XXX\YYY&apos; in code and document</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="wsyb">ben yan</reporter>
                        <labels>
                    </labels>
                <created>Wed, 9 Feb 2011 21:33:28 +0000</created>
                <updated>Tue, 13 Dec 2011 20:41:16 +0000</updated>
                                    <version>2.0.1</version>
                                                <component>Documentation</component>
                <component>DQL</component>
                <component>Mapping Drivers</component>
                <component>ORM</component>
                <component>Tools</component>
                        <due></due>
                    <votes>7</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="15717" author="matthieu" created="Fri, 8 Apr 2011 17:51:14 +0000"  >&lt;p&gt;Hi, do you have any more information about this ?&lt;/p&gt;

&lt;p&gt;I&apos;m confused because the php documentation uses the Doctrine\XXX way, and everywhere I&apos;ve seen, it is used like that.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                    <comment id="15718" author="k-fish" created="Mon, 11 Apr 2011 04:41:27 +0000"  >&lt;p&gt;The issue is simple and logical. &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.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;When an IDE (I am using PhpStorm and it does it like this) sees a namespace in a file, upon seeing namespaces afterwards, it sees them as absolute if they have a leading backslash, or relative when it does not. This affects the resolution of classes for type navigation, code inspection, ...  The same rules as for actual PHP code should be used within comments.&lt;/p&gt;

&lt;p&gt;Here is an 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-java&quot;&gt;namespace Foo;

class Bar {

  /**
   * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Baz
   */
  &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $baz;

  /**
   * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; \Quux
   */
  &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $quux;

}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The IDE will think $baz is \Foo\Baz and $quux will be seen as being \Quux. Now if you have some reference to Doctrine here, and it was relative, the IDE would assume it&apos;s \Foo\Doctrine\...&lt;/p&gt;</comment>
                    <comment id="15719" author="beberlei" created="Mon, 11 Apr 2011 04:57:42 +0000"  >&lt;p&gt;Well yes, but since all our code examples have no leading namespace argument this means the code is in the default namespace, making Doctrine\XXX\YY a relative namespace that is actually valid.&lt;/p&gt;</comment>
                    <comment id="15720" author="k-fish" created="Mon, 11 Apr 2011 05:46:52 +0000"  >&lt;p&gt;Yes, but the source code docblocks are what is meant here as far as I am concerned.&lt;/p&gt;</comment>
                    <comment id="15838" author="morfi" created="Fri, 13 May 2011 11:08:57 +0000"  >&lt;p&gt;Example (Entitymanager.php):&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;namespace Doctrine\ORM;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and&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;/**
  * The used Configuration.
  *
  * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Doctrine\ORM\Configuration
  */
   &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $config;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Result:&lt;br/&gt;
&lt;b&gt;Doctrine\ORM\Doctrine\ORM\Configuration&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Should be:&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;/**
  * The used Configuration.
  *
  * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Configuration
  */
   &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $config;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Or&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;/**
  * The used Configuration.
  *
  * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; \Doctrine\ORM\Configuration
  */
   &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $config;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="15887" author="mvrhov" created="Fri, 27 May 2011 09:36:15 +0000"  >&lt;p&gt;Why don&apos;t you take this to the PhpStorm tracker as it surely is a bug in IDE?&lt;/p&gt;</comment>
                    <comment id="15888" author="k-fish" created="Fri, 27 May 2011 12:43:39 +0000"  >&lt;p&gt;Miha, what makes you think it&apos;s an IDE bug? In a class in namespace Foo another class named Bar is \Foo\Bar, but \Bar is \Bar. Why is it a bug if the IDE follows the namespace resolution rules?&lt;/p&gt;
</comment>
                    <comment id="16146" author="mridgway" created="Mon, 11 Jul 2011 17:34:05 +0000"  >&lt;p&gt;The issue is that PHPStorm and NetBeans have different class resolution rules. I also use PHPStorm and most of Doctrine does not resolve auto-completion correctly because of this issue.&lt;/p&gt;

&lt;p&gt;I&apos;d be willing to work on this if it would be accepted.&lt;/p&gt;</comment>
                    <comment id="16535" author="andrewmackrodt" created="Thu, 29 Sep 2011 11:58:52 +0000"  >&lt;p&gt;I&apos;ve been evaluating PhpStorm and also came across this issue; I believe the problem is due to Doctrine rather than being a bug with the IDE although it would be nice if PhpStorm would assume namespaces are absolute if they&apos;re not resolved upon an initial lookup.&lt;/p&gt;

&lt;p&gt;I created a quick c# app to append the beginning forward slash to any @var or @return attributes within Doctrine&apos;s source. It&apos;s working for me with Doctrine 2.1.2 and PhpStorm (IntelliJ): &lt;a href=&quot;http://pastebin.com/4HxiWvJA&quot; class=&quot;external-link&quot;&gt;http://pastebin.com/4HxiWvJA&lt;/a&gt; - hopefully this will be of use for anyone else using these IDEs;. Note: the application doesn&apos;t detect multiple line annotations although the only one I&apos;m aware of is the getAST method in Doctrine\ORM\Query.php.&lt;/p&gt;</comment>
                    <comment id="16978" author="beberlei" created="Tue, 13 Dec 2011 20:41:09 +0000"  >&lt;p&gt;This issue is referenced in Github Pull-Request GH-215&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/215&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/215&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="16979" author="beberlei" created="Tue, 13 Dec 2011 20:41:16 +0000"  >&lt;p&gt;This issue is referenced in Github Pull-Request GH-216&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/216&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/216&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-658] Reverse engineering with Oracle (DBDriver and Associations as Identifier)</title>
                <link>http://doctrine-project.org/jira/browse/DDC-658</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am playing with reverse engineering with Oracle and I have some problems:&lt;/p&gt;

&lt;p&gt;My schema:&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;drop table PHONE_NUMBER;
drop table CUSTOMER;

create table CUSTOMER (
   CUSTOMER_ID             NUMBER(4)                       not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;,
   CUSTOMER_LASTNAME       VARCHAR2(50)                    not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;,
   CUSTOMER_MODIFIED       DATE,
   constraint PK_CUSTOMER primary key (CUSTOMER_ID)
         using index
       tablespace TBS_INDEX
       storage
       (
           initial 100K
           next 100K
       )
)
storage
(
    initial 100K
    next 100K
)
tablespace TBS_DATA;

create table PHONE_NUMBER (
   PHONE_NUMBER_ID         NUMBER(4)                       not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;,
   CUSTOMER_ID             NUMBER(4)                       not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;,
   PHONE_NUMBER            VARCHAR2(50)                    not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;,
   PHONE_NUMBERMODIFIED    DATE,
   constraint PK_PHONE_NUMBER primary key (PHONE_NUMBER_ID, CUSTOMER_ID)
         using index
       tablespace TBS_INDEX
       storage
       (
           initial 100K
           next 100K
       )
)
storage
(
    initial 100K
    next 100K
)
tablespace TBS_DATA;

alter table PHONE_NUMBER
   add constraint PHONE_NUMBER__CUSTOMER foreign key (CUSTOMER_ID)
      references CUSTOMER (CUSTOMER_ID);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I obtain &quot;Fatal error: Uncaught exception &apos;Doctrine\ORM\Mapping\MappingException&apos; with message &apos;Property &quot;customerId&quot; in &quot;PhoneNumber&quot; was already declared, but it must be declared only once&apos;&quot;&lt;/p&gt;

&lt;p&gt;It&apos;s because a foreign key is a component of the primary key.&lt;/p&gt;</description>
                <environment>Ubuntu 10.04 + Oracle 11g Entreprise + PHP 5.3.2 + Doctrine2 Git (up-to-date) </environment>
            <key id="11559">DDC-658</key>
            <summary>Reverse engineering with Oracle (DBDriver and Associations as Identifier)</summary>
                <type id="5" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/subtask_alternate.png">Sub-task</type>
                    <parent id="10344">DDC-117</parent>
                        <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="mikaelkael">Mickael Perraud</reporter>
                        <labels>
                    </labels>
                <created>Sun, 27 Jun 2010 10:48:25 +0000</created>
                <updated>Sun, 11 Dec 2011 05:39:00 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="13435" author="mikaelkael" created="Mon, 28 Jun 2010 04:44:25 +0000"  >&lt;p&gt;This is the continuation of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-616&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-616&lt;/a&gt;. Only the schema is different.&lt;/p&gt;</comment>
                    <comment id="13436" author="beberlei" created="Mon, 28 Jun 2010 04:52:22 +0000"  >&lt;p&gt;just for understanding this scenario:&lt;/p&gt;

&lt;p&gt;Is this a One-To-One relation and the TABLE_TEST2 &quot;inherits&quot; the primary key from its parent TABLE_TEST1?&lt;/p&gt;

&lt;p&gt;If yes, this construct is not yet supported by Doctrine 2, we still need to include an ID-Generator that supports this kind of schema.&lt;/p&gt;</comment>
                    <comment id="13437" author="mikaelkael" created="Mon, 28 Jun 2010 05:42:41 +0000"  >&lt;p&gt;Change for a more understandable use case. Note that it&apos;s not my real use case and that I work on legacy database on which I can&apos;t change the structure.&lt;/p&gt;</comment>
                    <comment id="15083" author="beberlei" created="Sat, 1 Jan 2011 15:50:02 +0000"  >&lt;p&gt;updated the issue topic to get a better grasp of what needs to be done here.&lt;/p&gt;</comment>
                    <comment id="15966" author="waldo2188" created="Thu, 9 Jun 2011 14:26:50 +0000"  >&lt;p&gt;I have the same error with Mysql whit the same condition.&lt;/p&gt;</comment>
                    <comment id="16923" author="beberlei" created="Mon, 28 Nov 2011 12:11:09 +0000"  >&lt;p&gt;More details on the work to be done:&lt;/p&gt;

&lt;p&gt;The relevant code is in Doctrine/ORM/Mapping/Driver/DatabaseDriver.php only.&lt;/p&gt;

&lt;p&gt;The idea is currently many-to-many tables are detected by checking that the table has foreign keys on all the primary key columns (no additional columns!)&lt;/p&gt;

&lt;p&gt;Now with the 2.1 feature of foreign key/primary key entities this is not necessarily true anymore. You can have the primary keys being foreign keys BUT have additional columns that are not part of the primary key. This has to be detected.&lt;/p&gt;

&lt;p&gt;If a foreign key-primary-key entity is found that has additional columns a ClassMetadata has to be created and the associations have to be created with the &quot;id&quot; =&amp;gt; true flag in mapManyToOne().&lt;/p&gt;</comment>
                    <comment id="16962" author="scott459" created="Sun, 11 Dec 2011 05:39:00 +0000"  >&lt;p&gt;For what it&apos;s worth, I&apos;m getting this error when I have a PK that is a single column and not a FK.&lt;/p&gt;

&lt;p&gt;  PRIMARY KEY (`id`),&lt;br/&gt;
  UNIQUE KEY `cycle_station_id` (`cycle`,`station_id`),&lt;br/&gt;
  KEY `station_id_idx` (`station_id`),&lt;br/&gt;
  KEY `readings` (`readings`),&lt;br/&gt;
  KEY `source` (`source`),&lt;br/&gt;
  KEY `temperature_min_max` (`temperature_max`,`temperature_min`),&lt;br/&gt;
  KEY `station_id_cycle` (`station_id`,`cycle`,`updated_at`),&lt;br/&gt;
  CONSTRAINT `compiled_1_station_id_stations_id` FOREIGN KEY (`station_id`) REFERENCES `stations` (`id`),&lt;br/&gt;
  CONSTRAINT `compiled_1_station_id_stations_id_1` FOREIGN KEY (`station_id`) REFERENCES `stations` (`id`) ON DELETE CASCADE&lt;br/&gt;
) ENGINE=InnoDB AUTO_INCREMENT=160833690 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1518] Method chaining in Setters of generated entity classes</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1518</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi.&lt;br/&gt;
It would be nice if the set-methods of the generated entity classes would return the entity instance itself, so that method chaining is possible.&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-java&quot;&gt;$user = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; User();
$user-&amp;gt;setUsername()
     -&amp;gt;setFirstname()
     -&amp;gt;setEmail();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In PHP 5.4 we can do even more nicer:&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;$user = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; User()
     -&amp;gt;setUsername()
     -&amp;gt;setFirstname()
     -&amp;gt;setEmail();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If this is not wanted by everyone, the console tool could get a new argument to define if method chaining should be used or not.&lt;/p&gt;

&lt;p&gt;Implementation of this improvement would be very nice. Thanks.&lt;/p&gt;</description>
                <environment>Symfony2</environment>
            <key id="13236">DDC-1518</key>
            <summary>Method chaining in Setters of generated entity classes</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://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="naitsirch">Christian Stoller</reporter>
                        <labels>
                    </labels>
                <created>Fri, 2 Dec 2011 13:45:40 +0000</created>
                <updated>Fri, 2 Dec 2011 13:45:40 +0000</updated>
                                                                    <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1513] Missing documentation for using references in Docs</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1513</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am in the process of switching over from Doctrine 2.0.7 to Doctrine 2.1 and one of the major missing components in my entities was the new use of using the mapping entity.&lt;/p&gt;

&lt;p&gt;Example:&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; 
&amp;lt;?php
namespace My\Project\Entities;
use Doctrine\ORM\Mapping\Entity as ORM;
/**
 * @ORM\Entity(...)
 */
class Something
{
// Doctrine annotations here
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;The nessecity for this to be included in the entities is (as far as I can tell) nowhere to be found in the docs, so I am a little curious as to how people are supposed to know. I have also had a look here: &lt;a href=&quot;http://www.doctrine-project.org/blog/doctrine-2-1-beta-release&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/blog/doctrine-2-1-beta-release&lt;/a&gt; and can see no references too it.&lt;/p&gt;

&lt;p&gt;Am I missing something; or is it really just missing from the docs?&lt;/p&gt;</description>
                <environment></environment>
            <key id="13225">DDC-1513</key>
            <summary>Missing documentation for using references in Docs</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="base">Thomas Gray</reporter>
                        <labels>
                    </labels>
                <created>Mon, 28 Nov 2011 22:37:58 +0000</created>
                <updated>Tue, 29 Nov 2011 08:27:22 +0000</updated>
                                                                    <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16925" author="ebernhardson" created="Mon, 28 Nov 2011 22:43:56 +0000"  >&lt;p&gt;I also glanced through the docs and didn&apos;t find it.  I would suggest it be added to the Annotations Reference page: &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.1/en/reference/annotations-reference.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.1/en/reference/annotations-reference.html&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="16926" author="base" created="Tue, 29 Nov 2011 08:27:22 +0000"  >&lt;p&gt;Ahh, so there are some docs about it; &lt;a href=&quot;http://www.doctrine-project.org/docs/common/2.1/en/reference/annotations.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/common/2.1/en/reference/annotations.html&lt;/a&gt; however they do not seem to be that clear; nor well linked too.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1507] State change detection for version incrementation (for optimistic locking) in combination with orphanRemoval</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1507</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;As i understand the documentation correctly, orphanRemoval associations have the meaning of a &quot;part of&quot; relationship. In the example (&lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.0/en/reference/working-with-associations.html#orphan-removal&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/reference/working-with-associations.html#orphan-removal&lt;/a&gt;) the adresses are part of the contact.&lt;/p&gt;

&lt;p&gt;In my opinion we should reason that the state of the adress consists of the states of all nested contacts. As a consequence we should flag the contact as &quot;dirty&quot; when the adresses change.&lt;/p&gt;

&lt;p&gt;This is relevant for optimistic locking scenarios or event handlers. In my application i tried to use optimistic locking for &quot;contacts&quot;, which does not work if i don&apos;t change anything in the contact but only in the nested addresses.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13212">DDC-1507</key>
            <summary>State change detection for version incrementation (for optimistic locking) in combination with orphanRemoval</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://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="georgwaechter">Georg W&#228;chter</reporter>
                        <labels>
                    </labels>
                <created>Wed, 23 Nov 2011 11:48:40 +0000</created>
                <updated>Sun, 27 Nov 2011 13:04:57 +0000</updated>
                                    <version>2.1.4</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16921" author="beberlei" created="Sun, 27 Nov 2011 08:47:25 +0000"  >&lt;p&gt;This is still only an approvement, you can workaround this and handle is in your domain code.&lt;/p&gt;</comment>
                    <comment id="16922" author="georgwaechter" created="Sun, 27 Nov 2011 13:04:57 +0000"  >&lt;p&gt;Not in all cases. The first problem is that my domain code can&apos;t modify the version property, doctrine seems to bl