<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Wed Jun 19 03:55:05 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+DDC+AND+resolution+%3D+Unresolved+AND+priority+%3D+Minor+ORDER+BY+key+DESC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://www.doctrine-project.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Doctrine Project</title>
        <link>http://www.doctrine-project.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+DDC+AND+resolution+%3D+Unresolved+AND+priority+%3D+Minor+ORDER+BY+key+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="98" total="98"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DDC-2515] Schema tool ignores index names in mapping file and uses generated name</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2515</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have defined an index on a foreign key colum in my .dcm.xml mapping file:&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-xml&quot;&gt;
&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;indexes&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;index name=&lt;span class=&quot;code-quote&quot;&gt;&quot;ix_date_created__client_id&quot;&lt;/span&gt; columns=&lt;span class=&quot;code-quote&quot;&gt;&quot;date_created,client_id&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;index name=&lt;span class=&quot;code-quote&quot;&gt;&quot;ix_user_id&quot;&lt;/span&gt; columns=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_id&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/indexes&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However, the resulting CREATE TABLE statement includes:&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;
    INDEX IDX_4848DD9FA76ED395 (user_id), 
    INDEX IDX_4848DD9F4239E22F (accessgroup_id), 
    INDEX IDX_4848DD9FD2112630 (usergroup_id), 
    INDEX ix_date_created__client_id (date_created, client_id), 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So Doctrine seems to be auto-generating indexes for all foreign key columns. I&apos;m assuming this is a feature, even though I&apos;d argue that there are real-life examples where the mere presence of a foreign key constraint does not justify indexing that column. &lt;img class=&quot;emoticon&quot; src=&quot;http://www.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;Anyway, the expected behavior is that Doctrine does not replace existing indexes with generated ones. I will attach a failing test case unless this bug is immediately dismissed as wontfix.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15060">DDC-2515</key>
            <summary>Schema tool ignores index names in mapping file and uses generated name</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="hussdl">Daniel Huss</reporter>
                        <labels>
                    </labels>
                <created>Tue, 18 Jun 2013 12:17:50 +0000</created>
                <updated>Tue, 18 Jun 2013 12:17:50 +0000</updated>
                                    <version>2.3.4</version>
                                                <component>ORM</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2509] Add CLI detection for the APC check on Console cache commands</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2509</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;There is some instanceof checks on the \Doctrine\ORM\Tools\Console\Command\ClearCache&amp;#42; commands to detect if APC is being used, they were introduced here: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/8efae0b232210b27200f2709e7fcb24c7f02c5de&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/8efae0b232210b27200f2709e7fcb24c7f02c5de&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would like to know if it&apos;s possible to add a CLI check too, 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; ($cacheDriver &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; Cache\ApcCache &amp;amp;&amp;amp; PHP_SAPI === &apos;cli&apos; )&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Yeah, I know that those are CLI commands, and so the check looks like unecessary, however, in the particular case that I found it&apos;s necessary, I&apos;m running the commands under an WebUI:&lt;br/&gt;
Before the modification:&lt;br/&gt;
&lt;img src=&quot;http://i.imgur.com/8a2iVl7.jpg&quot; align=&quot;absmiddle&quot; border=&quot;0&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After:&lt;br/&gt;
&lt;img src=&quot;http://i.imgur.com/LTN1aDa.jpg&quot; align=&quot;absmiddle&quot; border=&quot;0&quot; /&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15052">DDC-2509</key>
            <summary>Add CLI detection for the APC check on Console cache commands</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="jcm">Jonathan Cardoso Machado</reporter>
                        <labels>
                    </labels>
                <created>Mon, 17 Jun 2013 01:12:36 +0000</created>
                <updated>Mon, 17 Jun 2013 08:41:24 +0000</updated>
                                    <version>2.3.4</version>
                                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20581" author="ocramius" created="Mon, 17 Jun 2013 08:41:24 +0000"  >&lt;p&gt;CLI commands are not meant to be used in WEB environment (at least not the Symfony CLI ones). You should probably replicate that logic instead.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2479] Add possibility to only query for root entities in a class table inheritance</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2479</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It is not possible to query for root/topmost class entities (only) in a class table inheritance situation without extra JOINs to the child entities/classes.&lt;/p&gt;

&lt;p&gt;E.g.&lt;br/&gt;
Person -&amp;gt; root entity/class&lt;br/&gt;
Employee -&amp;gt; child entity/class extending Person&lt;/p&gt;

&lt;p&gt;The DQL:&lt;/p&gt;

&lt;p&gt;SELECT p&lt;br/&gt;
FROM Person p;&lt;/p&gt;

&lt;p&gt;also joins Employee even though I am not interested in Employee properties.&lt;/p&gt;


&lt;p&gt;Person is the base class in this use case and it should be possible to only retrieve those information. Thinking of OOP, if I instanciate Person I do not have any reference to its child either.&lt;br/&gt;
This is especially useful for large base tables where you want to only retrieve base information without inferring the childs.&lt;/p&gt;

&lt;p&gt;IMO the DQL should be modified to allow selecting root/base information only, similar to the INSTANCE OF operator, that allows selecting specific childs only.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15004">DDC-2479</key>
            <summary>Add possibility to only query for root entities in a class table inheritance</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="deeky666">Steve M&#252;ller</reporter>
                        <labels>
                        <label>dql,</label>
                        <label>inheritance</label>
                    </labels>
                <created>Thu, 30 May 2013 19:32:05 +0000</created>
                <updated>Thu, 30 May 2013 19:32:05 +0000</updated>
                                                                    <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2467] Incorrect work with default values, indexes, autoincrement (patch attached)</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/emoticons/wink.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="and">And</reporter>
                        <labels>
                    </labels>
                <created>Thu, 23 May 2013 07:18:52 +0000</created>
                <updated>Tue, 28 May 2013 17:02:36 +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>
                    <comment id="20454" author="and" created="Tue, 28 May 2013 16:06:30 +0000"  >&lt;p&gt;When it will be merged? Maybe, planned version?&lt;/p&gt;</comment>
                    <comment id="20455" author="ocramius" created="Tue, 28 May 2013 16:15:24 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=and&quot; class=&quot;user-hover&quot; rel=&quot;and&quot;&gt;And&lt;/a&gt; such a patch requires failing tests before being applied - that&apos;s up to whoever picks it up.&lt;/p&gt;</comment>
                    <comment id="20456" author="and" created="Tue, 28 May 2013 16:18:48 +0000"  >&lt;p&gt;So if I add patch with tests - it will be merged? =)&lt;/p&gt;</comment>
                    <comment id="20457" author="ocramius" created="Tue, 28 May 2013 17:02:36 +0000"  >&lt;p&gt;Most probably - you can open a pull request against the current ORM master for that&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-2464] useless index for the middle table of many-to-many relationship</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-2459] ANSI compliant quote strategy.</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-2454] To-Many OrderBy mechanism should allow many-to-one associations</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-2381] Pagination query can be simplified when simple joins are applied</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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://www.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://www.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://www.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://www.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://www.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-2347] Refresh Uniqueidentifier ID from mssql of inserted Entity in doctrine2.3</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-2314] getResults with numeric indexes for fields</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="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-2308] Naming Strategy for Reverse Engeneering</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-2301] Support inheritance in ResultSetMappingBuilder</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-2288] Schema Tool doesn&apos;t update collation on table level</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="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-2287] Getter/Setter: generate &quot;isEnabled()&quot; instead of &quot;getEnabled()&quot; for boolean field in entity classes</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="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-2286] Update documentation for collation</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="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-2283] Paginator with orderBy in joined data retrieve bad result</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="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-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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="10000" iconUrl="http://www.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-2260] Partial DQL query doesn&apos;t respect given order of columns</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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://www.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-2236] SUM(..) with Pagination gives incorrect result</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="3" iconUrl="http://www.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-2227] Add details about developer being responsible of inverse side of an association</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="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-2203] add EntityManager-&gt;getFilters()-&gt;isEnabled(&apos;filterName&apos;&apos;)</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-2200] Duplicates returned while accessing associations from @PostPersist callback</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-2164] Extend the cache support to eAccelerator</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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://www.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://www.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-2140] [GH-512] Added addParameters() to Query and QueryBuilder</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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://www.doctrine-project.org/jira/images/icons/emoticons/wink.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;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-2134] Add referential integrity check for MySQL to console commands</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-2103] Add support for using AliasResultVariable in WhereClause</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-2076] Optimization for MEMBER OF</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-2053] [GH-460] added support to extend strategies for IdGenerators</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="10000" iconUrl="http://www.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-2030] better way to detect class parents</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="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-1993] New method required: ClassMetadataInfo::isAssociationNullable()</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-1988] Add Any and ManyToAny annotations</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="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-1952] Add support for array parameters on the SQLFilter</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-1921] Clarify Identifier definition for CTI entities</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="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-1889] generate persisters</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/inprogress.png">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="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-1888] generate hydrators</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-1847] Do not check for type equality in scalars when computing changeset?</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="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://www.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-1825] generate entities with traits</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="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-1819] Allow ResultSetMapping to be used for objects that are not entities</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="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-1754] Allow use of Foregin Keys in DQL LIKE condition</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="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-1716] Better unique constraints handling or even updateIfExists/findOneOrCreate</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-1675] PDO::FETCH_GROUP</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-1630] Get PersistentCollection::getDeleteDiff is empty when collection changes from 1 item to zero items</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="10000" iconUrl="http://www.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-1555] Reference. 8 Work. with obj. Making &quot;see &quot;Transitive Persistence&quot;&quot; as link</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-1518] Method chaining in Setters of generated entity classes</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-1511] Suggestion on the docs for batch processing</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1511</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am refering to the examples on&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.0/en/reference/batch-processing.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/reference/batch-processing.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let&apos;s say you want to process a bulk of 25 objects and have a batchsize of 20.&lt;br/&gt;
With the code provided the last 5 would not be saved as far as I understand  unless you do another flush after the for-loop.&lt;/p&gt;

&lt;p&gt;This is probably very clear to any experienced Doctrine developer  but maybe it is also confusing for beginners like me (some internet sources say, that flush is executed automatically at the end of the request, but obviously it is not). Maybe this could be mentioned somewhere?&lt;/p&gt;</description>
                <environment>br0wser</environment>
            <key id="13221">DDC-1511</key>
            <summary>Suggestion on the docs for batch processing</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="jamie0725">Jamie Wong</reporter>
                        <labels>
                    </labels>
                <created>Fri, 25 Nov 2011 18:19:19 +0000</created>
                <updated>Fri, 25 Nov 2011 18:19:19 +0000</updated>
                                    <version>2.0</version>
                                                <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1494] Query results are overwritten by previous query.</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="10000" iconUrl="http://www.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-1493] Improving in() from ExpressionBuilder</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1493</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Instead of this piece of 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;$literal = $expr-&amp;gt;literal($v);
$expr-&amp;gt;andX(
  $expr-&amp;gt;eq(&apos;at.key&apos;, $expr-&amp;gt;literal($k)),
  $expr-&amp;gt;orX(
    $expr-&amp;gt;eq(&apos;a.valueInt&apos;, $literal),
    $expr-&amp;gt;eq(&apos;a.valueText&apos;, $literal),
    $expr-&amp;gt;eq(&apos;a.valueDate&apos;, $literal)
  )
);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I would like to simplify my query by using this syntax:&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;$expr-&amp;gt;andX(
  $expr-&amp;gt;eq(&apos;at.key&apos;, $expr-&amp;gt;literal($k)),
  $expr-&amp;gt;in($expr-&amp;gt;literal($v), array(&apos;a.valueInt&apos;, &apos;a.valueText&apos;, &apos;a.valueDate&apos;))
);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13187">DDC-1493</key>
            <summary>Improving in() from ExpressionBuilder</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="h-andreas">Andreas H&#246;rnicke</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Nov 2011 08:06:02 +0000</created>
                <updated>Tue, 15 Nov 2011 08:06:02 +0000</updated>
                                    <version>2.1.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1444] Be able to set a value also used in relation</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1444</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am using a string field for data and for an optional relation too. &lt;br/&gt;
I am not using a ID because the second entity is from a third party application.&lt;/p&gt;

&lt;p&gt;I used two variables in my entity mapping to the same field.&lt;/p&gt;

&lt;p&gt;     /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@var string $an&lt;br/&gt;
     *&lt;/li&gt;
	&lt;li&gt;@ORM\Column(name=&quot;an&quot;, type=&quot;string&quot;, length=20, nullable=false)&lt;br/&gt;
     */&lt;br/&gt;
    private $an;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;    /**    &lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@ORM\OneToOne(targetEntity=&quot;DataLinked&quot;)&lt;/li&gt;
	&lt;li&gt;@ORM\JoinColumn(name=&quot;an&quot;, referencedColumnName=&quot;part&quot;)&lt;br/&gt;
     */&lt;br/&gt;
    private $linked;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The getter is working fine.&lt;/p&gt;


&lt;p&gt;The problem occurs when I create a new entity and would like to persist it.&lt;br/&gt;
As the field is used twice, the value of the second variable is erasing the first value.&lt;/p&gt;


&lt;p&gt;At the line 525 of Doctrine\ORM\Persisters\BasicEntityPersister , I added the following test to update a null value only if there is no fieldName existing.&lt;/p&gt;

&lt;p&gt;...&lt;br/&gt;
                foreach ($assoc&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;sourceToTargetKeyColumns&amp;#39;&amp;#93;&lt;/span&gt; as $sourceColumn =&amp;gt; $targetColumn) {&lt;br/&gt;
                    if ($newVal === null) {&lt;br/&gt;
                        if(!isset($this-&amp;gt;_class-&amp;gt;fieldNames&lt;span class=&quot;error&quot;&gt;&amp;#91;$sourceColumn&amp;#93;&lt;/span&gt;) || in_array($sourceColumn, $this-&amp;gt;_class-&amp;gt;identifier)) &lt;/p&gt;
{
                            $result[$owningTable][$sourceColumn] = null;
                        }
&lt;p&gt;                    } else if ($targetClass-&amp;gt;containsForeignIdentifier) {&lt;br/&gt;
...&lt;/p&gt;


&lt;p&gt;(!isset($this-&amp;gt;_class-&amp;gt;fieldNames&lt;span class=&quot;error&quot;&gt;&amp;#91;$sourceColumn&amp;#93;&lt;/span&gt;)   : Test if there is no existing fieldName&lt;br/&gt;
in_array($sourceColumn, $this-&amp;gt;_class-&amp;gt;identifier))    : avoid skipping identifier definition because ID is listed in fieldNames!&lt;/p&gt;

&lt;p&gt;What do you think about that?&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13109">DDC-1444</key>
            <summary>Be able to set a value also used in relation</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="rapotor">Cedric Lahouste</reporter>
                        <labels>
                    </labels>
                <created>Fri, 21 Oct 2011 09:06:06 +0000</created>
                <updated>Fri, 21 Oct 2011 09:06:06 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1423] Improving ReadOnly annotation by caching query results</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1423</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;We should be able to tell Doctrine that we want the result of requests on ReadOnly marked Entities to be cached. &lt;/p&gt;

&lt;p&gt;For instance:&lt;br/&gt;
$person-&amp;gt;getMoodInformation();&lt;br/&gt;
$person-&amp;gt;getCityInformation();&lt;/p&gt;

&lt;p&gt;CityInformation are not likely to change so it would make sense to cache it and retrieve only MoodInformation (by using an annotation on the concerned Entity).&lt;/p&gt;

&lt;p&gt;What would be even better is to tag which properies we want to hydrate from database and which properties we want to hydrate from cache.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13088">DDC-1423</key>
            <summary>Improving ReadOnly annotation by caching query results</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="jsilvestre">Joseph Silvestre</reporter>
                        <labels>
                    </labels>
                <created>Sun, 16 Oct 2011 10:02:53 +0000</created>
                <updated>Sun, 16 Oct 2011 11:01:50 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1413] Automatically create index for discriminator column</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1413</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It would be nice if the command line orm schema-tool would suggest an index on the discriminator column for single inheritance tables.  Since that column would almost always be in the query, I can&apos;t think of a case when you wouldn&apos;t want it to be in an index&lt;/p&gt;</description>
                <environment></environment>
            <key id="13078">DDC-1413</key>
            <summary>Automatically create index for discriminator column</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ajbrown">A.J. Brown</reporter>
                        <labels>
                    </labels>
                <created>Tue, 11 Oct 2011 15:57:13 +0000</created>
                <updated>Wed, 12 Jun 2013 10:33:20 +0000</updated>
                                    <version>2.1.2</version>
                                                <component>ORM</component>
                <component>Tools</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20546" author="holtkamp" created="Wed, 12 Jun 2013 10:33:20 +0000"  >&lt;p&gt;This topic suggests it is a bad practice though:&lt;br/&gt;
&lt;a href=&quot;https://forum.hibernate.org/viewtopic.php?f=9&amp;amp;t=961578&quot; class=&quot;external-link&quot;&gt;https://forum.hibernate.org/viewtopic.php?f=9&amp;amp;t=961578&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In case of a big STI hierarchy, this might become usefull, additional testing required. However, as soons as a STI hierarchy becomes big, Class Table Inheritance might be more appropriate...&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1409] Download common 404</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1409</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;404 on Common download link : &lt;a href=&quot;http://www.doctrine-project.org/projects/common/download&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/projects/common/download&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13074">DDC-1409</key>
            <summary>Download common 404</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="armetiz">Thomas Tourlourat - Armetiz</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Oct 2011 13:18:23 +0000</created>
                <updated>Mon, 10 Oct 2011 13:18:23 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1405] Define semantics of comparison operators, particularly with regard to null values</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1405</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The Doctrine 2 reference documentation defines the comparison operators syntactically, as:&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;ComparisonOperator  ::= &quot;=&quot; | &quot;&amp;lt;&quot; | &quot;&amp;lt;=&quot; | &quot;&amp;lt;&amp;gt;&quot; | &quot;&amp;gt;&quot; | &quot;&amp;gt;=&quot; | &quot;!=&quot;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now, without experimentation, it is pure guesswork to tell whether e. g. null = null, or e. g. null &amp;lt;&amp;gt; null, or null = 0, or null &amp;lt;&amp;gt; 0 are considered true statements in DQL.&lt;/p&gt;

&lt;p&gt;In SQL semantics, all four statements would be false (or more precisely, null). In PHP semantics, both null == null and null == 0 would be true, while null != null and null != 0 would be false.&lt;/p&gt;

&lt;p&gt;It would be helpful to have the semantics of the comparison operators defined. While comparisons with non-null values behave in a common-sense way, it is hard to guess how queries involving comparison operators on fields allowing null values or null query arguments will filter the results, without knowing the exact semantics of the comparison operators with regard to null values.&lt;/p&gt;

&lt;p&gt;It would be great if this could be clarified in the docs.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13061">DDC-1405</key>
            <summary>Define semantics of comparison operators, particularly with regard to null values</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="dalvarez">Daniel Alvarez Arribas</reporter>
                        <labels>
                    </labels>
                <created>Thu, 6 Oct 2011 23:03:45 +0000</created>
                <updated>Wed, 12 Oct 2011 23:09:44 +0000</updated>
                                    <version>2.1.2</version>
                                                <component>Documentation</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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-1370] preInsert, postInsert, prePersist, postPersist, preUpdate, postUpdate code and documentation of events</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-1332] Specify Custom ProxyFactory</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1332</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;My tweet:&lt;/p&gt;

&lt;p&gt;&amp;gt; @beberlei Have you heard of overriding the ProxyFactory to allow caching of lazy-loaded entities? Trying to do that now &lt;img class=&quot;emoticon&quot; src=&quot;http://www.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;The majority of our data is quite stagnant and so I was shoehorning the capability of the generated proxies to use a custom class.&lt;/p&gt;

&lt;p&gt;My new proxy, in short, will lazy-load the data as normal the first time around, but also stores it in Memcache using an injected adapter.  Upon subsequent lazy-loading, memcache is used rather than a call to the DB.&lt;/p&gt;

&lt;p&gt;I can&apos;t decide if this is better suited for the EntityPersister (which has already been discussed at length), but it seems to fits nicely with a custom proxy.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12921">DDC-1332</key>
            <summary>Specify Custom ProxyFactory</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ericclemmons">Eric Clemmons</reporter>
                        <labels>
                    </labels>
                <created>Mon, 15 Aug 2011 03:52:31 +0000</created>
                <updated>Mon, 15 Aug 2011 13:46:22 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16337" author="beberlei" created="Mon, 15 Aug 2011 09:59:24 +0000"  >&lt;p&gt;This is the wrong extension point to override the proxy factory. It should be in the persisters.&lt;/p&gt;</comment>
                    <comment id="16339" author="ericclemmons" created="Mon, 15 Aug 2011 13:46:22 +0000"  >&lt;p&gt;Ah, so my doubts were well founded.&lt;/p&gt;

&lt;p&gt;The branch allowing custom EntityPersisters has not been merged in yet, has it?  Or, a better question, will it be?  That will dicate if I need to maintain a separate fork for this functionality or find other means to handle this.&lt;/p&gt;

&lt;p&gt;I know how hesitant we were for adding any extension point, because then we feel we have to support it, which makes me wonder if &quot;LifeCycleCallback::preFetch&quot; or similar is a potential alternative.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1329] Documentation for @JoinColumn may be incorrect</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1329</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The Documentation for @JoinColumn annotation states:&lt;br/&gt;
&quot;This annotation is not required. If its not specified the attributes name and referencedColumnName are inferred from the table and primary key names.&quot;&lt;/p&gt;

&lt;p&gt;However, this seems not to be correct. If you have non-standard name for the @Id columns for a @OneToMany/@ManyToMany the name and referencedColumnName are not correctly inferred.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://gist.github.com/e61bf8f4462870ffd4f3&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/e61bf8f4462870ffd4f3&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="12918">DDC-1329</key>
            <summary>Documentation for @JoinColumn may be incorrect</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="djones">Damon Jones</reporter>
                        <labels>
                    </labels>
                <created>Sat, 13 Aug 2011 18:35:50 +0000</created>
                <updated>Sat, 13 Aug 2011 18:35:50 +0000</updated>
                                                                    <component>Documentation</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1283] Possible issue with PersistentCollection#getDelete/InsertDiff()</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="4" iconUrl="http://www.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-1248] Documentation regarding prePersist and postPersist events a bit lacking</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1248</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Please make it more clear that prePersist and postPersist events are called only when creating new entity (that is, prior and after a database insert).&lt;/p&gt;

&lt;p&gt;IRC log:&lt;br/&gt;
helmer&lt;br/&gt;
  Hi. I have a question regarding (pre|post)persist events. Why are the events ignored for second persist (should fire prePersist) + flush (should fire postPersist) in the following pastie: &lt;a href=&quot;http://pastebin.com/V8CrPWkM&quot; class=&quot;external-link&quot;&gt;http://pastebin.com/V8CrPWkM&lt;/a&gt; Is it a bug or am I missing sth?&lt;br/&gt;
Stof&lt;br/&gt;
  helmer: there is no second persist. persist() means saying Doctrine to manage the entity. Once it is managed, you are not persisting it anymore but updating it&lt;br/&gt;
helmer&lt;br/&gt;
  Stof: so basically one could define these two events for themselves as (pre|post)Insert?&lt;br/&gt;
beberlei&lt;br/&gt;
  yes&lt;br/&gt;
helmer&lt;br/&gt;
  thanks beberlei&amp;amp;stof! though a suggestion to docteam .. perhaps make it more clear to people like me, current doc can be kind of misleading ie: &quot;There are two ways for the prePersist event to be triggered. One is obviously when you call EntityManager#persist()&quot; &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.0/en/reference/events.html#prepersist&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/reference/events.html#prepersist&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pastie code (probably expired by now):&lt;br/&gt;
$entity = new Entity();&lt;/p&gt;

&lt;p&gt;$entity-&amp;gt;setSomething(&apos;xxx&apos;);&lt;br/&gt;
$this-&amp;gt;em-&amp;gt;persist($entity);&lt;br/&gt;
$this-&amp;gt;em-&amp;gt;flush();&lt;/p&gt;

&lt;p&gt;$entity-&amp;gt;setSomething(&apos;yyy&apos;);&lt;br/&gt;
$this-&amp;gt;em-&amp;gt;persist($entity);&lt;br/&gt;
$this-&amp;gt;em-&amp;gt;flush();&lt;/p&gt;</description>
                <environment>Browser</environment>
            <key id="12785">DDC-1248</key>
            <summary>Documentation regarding prePersist and postPersist events a bit lacking</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="helmer">Helmer Aaviksoo</reporter>
                        <labels>
                    </labels>
                <created>Mon, 4 Jul 2011 14:43:01 +0000</created>
                <updated>Mon, 4 Jul 2011 14:45:56 +0000</updated>
                                                                    <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1247] Implement AnnotationDriver::addExcludePath</title>
                <link>http://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-1206] Add option to SchemaTool for ignoring unsupported tables</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-1198] Add PHPDocs to annotationclasses</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1198</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;If an IDE would like to support annotations, it&apos;s currently only possible to display all resolvable classes in a code-hint menu when autocompleting annotations, as&lt;br/&gt;
basically any class can be used for annotations.&lt;/p&gt;

&lt;p&gt;To make it possible for IDEs to detect classes which are explicitly meant to be used as annotations, it would be nice to agree on some common&lt;br/&gt;
way of documenting annotations in PHPDocBlocks.&lt;/p&gt;

&lt;p&gt;Here&apos;s an example of what this could look like:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/pulse00/doctrine2/commit/25a14e9edc406edfd33e54fc38922a191e9cbe83&quot; class=&quot;external-link&quot;&gt;https://github.com/pulse00/doctrine2/commit/25a14e9edc406edfd33e54fc38922a191e9cbe83&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This way IDEs can prioritize annotated classes in code-hints and add additional information to the user. &lt;/p&gt;</description>
                <environment></environment>
            <key id="12701">DDC-1198</key>
            <summary>Add PHPDocs to annotationclasses</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="pulse00">Robert Gruendler</reporter>
                        <labels>
                    </labels>
                <created>Wed, 8 Jun 2011 11:35:38 +0000</created>
                <updated>Wed, 8 Jun 2011 11:35:38 +0000</updated>
                                                                    <component>Mapping Drivers</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1123] Confusing error message when an ID is missing</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1123</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The error message you get when an entity is missing an ID when attempting to persist it is rather confusing.&lt;/p&gt;

&lt;p&gt;&quot;Entity of type Some\Entity\Name is missing an assigned ID.&quot;&lt;/p&gt;

&lt;p&gt;This does not tell me anything at all. I had absolutely no idea what an assigned ID was. I totally randomly noticed that I had mistyped @GeneratedValue as @GenratedValue, and fixing it fixed the issue.&lt;/p&gt;

&lt;p&gt;Perhaps the message makes sense if you&apos;re familiar with Doctrine 2 internals, but I think it should be changed to something more helpful, such as &quot;Entity of type X is missing primary key&quot;. &lt;/p&gt;

&lt;p&gt;Alternatively it could keep the same message, but it could suggest a possible error (&quot;Does the entity have a primary key set?&quot;) or perhaps the documentation could include a reference to it to help debug.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12575">DDC-1123</key>
            <summary>Confusing error message when an ID is missing</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="jhartikainen">Jani Hartikainen</reporter>
                        <labels>
                    </labels>
                <created>Mon, 25 Apr 2011 02:03:30 +0000</created>
                <updated>Tue, 15 Nov 2011 06:48:53 +0000</updated>
                                    <version>2.0.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16832" author="pmliju" created="Tue, 15 Nov 2011 06:48:29 +0000"  >&lt;p&gt;I too came across the same issue. The error message is not up to the mark here. In my case, mapping for primary key was missing the generator strategy,&lt;/p&gt;

&lt;p&gt;&amp;lt;generator strategy=&quot;IDENTITY&quot;/&amp;gt;&lt;/p&gt;

&lt;p&gt;Thanks 	Jani Hartikainen for the hint. &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1103] Addding an event before the load of collections</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1103</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;An event triggered when loading collections would be useful for performances. The use case would be batch querying some stuff instead of doing a query per object of the collection in a postLoad event.&lt;br/&gt;
For instance, the Translatable extension from &lt;a href=&quot;https://github.com/l3pp4rd/DoctrineExtensions&quot; class=&quot;external-link&quot;&gt;https://github.com/l3pp4rd/DoctrineExtensions&lt;/a&gt; loads the translations on postLoad which result in many queries. Being able to load them all in a single query would be useful.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12534">DDC-1103</key>
            <summary>Addding an event before the load of collections</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="stof">Christophe Coevoet</reporter>
                        <labels>
                    </labels>
                <created>Tue, 5 Apr 2011 02:45:57 +0000</created>
                <updated>Tue, 5 Apr 2011 03:20:22 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="15680" author="gediminasm" created="Tue, 5 Apr 2011 03:20:22 +0000"  >&lt;p&gt;I think custom persisters will solve these issues, lets wait for them, there are already enough events&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1081] Unnecessary JOIN when selecting ManyToMany/Join Table by ID.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1081</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;With the schema:&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; 
Image
    @Id
    $id

Tag
    @Id
    $Id

Tag_Image
    @Id
    @OneToOne(targetEntity=&quot;Tag&quot;)
    @JoinColumn(name=&quot;tag&quot;)
    $tag

    @Id
    @OneToOne(targetEntity=&quot;Image&quot;)
    @JoinColumn(name=&quot;image&quot;)
    $image
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Given the following DQL, &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;    SELECT img
    FROM Image 
    LEFT JOIN img.tags tag
    WHERE tag.id=:tag
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Doctrine Generates this SQL&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; 
    SELECT i0_.id AS id1 
    FROM Image i0_ 
    LEFT JOIN Tag_Image t2_ 
        ON i0_.id = t2_.image 
    LEFT JOIN Tag t1_ 
        ON t1_.id = t2_.tag 
    WHERE t1_.id = 37
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;p&gt;Which unncessarily joins against Tag, given that the foreign key Tag.id is also found in Tag_Image.tag.&lt;/p&gt;

</description>
                <environment></environment>
            <key id="12503">DDC-1081</key>
            <summary>Unnecessary JOIN when selecting ManyToMany/Join Table by ID.</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="4" iconUrl="http://www.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="putgeminmouth">David Reisch</reporter>
                        <labels>
                    </labels>
                <created>Sun, 27 Mar 2011 12:21:20 +0000</created>
                <updated>Mon, 28 Mar 2011 10:03:44 +0000</updated>
                                    <version>2.0</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="15596" author="beberlei" created="Sun, 27 Mar 2011 14:40:41 +0000"  >&lt;p&gt;This is not a bug, but expected behavior.&lt;/p&gt;

&lt;p&gt;You can select against the alias if its on the owning side of the association:&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 img
FROM Image img 
WHERE img.tag=:tag
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In this case it is not a left join though, if you want a left join you HAVE to join.&lt;/p&gt;</comment>
                    <comment id="15598" author="putgeminmouth" created="Sun, 27 Mar 2011 20:36:44 +0000"  >&lt;p&gt;There is no owning isde of the association, you can clearly see there is an association table/entity.&lt;/p&gt;

&lt;p&gt;I can&apos;t understand how this behavior is expected. If no properties of Tag are selected for, there is no need to join against Tag since the id is already available via the association table.&lt;/p&gt;</comment>
                    <comment id="15599" author="beberlei" created="Mon, 28 Mar 2011 03:36:34 +0000"  >&lt;p&gt;I misread the mappings, sorry, i though its a @OneToOne but its actually an assocition entity with @OneToOnes.&lt;/p&gt;

&lt;p&gt;Can you show me the Image::$tags mapping also?&lt;/p&gt;</comment>
                    <comment id="15606" author="putgeminmouth" created="Mon, 28 Mar 2011 08:27:57 +0000"  >&lt;p&gt;That is correct, thanks for taking another look at this.&lt;br/&gt;
Sorry I had forgotten to include that information.&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;Image
    /**
        @Id
    */
    $id

    /**
        @ManyToMany(targetEntity=&quot;Tag&quot;)
        @JoinTable(name=&quot;Tag_Image&quot;, 
                            joinColumns={@JoinColumn(name=&quot;image&quot;)},
                            inverseJoinColumns={@JoinColumn(name=&quot;tag&quot;)})
    */
    $tags
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="15607" author="beberlei" created="Mon, 28 Mar 2011 08:56:44 +0000"  >&lt;p&gt;The targetEntity is wrong. I suppose it should be Image_Tag or not? If it should be Tag, then you don&apos;t need that Image_Tag entity at all.&lt;/p&gt;

&lt;p&gt;In that case i have to check if you can use the shortcut notation, however it will again not work with the left join - only inner. This is an assumption the ORM makes and there is not yet code included for the optimization. This is not a bug, but an improvement ticket. The functionality works.&lt;/p&gt;</comment>
                    <comment id="15608" author="putgeminmouth" created="Mon, 28 Mar 2011 09:12:26 +0000"  >&lt;p&gt;No argument on the ticket type...&lt;/p&gt;

&lt;p&gt;Ahh, I store some metadata in Tag_Image, which is why I manage it explicitly.&lt;/p&gt;

&lt;p&gt;In any case thanks for looking at this.&lt;/p&gt;</comment>
                    <comment id="15609" author="beberlei" created="Mon, 28 Mar 2011 09:43:12 +0000"  >&lt;p&gt;If you change the targetEntity to Tag_Image then it might already be enough to get this working without another join.&lt;/p&gt;</comment>
                    <comment id="15610" author="putgeminmouth" created="Mon, 28 Mar 2011 10:03:44 +0000"  >&lt;p&gt;With this change, the original query is invalid:&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;    LEFT JOIN i.tags t
    WHERE t.id=:tag
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Because i.tags of type Tag_Image has no field id&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;Semantical Error&amp;#93;&lt;/span&gt; line 0, col 138 near &apos;id=:tag &apos;: Error: Class domain\Tag_Image has no field or association named id&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I attempt the logical modification:&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;    LEFT JOIN i.tags t
    WHERE t.tag=:tag
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and get&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;SELECT i0_.id AS id0
FROM Image i0_ 
LEFT JOIN Tag_Image t1_ ON i0_.id = t1_.image 
LEFT JOIN Tag_Image t1_ ON t1_.id = t1_.tag 
WHERE t1_.tag = 37
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;42000&amp;#93;&lt;/span&gt;: Syntax error or access violation: 1066 Not unique table/alias: &apos;t1_&lt;/p&gt;&lt;/blockquote&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1058] Documentation on orphan removal in XML Mapping is incorrect</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1058</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The XML Mapping documentation indicates that &quot;orphan-removal&quot; is an attribute on One-to-One or Many-to-One elements, but in DoctrineORM version 2.0 that does not work.  It seems I have to make &quot;orphan-removal&quot; a child attribute of those elements to turn it on. &lt;/p&gt;

&lt;p&gt;Just to be clear:&lt;/p&gt;

&lt;p&gt;Documentation says to do this, but it does not work:&lt;br/&gt;
&amp;lt;one-to-many field=&quot;...&quot; orphan-removal=&quot;true&quot;&amp;gt; ... &amp;lt;/one-to-many&amp;gt;&lt;/p&gt;

&lt;p&gt;This does work:&lt;br/&gt;
&amp;lt;one-to-many field=&quot;...&quot;&amp;gt; &amp;lt;orphan-removal&amp;gt;true&amp;lt;/orphan-removal&amp;gt; &amp;lt;/one-to-many&amp;gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="12450">DDC-1058</key>
            <summary>Documentation on orphan removal in XML Mapping is incorrect</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="jfreed">Josh Freed</reporter>
                        <labels>
                    </labels>
                <created>Fri, 4 Mar 2011 12:38:09 +0000</created>
                <updated>Fri, 4 Mar 2011 12:38:09 +0000</updated>
                                    <version>2.0</version>
                                                <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1015] @DiscriminatorColumn is not required anymore</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1015</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Since &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-514&quot; title=&quot;Default for discriminator column&quot;&gt;&lt;del&gt;DDC-514&lt;/del&gt;&lt;/a&gt; there is a default in place for this, thus the description is wrong in stating this is required.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12353">DDC-1015</key>
            <summary>@DiscriminatorColumn is not required anymore</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="k-fish">Karsten Dambekalns</reporter>
                        <labels>
                    </labels>
                <created>Thu, 3 Feb 2011 10:29:25 +0000</created>
                <updated>Thu, 3 Feb 2011 10:29:25 +0000</updated>
                                                                    <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1010] Crash when fetching results from qb inside postLoad event</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-987] How to register lifecycle callbacks from YAML is not done correctly in the Events section of the documentation.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-987</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.0/en/reference/events.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/reference/events.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above URL has an example of how to register lifecycle callbacks from YAML, but actually it does not work. The correct way of doing it is mentioned on the page: &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.0/en/reference/yaml-mapping.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/reference/yaml-mapping.html&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="12303">DDC-987</key>
            <summary>How to register lifecycle callbacks from YAML is not done correctly in the Events section of the documentation.</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="vanamir">Amir</reporter>
                        <labels>
                    </labels>
                <created>Fri, 14 Jan 2011 16:17:49 +0000</created>
                <updated>Fri, 14 Jan 2011 16:17:49 +0000</updated>
                                                                    <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-986] bad cli commands in ORM introduction</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-986</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I read mini tutorial &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.0/en/reference/introduction.html#mini-tutorial&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/reference/introduction.html#mini-tutorial&lt;/a&gt; and try run command &quot;doctrine orm:schema-tool --drop&quot;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;TIP When you create new model classes or alter existing ones you can recreate the database schema with the command doctrine orm:schema-tool --drop followed by doctrine orm:schema-tool --create.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;It&apos;s not worked for me:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;InvalidArgumentException&amp;#93;&lt;/span&gt;                 &lt;br/&gt;
  Command &quot;orm:schema-tool&quot; is not defined. &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;But command &quot;doctrine orm:schema-tool:drop --force&quot; and &quot;doctrine orm:schema-tool:create&quot; is worked. &lt;br/&gt;
It&apos;s bug in documentation?&lt;/p&gt;</description>
                <environment></environment>
            <key id="12302">DDC-986</key>
            <summary>bad cli commands in ORM introduction</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="stfalcon">Stepan Tanasiychuk</reporter>
                        <labels>
                    </labels>
                <created>Fri, 14 Jan 2011 15:28:27 +0000</created>
                <updated>Sat, 15 Jan 2011 04:22:56 +0000</updated>
                                                                    <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-977] Allow for multiple filters to be set from the command line</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-977</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;m working with an existing database with a large number of tables, I would like to generate metadata mappings for a subset of tables using the command below. The Doctrine code states that the &apos;filter&apos; option should be an array but there doesn&apos;t seem to be any way to pass in an array from the command line? Is the command below the syntax intended for the filter option? If so this may be a Symfony issue?&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Command&lt;/b&gt;&lt;br/&gt;
php doctrine.php orm:convert-mapping --filter=&quot;TableOne&quot; --filter=&quot;TableTwo&quot; --from-database xml /Path/To/Metadata&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Expected result&lt;/b&gt;&lt;br/&gt;
Processing entity &quot;TableOne&quot;&lt;br/&gt;
Processing entity &quot;TableTwo&quot;&lt;br/&gt;
Exporting &quot;xml&quot; mapping information to &quot;/Path/To/Metadata&quot;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Actual result&lt;/b&gt;&lt;br/&gt;
Processing entity &quot;TableTwo&quot;&lt;br/&gt;
Exporting &quot;xml&quot; mapping information to &quot;/Path/To/Metadata&quot;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Relevant code&lt;/b&gt;&lt;br/&gt;
&lt;a href=&quot;http://j.mp/eJD963&quot; class=&quot;external-link&quot;&gt;http://j.mp/eJD963&lt;/a&gt; (Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php)&lt;br/&gt;
&lt;a href=&quot;http://j.mp/f1ADXm&quot; class=&quot;external-link&quot;&gt;http://j.mp/f1ADXm&lt;/a&gt; (Symfony/Component/Console/Input/ArgvInput.php)&lt;/p&gt;</description>
                <environment>OSX, PHP 5.3, MySQL 5.1</environment>
            <key id="12291">DDC-977</key>
            <summary>Allow for multiple filters to be set from the command line</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="skl">Stephen Lang</reporter>
                        <labels>
                    </labels>
                <created>Tue, 11 Jan 2011 10:43:11 +0000</created>
                <updated>Tue, 11 Jan 2011 10:44:19 +0000</updated>
                                    <version>Git Master</version>
                                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="15123" author="skl" created="Tue, 11 Jan 2011 10:44:19 +0000"  >&lt;p&gt;Changed priority to minor.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-957] When there is no GeneratedValue strategy on a primary key, setter function should be generated</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-957</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In the YAML/XML, if no GeneratedValue strategy is given for the primary key, a setter function is required in the generated entity class. Currently only a getter is made.&lt;/p&gt;</description>
                <environment>PHP 5.3.3</environment>
            <key id="12262">DDC-957</key>
            <summary>When there is no GeneratedValue strategy on a primary key, setter function should be generated</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="flynsarmy">Flyn San</reporter>
                        <labels>
                    </labels>
                <created>Wed, 29 Dec 2010 08:41:33 +0000</created>
                <updated>Wed, 29 Dec 2010 08:48:31 +0000</updated>
                                    <version>2.0</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-935] copy function needs implementation</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-935</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The (deep)copy function of the entity manager is not yet implemented. I assume this is known, but I could not find any open issue on it. This is a pretty powerfull feature once implemented. The function body is completely empty however. Perhaps the tried code could be added so I and others could try and resolve the known issue with this function (recursion limit reached). &lt;/p&gt;</description>
                <environment></environment>
            <key id="12231">DDC-935</key>
            <summary>copy function needs implementation</summary>
                <type id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/task.png">Task</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="jackvangalen">Jack van Galen</reporter>
                        <labels>
                    </labels>
                <created>Wed, 15 Dec 2010 10:29:00 +0000</created>
                <updated>Sun, 2 Jan 2011 03:13:16 +0000</updated>
                                    <version>2.0-RC2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14970" author="beberlei" created="Wed, 15 Dec 2010 12:07:26 +0000"  >&lt;p&gt;There was never code written for that function. I don&apos;t think its too problematic that this is missing. You only have to implement __clone (and do so safely as the docs/cookbook describes) and then pass this structure to persist. Optionally making use of cascade persist.&lt;/p&gt;</comment>
                    <comment id="15080" author="mstoehr" created="Sat, 1 Jan 2011 12:34:04 +0000"  >&lt;p&gt;I recently came accross this. Is there any best practice if you have to clone an entity who has several associations? I thought of grabbing them and clone them one by one. Or is there a more convenient way?&lt;/p&gt;</comment>
                    <comment id="15086" author="beberlei" created="Sun, 2 Jan 2011 03:12:50 +0000"  >&lt;p&gt;no, except implementing __clone and doing it there.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-900] Insufficient Error Information for orm:validate-schema</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-900</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Running &quot;doctrine orm:validate-schema&quot; would return -&amp;gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;Database&amp;#93;&lt;/span&gt; FAIL - The database schema is not in sync with the current mapping file.&lt;/p&gt;

&lt;p&gt;It should have at least return the name of the table/field that is not in sync.&lt;/p&gt;</description>
                <environment>linux, php 5.3.3</environment>
            <key id="12174">DDC-900</key>
            <summary>Insufficient Error Information for orm:validate-schema</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="aurorius">aurorius</reporter>
                        <labels>
                    </labels>
                <created>Mon, 29 Nov 2010 06:37:16 +0000</created>
                <updated>Mon, 29 Nov 2010 06:37:16 +0000</updated>
                                    <version>2.0-BETA4</version>
                                                <component>Tools</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-891] DDC-117: No sequence generation with composite foreign key</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-891</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Given the following entity definitions, Doctrine does not attempt to manage generated values. For example, in MySQL, it is perfectly possible to create a composite primary key and set auto_increment on one of these. See below the code for issues that occur.&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;User.php&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * @Entity
 */
class User {
	/**
	 * @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; $name;
	
	/**
	 * @OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;PhoneNumber&quot;&lt;/span&gt;,mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;,cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;all&quot;&lt;/span&gt;})
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $phoneNumbers;
	
	&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setName ($name) {
		$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;name = $name;
	}
}
&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;PhoneNumber.php&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * @Entity
 */
class PhoneNumber {
	/**
	 * @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;
	
	/**
	 * @Id
	 * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;User&quot;&lt;/span&gt;,cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;all&quot;&lt;/span&gt;})
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $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; $phonenumber;
	
	&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setUser (User $user) {
		$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;user = $user;
	}
	
	&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setPhoneNumber ($phoneNumber) {
		$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;phonenumber = $phoneNumber;
	}
}
&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;Invokation&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$albert = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; User;
$albert-&amp;gt;setName(&lt;span class=&quot;code-quote&quot;&gt;&quot;albert&quot;&lt;/span&gt;);
$em-&amp;gt;persist($albert);

$phoneAlbert1 = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; PhoneNumber();
$phoneAlbert1-&amp;gt;setUser($albert);
$phoneAlbert1-&amp;gt;setPhoneNumber(&lt;span class=&quot;code-quote&quot;&gt;&quot;albert home: 012345&quot;&lt;/span&gt;);
$em-&amp;gt;persist($phoneAlbert1);

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

&lt;p&gt;The first issue which occurs is that Doctrine does not generate the field &quot;id&quot; within PhoneNumber set to auto_increment.&lt;/p&gt;

&lt;p&gt;The second issue which occurs is that Doctrine becomes confused when inserting a new record into PhoneNumber, because of the following INSERT INTO statement:&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;Insert Statement&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;INSERT INTO PhoneNumber (user_id, phonenumber) VALUES (?, ?)
array(1) {
  [1]=&amp;gt;
  string(19) &lt;span class=&quot;code-quote&quot;&gt;&quot;albert home: 012345&quot;&lt;/span&gt;
}

SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="12158">DDC-891</key>
            <summary>DDC-117: No sequence generation with composite foreign key</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="felicitus">Timo A. Hummel</reporter>
                        <labels>
                    </labels>
                <created>Thu, 25 Nov 2010 00:40:24 +0000</created>
                <updated>Thu, 25 Nov 2010 06:05:05 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="14830" author="romanb" created="Thu, 25 Nov 2010 02:28:52 +0000"  >&lt;p&gt;I don&apos;t think this will ever be possible.&lt;/p&gt;</comment>
                    <comment id="14831" author="felicitus" created="Thu, 25 Nov 2010 02:32:39 +0000"  >&lt;p&gt;Is there a technical reason for that? I mean, with &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-117&quot; title=&quot;Allow @Id on @ManyToOne fields&quot;&gt;&lt;del&gt;DDC-117&lt;/del&gt;&lt;/a&gt; we are aiming for composite foreign keys, or is &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-117&quot; title=&quot;Allow @Id on @ManyToOne fields&quot;&gt;&lt;del&gt;DDC-117&lt;/del&gt;&lt;/a&gt; cancelled?&lt;/p&gt;</comment>
                    <comment id="14835" author="beberlei" created="Thu, 25 Nov 2010 04:55:19 +0000"  >&lt;p&gt;A composite key is ALWAYS of the type &quot;ASSIGNED&quot; and cannot be a combination of different id generation strategies.&lt;/p&gt;

&lt;p&gt;You could however write a prePersist Listener that does this for you.&lt;/p&gt;</comment>
                    <comment id="14836" author="felicitus" created="Thu, 25 Nov 2010 06:05:05 +0000"  >&lt;p&gt;Okay, maybe this is a feature for 3.0 or so. However, I&apos;d suggest leaving this bug open as this is something which needs to be documented once &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-117&quot; title=&quot;Allow @Id on @ManyToOne fields&quot;&gt;&lt;del&gt;DDC-117&lt;/del&gt;&lt;/a&gt; becomes integrated within the main branch.&lt;/p&gt;

&lt;p&gt;Additionally, Doctrine should complain about different ID generation strategies. Right now it silently ignores it.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-878] Don&apos;t explicitly require object members (fields) to be defined in the entity class</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-878</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Currently, Doctrine REQUIRES that a given entity class have protected or private members explicitly defined in the class (even if meta data mapping is handled elsewhere, such as in YAML). This is less than optimal...for example, many class implementations prefer to store all data in a protected $fields member, as an array, accessing the members with getters and setters.&lt;/p&gt;

&lt;p&gt;Doctrine makes this behavior impossible. An exception is thrown if a field defined in meta data is not an explicit member of the class. Instead, it should &apos;take the meta data&apos;s word for it&apos; that the field exists, and is accessible via getters and setters, without explicitly checking for the member. The meta data is already the authoritative source, I don&apos;t see why the double check should (or needs to) be performed (although I am not familiar with Doctrine internals). Since Doctrine recommends making members private, I have to assume it is already hydrating them with the get/set accessors anyway...so it should just rely on them.&lt;/p&gt;

&lt;p&gt;Quick example use case (notice &apos;name&apos; is not actually a member...it is stored in $fields and assume meta data is defined in a separate yaml file):&lt;/p&gt;

&lt;p&gt;class User &lt;/p&gt;
{
protected $fields = array();

public function getName()
{
return $this-&amp;gt;fields[&apos;name&apos;];
}

public function setName($name)
{
$this-&amp;gt;fields[&apos;name&apos;] = $name;
}

}</description>
                <environment></environment>
            <key id="12104">DDC-878</key>
            <summary>Don&apos;t explicitly require object members (fields) to be defined in the entity class</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="nd987">Nick Daugherty</reporter>
                        <labels>
                    </labels>
                <created>Tue, 16 Nov 2010 01:19:35 +0000</created>
                <updated>Tue, 16 Nov 2010 13:12:24 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="14743" author="beberlei" created="Tue, 16 Nov 2010 03:07:56 +0000"  >&lt;p&gt;This maybe a potential optimization for a very future version. However currently we heavily rely on the Reflection support for properties, which kind of makes a change of this a very complex undertaking.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-838] SchemaTool - ignores the attribute uniq in relations</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-838</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;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;Mapper&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&amp;lt;entity name=&lt;span class=&quot;code-quote&quot;&gt;&quot;Default_Model_Test&quot;&lt;/span&gt; table=&lt;span class=&quot;code-quote&quot;&gt;&quot;test&quot;&lt;/span&gt;&amp;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;integer&quot;&lt;/span&gt; column=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;&amp;gt;
    &amp;lt;generator strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;AUTO&quot;&lt;/span&gt;/&amp;gt;
  &amp;lt;/id&amp;gt;
  &amp;lt;field name=&lt;span class=&quot;code-quote&quot;&gt;&quot;blabla&quot;&lt;/span&gt; column=&lt;span class=&quot;code-quote&quot;&gt;&quot;blabla&quot;&lt;/span&gt; type=&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-object&quot;&gt;boolean&lt;/span&gt;&quot;&lt;/span&gt;/&amp;gt;
  &amp;lt;one-to-one field=&lt;span class=&quot;code-quote&quot;&gt;&quot;user&quot;&lt;/span&gt; target-entity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Users_Model_User&quot;&lt;/span&gt;&amp;gt;
    &amp;lt;join-column name=&lt;span class=&quot;code-quote&quot;&gt;&quot;users_id&quot;&lt;/span&gt; referenced-column-name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt; on-delete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt; on-update=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt; unique=&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;&quot;&lt;/span&gt; /&amp;gt;
  &amp;lt;/one-to-one&amp;gt;
&amp;lt;/entity&amp;gt;
&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;SQL&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;CREATE TABLE test (id INT AUTO_INCREMENT NOT NULL, users_id INT DEFAULT NULL, blabla TINYINT(1) NOT NULL, UNIQUE INDEX test_users_id_uniq (users_id), PRIMARY KEY(id)) ENGINE = InnoDB;
ALTER TABLE test ADD FOREIGN KEY (users_id) REFERENCES users(id) ON UPDATE CASCADE ON DELETE CASCADE;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Actual:&lt;br/&gt;
UNIQUE INDEX test_users_id_uniq (users_id)&lt;/p&gt;

&lt;p&gt;Expected:&lt;br/&gt;
INDEX test_users_id (users_id)&lt;/p&gt;</description>
                <environment>Ubuntu, PHP 5.3.2, MySQL </environment>
            <key id="12005">DDC-838</key>
            <summary>SchemaTool - ignores the attribute uniq in relations</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="gektor">gektor</reporter>
                        <labels>
                    </labels>
                <created>Wed, 13 Oct 2010 12:01:46 +0000</created>
                <updated>Fri, 29 Oct 2010 09:23:04 +0000</updated>
                                    <version>2.0-BETA4</version>
                                <fixVersion>2.x</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14564" author="beberlei" created="Thu, 14 Oct 2010 03:35:46 +0000"  >&lt;p&gt;Verified, i just don&apos;t understand why you are using a one-to-one relation and then &quot;deactivate&quot; the database constraint for this. You could easily use Many-To-One&lt;/p&gt;</comment>
                    <comment id="14566" author="gektor" created="Thu, 14 Oct 2010 08:25:18 +0000"  >&lt;p&gt;You are right. It&apos;s not a bug, it&apos;s feature.&lt;/p&gt;</comment>
                    <comment id="14612" author="beberlei" created="Fri, 29 Oct 2010 09:23:04 +0000"  >&lt;p&gt;This might still be a good improvement to allow the flexibility, but its not a bug. Updating to &quot;Minor Improvmenet for 2.x&quot;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-747] Add support for table, column and indexes comments</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-747</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It would be nice to add support for table comments, column comments and indexes comments, i.e.&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;@Table(
    name=&lt;span class=&quot;code-quote&quot;&gt;&quot;ecommerce_products&quot;&lt;/span&gt;,
    comment=&lt;span class=&quot;code-quote&quot;&gt;&quot;Contains products&quot;&lt;/span&gt;,
    indexes={@index(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;search_idx&quot;&lt;/span&gt;, comment=&lt;span class=&quot;code-quote&quot;&gt;&quot;Makes finding people by name easier&quot;&lt;/span&gt;, columns={&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;email&quot;&lt;/span&gt;})}
)

@Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;, comment=&lt;span class=&quot;code-quote&quot;&gt;&quot;Stores the user&apos;s age, in years&quot;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;



&lt;p&gt;MySQL supports comments via &lt;a href=&quot;http://dev.mysql.com/doc/refman/4.1/en/create-table.html&quot; class=&quot;external-link&quot;&gt;ALTER TABLE&lt;/a&gt; since 4.1.&lt;br/&gt;
PostgreSQL support comments via &lt;a href=&quot;http://www.postgresql.org/docs/7.4/static/sql-comment.html&quot; class=&quot;external-link&quot;&gt;COMMENT&lt;/a&gt; at least since 7.4.&lt;br/&gt;
SQLite &lt;a href=&quot;http://www.sqlite.org/cvstrac/wiki?p=UnsupportedSql&quot; class=&quot;external-link&quot;&gt;doesn&apos;t appear to support table, column or indexes comments&lt;/a&gt; as of 3.7.&lt;br/&gt;
Oracle supports comments on tables and columns via &lt;a href=&quot;http://download.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_4009.htm#SQLRF01109&quot; class=&quot;external-link&quot;&gt;COMMENT&lt;/a&gt; at least since 10.1. It doesn&apos;t appear to support comments on indexes.&lt;/p&gt;

&lt;p&gt;For databases that don&apos;t support those persistent comments, you could use normal SQL comments in the table definition. Of course they wouldn&apos;t be stored by the database, but at least they would appear in the generated schema, that&apos;s better than nothing.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11771">DDC-747</key>
            <summary>Add support for table, column and indexes comments</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="s9e">s9e</reporter>
                        <labels>
                    </labels>
                <created>Fri, 13 Aug 2010 23:17:17 +0000</created>
                <updated>Sat, 14 Aug 2010 06:32:08 +0000</updated>
                                                                    <component>Mapping Drivers</component>
                        <due></due>
                    <votes>5</votes>
                        <watches>5</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-740] Mantain a list of DQL reserved keywords</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-740</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;We should keep a list of DQ reserved keywords, so users can check out what they can use or not.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11745">DDC-740</key>
            <summary>Mantain a list of DQL reserved keywords</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Mon, 9 Aug 2010 16:35:53 +0000</created>
                <updated>Mon, 9 Aug 2010 16:35:53 +0000</updated>
                                                                    <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-718] Bottleneck in computeAssociationChanges()?</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-718</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It seems that since &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-600&quot; title=&quot;Persisting Entities with unmanaged related associations produces ugly notices&quot;&gt;&lt;del&gt;DDC-600&lt;/del&gt;&lt;/a&gt; computeAssociationChanges() iterate over entries of an collections, even if they are not marked as cascadePersist. For large, hydrated collections this could potentially become a bottleneck.&lt;/p&gt;

&lt;p&gt;Wouldn&apos;t it be better to save the &quot;addedEntities&quot; in an additional map inside &quot;PersistentCollection&quot; and retrieve those instead of calling $value-&amp;gt;unwrap() ?&lt;/p&gt;</description>
                <environment></environment>
            <key id="11677">DDC-718</key>
            <summary>Bottleneck in computeAssociationChanges()?</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 24 Jul 2010 03:58:00 +0000</created>
                <updated>Sat, 24 Jul 2010 04:52:23 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="13677" author="romanb" created="Sat, 24 Jul 2010 04:47:25 +0000"  >&lt;p&gt;Do you have any numbers to back this up? With large, hydrated collections the bottlenecks are likely elsewhere (SQL query, hydration) &lt;img class=&quot;emoticon&quot; src=&quot;http://www.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;Further, maintaining &quot;addedEntities&quot; is not as trivial as you might think. The current approach does not care about what happens in-between, it just computes a diff between the old and new state of the collection at commit time. Tracking added/removed objects as they come in and go is more cumbersome.&lt;/p&gt;</comment>
                    <comment id="13678" author="beberlei" created="Sat, 24 Jul 2010 04:51:40 +0000"  >&lt;p&gt;no numbers, i was just confused about the code, because i remembered it differently &lt;img class=&quot;emoticon&quot; src=&quot;http://www.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>
                <issuelinks>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                <outwardlinks description="relates to">
                            <issuelink>
            <issuekey id="11386">DDC-600</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-712] allow RIGHT JOIN or specifying the root class of the hydratation tree</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-712</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi! Let me start by saying you guys did a great job with Doctrine 1 and that I can&apos;t wait to start using Doctrine2 &lt;img class=&quot;emoticon&quot; src=&quot;http://www.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;I will explain this feature request with an example. I have a User entity wich relates one to many to a Picture entity. Picture has a &quot; is main picture&quot; boolean field. Not all users have a main picture. I would like to be able to select all Users, each with their main picutre, if that exists, or some Null value, if it does not exists, in one query, using join. I would also like for the result collection to contain Picture entities on the first level, with the User beinng accessible as an aggregate of Picture.&lt;/p&gt;

&lt;p&gt;The way I can think doing this is by using a RIGHT or LEFT join (not INNER) as to also select Users that don&apos;t have a main picture. I can do this by selecting &lt;/p&gt;

&lt;p&gt;SELECT Picture p, p.User u FROM p RIGHT JOIN u WITH p.main=1&lt;/p&gt;

&lt;p&gt;but right joins afik are not available atm in either version of Doctrine, or by selecting&lt;/p&gt;

&lt;p&gt;SELECT User u, u.Picture p FROM u LEFT JOIN p WITH p.main=1&lt;/p&gt;

&lt;p&gt;and somehow instructing the hydrator to consider Picture as the root object for the generated object tree and User as a &quot;child&quot; of Picture. &lt;/p&gt;

&lt;p&gt;For users without a picture, the Picture object would somehow indicate it is NULL, while still holding a refference to the User.&lt;/p&gt;


&lt;p&gt;Makes sense? &lt;img class=&quot;emoticon&quot; src=&quot;http://www.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; If there is an alternate way to achieve this, please enlighten me, tough I think it would still add felxibility if we could hint the hydrator for the root object in a tree.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11667">DDC-712</key>
            <summary>allow RIGHT JOIN or specifying the root class of the hydratation tree</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="muqker">Mihai Ilinca</reporter>
                        <labels>
                    </labels>
                <created>Wed, 21 Jul 2010 17:54:44 +0000</created>
                <updated>Thu, 22 Jul 2010 12:21:11 +0000</updated>
                                                                    <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="13653" author="beberlei" created="Thu, 22 Jul 2010 02:56:34 +0000"  >&lt;p&gt;Why don&apos;t you model that as ManyToOne for the Main Picture and OneToMany for all pictures? Makes much more sense from an ORM perspsective, you would have your own property &quot;User::$mainPicture&quot;&lt;/p&gt;</comment>
                    <comment id="13661" author="muqker" created="Thu, 22 Jul 2010 12:21:11 +0000"  >&lt;p&gt;Thanks for the suggestion. However, this was just an example to demonstrate some lack of flexibility, I am not strictly looking for a solution to this example, but to the concept behind it. &lt;/p&gt;

&lt;p&gt;Also, how would I get the result with Picture on the top level and User aggregated to Picture with the model you suggested? Unless I am missing something, wouldn&apos;t I end up in the same situation?&lt;/p&gt;

&lt;p&gt;I can post-process the results myself and create a new collection easily, ofc, but it would be better (and more optimal) if I could tell the hydrator to do this, similar to how INDEXBY is passed as an option to the hydrator.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-691] doctrine.readOnly query hint</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/subtask_alternate.png">Sub-task</type>
                    <parent id="10612">DDC-209</parent>
                        <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <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-677] Allow DQL DELETE statements to work with join table fk constraints</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-677</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Currently DQL DELETE will break if any foreign key constraint restricts the delete. &lt;/p&gt;

&lt;p&gt;Using the Metadata we can possibly detect these join table FK contstraints and delete them correctly.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11605">DDC-677</key>
            <summary>Allow DQL DELETE statements to work with join table fk constraints</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 10 Jul 2010 05:28:00 +0000</created>
                <updated>Sat, 10 Jul 2010 08:11:06 +0000</updated>
                                    <version>2.0-BETA2</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                            <issuelinks>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                                <inwardlinks description="is referenced by">
                            <issuelink>
            <issuekey id="10368">DDC-130</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-547] Consider allowing custom PersistentCollection implementations</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-547</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;We should consider allowing the configuration of custom PersistentCollection implementations on a per-association basis.&lt;br/&gt;
This could allow users to craft optimized (SQL) behavior for for some of their collections to improve performance without changing the domain model code.&lt;/p&gt;

&lt;p&gt;For this, PersistentCollection needs to be designed for inheritance.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11278">DDC-547</key>
            <summary>Consider allowing custom PersistentCollection implementations</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="romanb">Roman S. Borschel</reporter>
                        <labels>
                    </labels>
                <created>Tue, 27 Apr 2010 11:39:21 +0000</created>
                <updated>Fri, 24 Dec 2010 05:10:38 +0000</updated>
                                    <version>2.0-BETA1</version>
                                <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>6</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="14082" author="romanb" created="Thu, 26 Aug 2010 08:03:27 +0000"  >&lt;p&gt;Rescheduled for 2.1. Might be 2.x.&lt;/p&gt;</comment>
                    <comment id="15010" author="beberlei" created="Fri, 24 Dec 2010 05:10:38 +0000"  >&lt;p&gt;Reschedule for 2.x&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-530] Create tests and documentation for possibilities of mixing inheritance mapping strategies</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-530</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It is (theoretically) possible to use different inheritance mapping strategies in the same class hierarchy as long as the different subtrees that use different mapping strategies do not have a common ancestor entity. We should add some tests for that and mention it in the docs about inheritance mapping in a new subsection &quot;Mixing Inheritance Mapping Strategies&quot;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11244">DDC-530</key>
            <summary>Create tests and documentation for possibilities of mixing inheritance mapping strategies</summary>
                <type id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/task.png">Task</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="romanb">Roman S. Borschel</reporter>
                        <labels>
                    </labels>
                <created>Mon, 19 Apr 2010 05:37:55 +0000</created>
                <updated>Mon, 19 Apr 2010 05:37:55 +0000</updated>
                                    <version>2.0-BETA1</version>
                                <fixVersion>2.0</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-473] Inadequate description for @MappedSuperclass in Annotations Reference</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-473</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;See: &lt;a href=&quot;http://www.doctrine-project.org/documentation/manual/2_0/en/annotations-reference#ann_mappedsuperclass&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/documentation/manual/2_0/en/annotations-reference#ann_mappedsuperclass&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;@MappedSuperclass&lt;/p&gt;

&lt;p&gt;An mapped superclass is an abstract or concrete class that provides persistent entity state and mapping information for its subclasses, but which is not itself an entity. This annotation is specified on the Class docblock and has no additional attributes.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;This doesn&apos;t adequately communicate how to use it. It took me several minutes of failing before I downloaded the PDF and did a search for @MappedSuperclass to find an example of how it&apos;s used.&lt;/p&gt;

&lt;p&gt;Specifically the following were unclear:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Is this defined on the superclass or on the children classes?&lt;/li&gt;
	&lt;li&gt;If it&apos;s defined on the child classes, does it take parameters? The name of the super class?&lt;/li&gt;
	&lt;li&gt;It was not at all apparent to me that it was mutually exclusive with the @Entity tag&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
            <key id="11133">DDC-473</key>
            <summary>Inadequate description for @MappedSuperclass in Annotations Reference</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="hobodave">David Abdemoulaie</reporter>
                        <labels>
                    </labels>
                <created>Thu, 25 Mar 2010 14:09:54 +0000</created>
                <updated>Thu, 26 Aug 2010 08:02:03 +0000</updated>
                                    <version>2.0-ALPHA4</version>
                                <fixVersion>2.0</fixVersion>
                                <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="12462" author="hobodave" created="Thu, 25 Mar 2010 14:14:30 +0000"  >&lt;p&gt;Apparently it&apos;s also incompatible with several other tag as well.&lt;/p&gt;

&lt;p&gt;I thought it made sense to try the following and see if the @InheritanceType and @Discriminator___ tags would apply to the children classes:&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;/**
 * @MappedSuperclass
 * @InheritanceType(&quot;SINGLE_TABLE&quot;)
 * @DiscriminatorColumn(name=&quot;type&quot;, type=&quot;string&quot;)
 * @DiscriminatorMap({&quot;User&quot; = &quot;User&quot;, &quot;Group&quot; = &quot;Group&quot;})
 */
abstract class Principal
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But apparently this flags D2 to treat it as an Entity anyway, resulting in the following error:&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;PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table &apos;sentact5.principal&apos;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="12482" author="beberlei" created="Sun, 28 Mar 2010 06:53:24 +0000"  >&lt;p&gt;I updated the documentation, the question is if we should check for the mapped superclass attribute and throw exceptions if other entity level annotations are specified.&lt;/p&gt;</comment>
                    <comment id="12678" author="romanb" created="Thu, 15 Apr 2010 13:14:01 +0000"  >&lt;p&gt;A mapped superclass has not many restrictions and these are mentioned in the docs (i.e. only unidirectional associations), what David mentions above should work, if it doesnt its a bug, I think &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-511&quot; title=&quot;Schema tool does not support STI - attempts to create a table per subclass&quot;&gt;&lt;del&gt;DDC-511&lt;/del&gt;&lt;/a&gt; looks like that same issue.&lt;/p&gt;</comment>
                    <comment id="12679" author="romanb" created="Thu, 15 Apr 2010 13:20:55 +0000"  >&lt;p&gt;David,&lt;/p&gt;

&lt;p&gt;@&quot;Is this defined on the superclass or on the children classes?&quot;&lt;/p&gt;

&lt;p&gt;It doesnt matter. A @MappedSuperclass can be anywhere in an inheritance hierarchy and it always does the same thing, inherit its mapping information to subclasses (but its not itself an entity). The docs say:&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;Mapped superclasses, just as regular, non-mapped classes, can appear in the middle of an otherwise mapped inheritance hierarchy (through Single Table Inheritance or &lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt; Table Inheritance).
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;as well 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;Entities support inheritance, polymorphic associations, and polymorphic queries. Both &lt;span class=&quot;code-keyword&quot;&gt;abstract&lt;/span&gt; and concrete classes can be entities. Entities may extend non-entity classes as well as entity classes, and non-entity classes may extend entity classes.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So entities, mapped superclasses and plain non-mapped classes can appear mixed in an inheritance hierarchy. Nevertheless all the classes in a hierarchy that are entities must use 1 inheritance strategy, you can not mix inheritance mapping strategies in a single class hierarchy.&lt;/p&gt;

&lt;p&gt;@&quot;If it&apos;s defined on the child classes, does it take parameters? The name of the super class?&quot;&lt;/p&gt;

&lt;p&gt;No, it doesnt. The docs dont mention any parameters either which is correct.&lt;/p&gt;

&lt;p&gt;@&quot;It was not at all apparent to me that it was mutually exclusive with the @Entity tag&quot;&lt;/p&gt;

&lt;p&gt;OK, that needs to be made clearer in the docs then.&lt;/p&gt;
</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-450] Add TableGenerator Implementation</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="4" iconUrl="http://www.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://www.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-445] Evaluate possible ways in which stored procedures can be used</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-445</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;We should evaluate the current situation of stored procedure support as well as where we want to go with it / how far we want to support it, if at all.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11094">DDC-445</key>
            <summary>Evaluate possible ways in which stored procedures can be used</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="romanb">Roman S. Borschel</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Mar 2010 12:27:42 +0000</created>
                <updated>Fri, 24 Dec 2010 04:49:52 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="12373" author="beberlei" created="Fri, 19 Mar 2010 12:48:10 +0000"  >&lt;p&gt;I think this relates to the usage of Custom Persisters&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                <outwardlinks description="relates to">
                            <issuelink>
            <issuekey id="10999">DDC-391</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-415] Introduce UnitOfWork Stages and throw exceptions for wrong method uses</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-415</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Currently the event architecture is fragile when used wrong. I already see lots of &quot;bug reports&quot; popping up on this issue due to people dont understanding what is doable and what is not.&lt;/p&gt;

&lt;p&gt;How about we introduce an instance variable stage into the UnitOfWork and introduce an assertIsInStages($stages) protected method which is called ineach major command method of the UnitOfWork to verify its applied correctly?&lt;/p&gt;

&lt;p&gt;Stages could be:&lt;/p&gt;

&lt;p&gt;UNFLUSHED&lt;br/&gt;
PRE_COMPUTE_CHANGESETS&lt;br/&gt;
POST_COMPUTE_CHANGESETS&lt;br/&gt;
FLUSH_LOOP&lt;br/&gt;
TRANSACTION_COMPLETED&lt;/p&gt;</description>
                <environment></environment>
            <key id="11039">DDC-415</key>
            <summary>Introduce UnitOfWork Stages and throw exceptions for wrong method uses</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 12 Mar 2010 04:20:04 +0000</created>
                <updated>Thu, 18 Mar 2010 07:47:17 +0000</updated>
                                    <version>2.0-ALPHA4</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="12105" author="romanb" created="Fri, 12 Mar 2010 04:37:59 +0000"  >&lt;p&gt;I&apos;m not sure. I&apos;m afraid this will just add code bloat with the only goal to provide better error messages and its fragile to do right. There will surely be places missed in the code where to check for the stage and it might even constrain some valid use-cases we dont think of yet.&lt;/p&gt;

&lt;p&gt;So I&apos;m afraid that this would hurt more than it would help.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-391] Allow to specifiy custom Entity and Collection Persister classes</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/inprogress.png">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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-280] UnitOfWork changeSet population should take advantage of Comparable technique</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-280</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Currently our UnitOfWork computes the changeset by checking actual instances of Objects.&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;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;&lt;span class=&quot;code-comment&quot;&gt;// UnitOfWork, lines 501-507 
&lt;/span&gt;
            foreach ($actualData as $propName =&amp;gt; $actualValue) { 
                $orgValue = isset($originalData[$propName]) ? $originalData[$propName] : &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;; 
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (is_object($orgValue) &amp;amp;&amp;amp; $orgValue !== $actualValue) { 
                    $changeSet[$propName] = array($orgValue, $actualValue); 
                } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($orgValue != $actualValue || ($orgValue === &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; ^ $actualValue === &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;))  
	                    $changeSet[$propName] = array($orgValue, $actualValue);
                } 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;While this is ok when you do new object assignments, it just bypass same instances of same object, since the hash is the same.&lt;br/&gt;
A user on IRC (post-o-matic) has a quite complex object logic that he would like to avoid clone and even instantiate another class.&lt;br/&gt;
I agree with him that cloning is not the ideal technique, mainly because the changeset would always compute the object (since then hashs would be different).&lt;/p&gt;

&lt;p&gt;He implemented this datatype:&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;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;class EffortGraphType &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Type 
{ 
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getSqlDeclaration(array $fieldDeclaration, AbstractPlatform $platform) 
    { 
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $platform-&amp;gt;getClobTypeDeclarationSql($fieldDeclaration); 
    } 

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function convertToPHPValue($value, AbstractPlatform $platform) 
    { 
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; EffortGraph(unserialize($value)); 
    } 

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function convertToDatabaseValue($value, AbstractPlatform $platform) 
    { 
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; serialize($value-&amp;gt;getGraphPoints()); 
    } 

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getName() 
    { 
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &apos;effort_graph&apos;; 
    } 
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I was thinking in a possible alternative and it came up to me the same basic idea we have with operators overloading OR Comparable interface of Java. I know in Java it supports way more things, but at least for this situation (as a start point) it would make developer&apos;s life easier.&lt;/p&gt;

&lt;p&gt;Basic idea is to have an interface in Doctrine\Common:&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;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 Doctrine\Common;

&lt;span class=&quot;code-keyword&quot;&gt;interface&lt;/span&gt; Comparable
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function compareTo($value);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And update our UnitOfWork to take advantage of 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;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;&lt;span class=&quot;code-comment&quot;&gt;// UnitOfWork, lines 501-507 
&lt;/span&gt;
            foreach ($actualData as $propName =&amp;gt; $actualValue) { 
                $orgValue = isset($originalData[$propName]) ? $originalData[$propName] : &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;; 

                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (is_object($orgValue)) { 
                    $isDiff = ($orgValue &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; Doctrine\Common\Comparable) 
                        ? $orgValue-&amp;gt;compareTo($actualValue) :  ($orgValue !== $actualValue);

                    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($isDiff) {
                        $changeSet[$propName] = array($orgValue, $actualValue); 
                    }
                } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($orgValue != $actualValue || ($orgValue === &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; ^ $actualValue === &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;))  
	                    $changeSet[$propName] = array($orgValue, $actualValue);
                } 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In this user&apos;s usecase, it&apos;d require him to update the EffortGraph class and implement Comparable interface.&lt;br/&gt;
For his specific situation, he&apos;d need to store original value and updated value, just like we do internally in UnitOfWork for Entities.&lt;/p&gt;</description>
                <environment></environment>
            <key id="10791">DDC-280</key>
            <summary>UnitOfWork changeSet population should take advantage of Comparable technique</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Wed, 27 Jan 2010 17:53:55 +0000</created>
                <updated>Fri, 4 Feb 2011 05:19:46 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="13018" author="guilhermeblanco" created="Wed, 19 May 2010 22:06:04 +0000"  >&lt;p&gt;What&apos;s the final status of this?&lt;/p&gt;

&lt;p&gt;IMHO this should be incorporated, since it adds a powerful support that users can take advantage in our Types.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                    <comment id="13019" author="guilhermeblanco" created="Wed, 19 May 2010 22:06:50 +0000"  >&lt;p&gt;You&apos;re the main guy that can give a final word in this subject.&lt;/p&gt;

&lt;p&gt;I&apos;m +1 for this&lt;/p&gt;</comment>
                    <comment id="15224" author="rv4wd" created="Fri, 4 Feb 2011 03:16:36 +0000"  >&lt;p&gt;+1 for this...&lt;/p&gt;

&lt;p&gt;if you have datetimes in a table and are using the DateTime object, you end up with useless update queries, if you persist an unchanged object...&lt;/p&gt;</comment>
                    <comment id="15226" author="beberlei" created="Fri, 4 Feb 2011 04:10:02 +0000"  >&lt;p&gt;That is not true.&lt;/p&gt;</comment>
                    <comment id="15227" author="rv4wd" created="Fri, 4 Feb 2011 04:35:28 +0000"  >&lt;p&gt;Sorry, I wasn&apos;t clear.&lt;/p&gt;

&lt;p&gt;It does not happen in all cases.&lt;/p&gt;

&lt;p&gt;I have a simple object, that I save to the session. After merging it and flushing the entitiy manager, an update query is generated, which sets all the datetime fields of the object to their current value:&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;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;$item = $_SESSION[&apos;item&apos;];
$item = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;merge($item);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;persist($item);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This code results in the expected SELECT query, which refreshes the item from DB, but it also results in an update query which sets the datetime of the object to the same value.&lt;br/&gt;
This query could be omitted, if I could use a comparable interface and a custom type for datetimes, which implement it.&lt;/p&gt;</comment>
                    <comment id="15228" author="beberlei" created="Fri, 4 Feb 2011 05:19:46 +0000"  >&lt;p&gt;This rather seems like a bug with the merging. Can you open up a new ticket describing this? Thank you&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-17] Ability to skip the operation from a pre-operation event handler</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-17</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In Doctrine 1.1 it is possible to skip the operation in the event handlers in Doctrine_Record_Listener using Doctrine_Event::skipOperation.&lt;/p&gt;

&lt;p&gt;This no longer seems to be possible in Doctrine 2.0 Alpha 1, for example when handling a preRemove event to implement soft-delete behaviour. Perhaps a method could be added to \Doctrine\Common\EventArgs\LifecycleEventArgs to skip the operation, at least before the operation.&lt;/p&gt;

&lt;p&gt;Without this implementing soft-delete would require the user to update deleted_at and deleted_by himself and then save the record. It could no longer be done automatically when removing a record because the record is then removed.&lt;/p&gt;</description>
                <environment></environment>
            <key id="10089">DDC-17</key>
            <summary>Ability to skip the operation from a pre-operation event handler</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="itoijala">Ismo Toijala</reporter>
                        <labels>
                    </labels>
                <created>Sun, 20 Sep 2009 17:09:23 +0000</created>
                <updated>Thu, 26 Aug 2010 08:03:54 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="10095" author="romanb" created="Sun, 20 Sep 2009 19:46:03 +0000"  >&lt;p&gt;The problem is, full support for soft-delete throughout the system is not feasible and very fragile. Simple soft-delete through skipping the delete operation is the easiest part. Then you will probably want to modify all DQL queries so that they adhere to it automatically and then there will always be still queries that do NOT go through DQL, like even internal lazy-load queries or native queries or others, which would need to be modified also.&lt;/p&gt;

&lt;p&gt;To sum it up, implementing soft-delete &quot;inside&quot; doctrine is absolutely not worth the effort and imho a bad idea and I&apos;m certainly not willing to make lots of adjustments to the core that have a negative impact on performance just to make this soft-delete possible.&lt;/p&gt;

&lt;p&gt;I really recommend handling &quot;soft&quot; deletes yourself, the normal way, by simply abstracting entity retrieval and persistence through a DAO/repository layer. As a nice side-effect you get less magic and it still works when you swap out doctrine for another persistence provider.&lt;/p&gt;

&lt;p&gt;I am willing to add support for skipping deletes and maybe some other operations through events but I&apos;m not willing to go any further, as explained above.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-4] Implement support for Concrete Table Inheritance</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-4</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;A first implementation could probably live without support for polymorphic queries (requires SQL UNIONs to be generated). &lt;/p&gt;</description>
                <environment></environment>
            <key id="10033">DDC-4</key>
            <summary>Implement support for Concrete Table Inheritance</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="romanb">Roman S. Borschel</reporter>
                        <labels>
                    </labels>
                <created>Wed, 9 Sep 2009 18:44:46 +0000</created>
                <updated>Fri, 24 Dec 2010 04:48:20 +0000</updated>
                                    <version>2.1</version>
                                <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>