<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sat May 18 17:48:40 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+component+is+EMPTY+ORDER+BY+priority+DESC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://www.doctrine-project.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Doctrine Project</title>
        <link>http://www.doctrine-project.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+DDC+AND+resolution+%3D+Unresolved+AND+component+is+EMPTY+ORDER+BY+priority+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="125" total="125"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DDC-274] Class and namespace naming inconsistency</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-274</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;There are inconsistencies with some class and namespace names that include acronyms.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;p&gt;Classes with upper-casing:&lt;br/&gt;
    ORMException, DBALException, OCI8Connection, etc.&lt;/p&gt;

&lt;p&gt;Classes with proper-casing:&lt;br/&gt;
    RunDqlTask, CliException, MySqlPlatform, etc.&lt;/p&gt;

&lt;p&gt;Namespaces with upper-casing:&lt;br/&gt;
    DBAL, ORM, Doctrine\DBAL\Driver\PDOMsSql, etc.&lt;/p&gt;

&lt;p&gt;Namespaces with proper-casing:&lt;br/&gt;
    Doctrine\Common\Cli, Doctrine\DBAL\Tools\Cli\, Doctrine\ORM\Id, etc.&lt;/p&gt;

&lt;p&gt;There is more proper-casing than upper-casing. IMHO, proper-casing is better as it&apos;s easier to read &quot;SqlException&quot; than it is to read &quot;SQLException&quot; (the &quot;E&quot; looks like part of the acronym), and things like &quot;CLITask&quot; can be avoided. &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 discussed this a bit with Benjamin and Guilherme, and they were unsure and said that the whole team needed to reach consensus.&lt;/p&gt;

&lt;p&gt;I&apos;m leaving the priority as &quot;Major&quot; because this should probably be fixed sooner rather than later to prevent compatibility breaks.&lt;/p&gt;</description>
                <environment></environment>
            <key id="10769">DDC-274</key>
            <summary>Class and namespace naming inconsistency</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</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="romanb">Roman S. Borschel</assignee>
                                <reporter username="darkangel">Glen Ainscow</reporter>
                        <labels>
                    </labels>
                <created>Sun, 24 Jan 2010 16:30:50 +0000</created>
                <updated>Sun, 31 Oct 2010 05:20:55 +0000</updated>
                                    <version>2.0-ALPHA4</version>
                                <fixVersion>2.0-RC1</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="11462" author="guilhermeblanco" created="Mon, 25 Jan 2010 13:41:23 +0000"  >&lt;p&gt;Increasing the severity and adding a fix version since this MUST be fixed before next release.&lt;/p&gt;</comment>
                    <comment id="11467" author="romanb" created="Mon, 25 Jan 2010 13:57:02 +0000"  >&lt;p&gt;I find this to be of rather minor importance. You&apos;re talking of compatibility breaks, but thats only the case if we intend to start being very nitpicky about the naming in the future. We are currently not, and we wont be, so not much risk of later breakage.&lt;/p&gt;

&lt;p&gt;We have a rule of thumb already: Acronyms up to 4 characters all uppercase, otherwise normal camelcase.&lt;/p&gt;

&lt;p&gt;Now, it is often a matter of taste what is an acronym and what not and also not all acronyms have a clear casing, prime example mysql.&lt;/p&gt;

&lt;p&gt;Being too nit-picky here is just a pain in the ass and we won&apos;t reach a common consensus anyway.&lt;/p&gt;</comment>
                    <comment id="11468" author="romanb" created="Mon, 25 Jan 2010 13:58:51 +0000"  >&lt;p&gt;Oh and we better dont start arguing about whats better to read because there is no chance of agreement. If you ask me I find SQLException better than SqlException. So here we go. Lets better not run down this path.&lt;/p&gt;</comment>
                    <comment id="11469" author="darkangel" created="Mon, 25 Jan 2010 14:15:34 +0000"  >&lt;p&gt;No need to get upset, I&apos;m only trying to help.&lt;/p&gt;

&lt;p&gt;I just thought that consistency is usually a good idea, either way.&lt;/p&gt;

&lt;p&gt;I have to disagree in that an acronym is an acronym, it&apos;s not a matter of taste, the letters either stand for something, or they don&apos;t.&lt;/p&gt;

&lt;p&gt;As for &quot;mysql&quot;, only the SQL part is an acronym. So, MySQL or MySql.&lt;/p&gt;

&lt;p&gt;Close if you disagree.&lt;/p&gt;</comment>
                    <comment id="11471" author="romanb" created="Mon, 25 Jan 2010 14:28:03 +0000"  >&lt;p&gt;I&apos;m not upset. What made you think so? Maybe I should introduce a &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; every now and then.&lt;/p&gt;

&lt;p&gt;There&apos;s just no point in arguing about readability.&lt;/p&gt;

&lt;p&gt;Like I said, we do have a naming standard even if its not adhered everywhere. The standard is also not something we&apos;ve made up ourselves because we try to avoid that. When we introduced namespaces, we talked about adopting either the Java or .NET naming standards. We opted for the .NET standards. And there its recommended to write acronyms with up to 4 characters all uppercase.&lt;/p&gt;

&lt;p&gt;I dont think there are too many violations of that in the code, probably Cli =&amp;gt; CLI and some others but most of it looks ok to me.&lt;/p&gt;

&lt;p&gt;UPDATE: Maybe we can gather a list here in this ticket of violations? Cli =&amp;gt; CLI would be one. MySql =&amp;gt; MySQL another. &quot;Id&quot; is rather an abbreviation of Identifier and not an acronym, to me at least.&lt;/p&gt;</comment>
                    <comment id="11472" author="guilhermeblanco" created="Mon, 25 Jan 2010 14:29:41 +0000"  >&lt;p&gt;It&apos;s not a case of getting anyone upset...&lt;/p&gt;

&lt;p&gt;But we should fix it and keep consistency of our codebase.&lt;/p&gt;

&lt;p&gt;@romanb We should all talk and reach a common sense.&lt;br/&gt;
That&apos;s our last chance (last alpha) to get this consistency in.&lt;/p&gt;</comment>
                    <comment id="11473" author="romanb" created="Mon, 25 Jan 2010 14:33:04 +0000"  >&lt;p&gt;@Guilherme: We do have a naming standard since a year. You want to change the standard now?&lt;/p&gt;</comment>
                    <comment id="11478" author="darkangel" created="Mon, 25 Jan 2010 16:02:14 +0000"  >&lt;p&gt;@Roman,&lt;/p&gt;

&lt;p&gt;Just a feeling I got. &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;This issue was more about consistency (indicated in the title) than moving to proper-case naming.&lt;/p&gt;

&lt;p&gt;I think it might be up to 3 characters in .NET, HtmlElement, System.Linq, etc. Anyway, not important. &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 agree that Id. is an abbreviation.&lt;/p&gt;

&lt;p&gt;There are some more violations. If you decide you want to change them, let me know and I&apos;ll compile a list.&lt;/p&gt;</comment>
                    <comment id="11480" author="romanb" created="Mon, 25 Jan 2010 17:30:04 +0000"  >&lt;p&gt;@Glen: Yes, a list would be great. I find it hard to be 100% consistent sometimes though because my taste conflicts with the rule. For example, I would prefer &quot;Id&quot; over &quot;ID&quot;, especially since it comes directly after ORM &quot;Doctrine\ORM\ID\...&quot; would be a bit too much. But I would not like &quot;Orm&quot; or &quot;Dbal&quot; either. But I think in most cases we can clearly fix the inconsistency. Like CLI or MySQL or MSSQL (or should it be MsSQL?).&lt;/p&gt;

&lt;p&gt;Thanks for your help!&lt;/p&gt;

&lt;p&gt;We should probably create updated coding standards for Doctrine 2 also, since they differ quite some from Doctrine 1 due to the introduction of namespaces and such. I&apos;ll create a ticket for that.&lt;/p&gt;</comment>
                    <comment id="11481" author="darkangel" created="Mon, 25 Jan 2010 18:40:02 +0000"  >&lt;p&gt;I&apos;ll do the list for you by tomorrow at the latest, just running out of time ATM.&lt;/p&gt;

&lt;p&gt;Id is correct, as mentioned above, so that would be fine. MsSQL is correct (Ms = Microsoft = abbreviation).&lt;/p&gt;</comment>
                    <comment id="11483" author="darkangel" created="Mon, 25 Jan 2010 20:31:56 +0000"  >&lt;p&gt;Found some time ...&lt;/p&gt;

&lt;p&gt;Doctrine\Common\Cache\ApcCache -&amp;gt; APCCache&lt;br/&gt;
Doctrine\Common\Cli -&amp;gt; CLI&lt;br/&gt;
Doctrine\Common\Cli\Printers\AnsiColorPrinter -&amp;gt; ANSIColorPrinter&lt;br/&gt;
Doctrine\Common\Cli\CliController -&amp;gt; CLIController&lt;br/&gt;
Doctrine\Common\Cli\CliException -&amp;gt; CLIException&lt;/p&gt;

&lt;p&gt;Doctrine\DBAL\Driver\PDOMsSql -&amp;gt; PDOMsSQL&lt;br/&gt;
Doctrine\DBAL\Driver\PDOMySql -&amp;gt; PDOMySQL&lt;br/&gt;
Doctrine\DBAL\Driver\PDOPgSql -&amp;gt; PDOPgSQL&lt;br/&gt;
Doctrine\DBAL\Driver\PDOSqlite -&amp;gt; PDOSQLite&lt;br/&gt;
Doctrine\DBAL\Logging\EchoSqlLogger -&amp;gt; EchoSQLLogger&lt;br/&gt;
Doctrine\DBAL\Logging\SqlLogger -&amp;gt; SQLLogger&lt;br/&gt;
Doctrine\DBAL\Platforms\MsSqlPlatform -&amp;gt; MsSQLPlatform&lt;br/&gt;
Doctrine\DBAL\Platforms\MySqlPlatform -&amp;gt; MySQLPlatform&lt;br/&gt;
Doctrine\DBAL\Platforms\PostgreSqlPlatform -&amp;gt; PostgreSQLPlatform&lt;br/&gt;
Doctrine\DBAL\Platforms\SqlitePlatform -&amp;gt; SQLitePlatform&lt;br/&gt;
Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector -&amp;gt; CreateSchemaSQLCollector&lt;br/&gt;
Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector -&amp;gt; DropSchemaSQLCollector&lt;br/&gt;
Doctrine\DBAL\Schema\MsSqlSchemaManager -&amp;gt; MsSQLSchemaManager&lt;br/&gt;
Doctrine\DBAL\Schema\MySqlSchemaManager -&amp;gt; MySQLSchemaManager&lt;br/&gt;
Doctrine\DBAL\Schema\PostgreSqlSchemaManager -&amp;gt; PostgreSQLSchemaManager&lt;br/&gt;
Doctrine\DBAL\Schema\SqliteSchemaManager -&amp;gt; SQLiteSchemaManager&lt;br/&gt;
Doctrine\DBAL\Tools\Cli -&amp;gt; CLI&lt;br/&gt;
Doctrine\DBAL\Tools\Cli\Tasks\RunSqlTask -&amp;gt; RunSQLTask&lt;/p&gt;

&lt;p&gt;Doctrine\ORM\Mapping\Driver\PhpDriver -&amp;gt; PHPDriver&lt;br/&gt;
Doctrine\ORM\Mapping\Driver\XmlDriver -&amp;gt; XMLDriver&lt;br/&gt;
Doctrine\ORM\Mapping\Driver\YamlDriver -&amp;gt; YAMLDriver&lt;br/&gt;
Doctrine\ORM\Query\Exec\AbstractSqlExecutor -&amp;gt; AbstractSQLExecutor&lt;br/&gt;
(Should Doctrine\ORM\Query\Expr\Andx and Orx be AndX and OrX?)&lt;br/&gt;
Doctrine\ORM\Query\SqlWalker -&amp;gt; SQLWalker&lt;br/&gt;
Doctrine\ORM\Tools\Cli -&amp;gt; CLI&lt;br/&gt;
Doctrine\ORM\Tools\Cli\Tasks\RunDqlTask -&amp;gt; RunDQLTask&lt;br/&gt;
Doctrine\ORM\Tools\Export\Driver\PhpExporter -&amp;gt; PHPExporter&lt;br/&gt;
Doctrine\ORM\Tools\Export\Driver\XmlExporter -&amp;gt; XMLExporter&lt;br/&gt;
Doctrine\ORM\Tools\Export\Driver\YamlExporter -&amp;gt; YAMLExporter&lt;/p&gt;

&lt;p&gt;... I think that&apos;s it. More than you expected? I did say: &quot;There is more proper-casing than upper-casing.&quot; &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="11484" author="romanb" created="Mon, 25 Jan 2010 20:46:33 +0000"  >&lt;p&gt;No, not more than I expected. It&apos;s mostly SQL and CLI basically. Thanks for the list!&lt;/p&gt;

&lt;p&gt;We should try to go through that list before beta.&lt;/p&gt;</comment>
                    <comment id="12037" author="romanb" created="Fri, 5 Mar 2010 11:40:16 +0000"  >&lt;p&gt;Methods should be adjusted accordingly also (even though they&apos;re case insensitive). I already started with that. More to come.&lt;/p&gt;</comment>
                    <comment id="12479" author="romanb" created="Sun, 28 Mar 2010 06:19:38 +0000"  >&lt;p&gt;Most of the Cli =&amp;gt; CLI changes seem to be complete now.&lt;/p&gt;</comment>
                    <comment id="12745" author="romanb" created="Mon, 26 Apr 2010 06:06:21 +0000"  >&lt;p&gt;Pushing the rest of the name changes towards beta2.&lt;/p&gt;</comment>
                    <comment id="13007" author="romanb" created="Wed, 19 May 2010 06:58:27 +0000"  >&lt;p&gt;More renamings have been done but still more to do. Pushing remaining work to beta3.&lt;/p&gt;</comment>
                    <comment id="14152" author="romanb" created="Mon, 30 Aug 2010 06:20:35 +0000"  >&lt;p&gt;Final name changes should be done prior to going into RC1.&lt;/p&gt;</comment>
                    <comment id="14629" author="beberlei" created="Sun, 31 Oct 2010 02:36:54 +0000"  >&lt;p&gt;there is much to be done yet, however most of it is also public API class names and might cause quite some BC breaks (i.e. DBAL Platforms and Schema Manager, Mapping Driver Names). I am not sure how to proceed here.&lt;/p&gt;</comment>
                    <comment id="14642" author="romanb" created="Sun, 31 Oct 2010 05:20:55 +0000"  >&lt;p&gt;Since PHP is mostly case-insensitive on class and method names it shouldn&apos;t be much of an issue.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-810] Issue with detaching entities and updating when using change notification</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-810</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;More information coming soon. Attaching a test case&lt;/p&gt;</description>
                <environment></environment>
            <key id="11931">DDC-810</key>
            <summary>Issue with detaching entities and updating when using change notification</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="jwage">Jonathan H. Wage</reporter>
                        <labels>
                    </labels>
                <created>Fri, 17 Sep 2010 12:43:08 +0000</created>
                <updated>Mon, 4 Jul 2011 21:47:46 +0000</updated>
                                    <version>2.0-BETA4</version>
                                <fixVersion>2.x</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14415" author="beberlei" created="Mon, 20 Sep 2010 05:09:49 +0000"  >&lt;p&gt;From reading the issue i know what the bug is, indeed this sucks.&lt;/p&gt;</comment>
                    <comment id="14487" author="romanb" created="Tue, 28 Sep 2010 16:27:00 +0000"  >&lt;p&gt;@Jon: Any more information coming?&lt;/p&gt;

&lt;p&gt;@Benjamin: Can you summarize the essence of the issue shortly?&lt;/p&gt;</comment>
                    <comment id="14489" author="beberlei" created="Wed, 29 Sep 2010 03:02:12 +0000"  >&lt;p&gt;@Roman: The UnitOfWork (may) still be pushed as a listener into that entity, and still recieve noticies of update. Which may throw notices because the oid hashes are removed everywhere. Additionally you cant serialize the thing because you still got the UoW inside there.&lt;/p&gt;</comment>
                    <comment id="14524" author="jwage" created="Mon, 4 Oct 2010 19:48:17 +0000"  >&lt;p&gt;I don&apos;t have anymore information currently. The issue was relayed to me. I will try and find some more information and report back.&lt;/p&gt;</comment>
                    <comment id="15669" author="beberlei" created="Sun, 3 Apr 2011 14:38:51 +0000"  >&lt;p&gt;There is no way to &quot;fix&quot; this issue, i am turning it into a feature request. There needs to be a &quot;postDetach&quot; event that is triggered where the developer can detach the change notification objects.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10804" name="DDC810Test.php" size="4266" author="jwage" created="Fri, 17 Sep 2010 12:43:31 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-803] Create subselect queries within join statements</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-803</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="11919">DDC-803</key>
            <summary>Create subselect queries within join statements</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="martijn">Martijn Evers</reporter>
                        <labels>
                    </labels>
                <created>Tue, 14 Sep 2010 08:58:51 +0000</created>
                <updated>Tue, 14 Sep 2010 08:58:51 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-769] Disabling discriminator column in WHERE clause</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-769</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Per default Doctrine 2 adds an IN(...)-part to the query when hydrating an entity where a discriminator column is defined. While this makes sense as a default behavior, it would be pretty helpful if one could disable the WHERE-clause for discriminator columns alltogether for performance optimization.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11830">DDC-769</key>
            <summary>Disabling discriminator column in WHERE clause</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="lstrojny">Lars Strojny</reporter>
                        <labels>
                    </labels>
                <created>Thu, 26 Aug 2010 10:41:56 +0000</created>
                <updated>Tue, 7 Sep 2010 06:49:13 +0000</updated>
                                    <version>2.0-BETA3</version>
                                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="14094" author="romanb" created="Thu, 26 Aug 2010 12:39:43 +0000"  >&lt;p&gt;That would obviously produce wrong results. Maybe you can elaborate more with an example.&lt;/p&gt;</comment>
                    <comment id="14299" author="lstrojny" created="Tue, 7 Sep 2010 06:49:13 +0000"  >&lt;p&gt;I use ENUM(&quot;foo&quot;,&quot;bar&quot;) as discriminator columns. That means, the column will contain the right values out of the box, no further result set limiting required with WHERE.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1270] Incorrect  QueryBuilder example</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1270</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In the QueryBuilder section of the documentation (&lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.1/en/reference/query-builder.html#the-expr-class&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.1/en/reference/query-builder.html#the-expr-class&lt;/a&gt;) there&apos;s an example with statements 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; 
$qb-&amp;gt;expr()-&amp;gt;select(&apos;u&apos;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;But this doesn&apos;t work anymore.&lt;/p&gt;

</description>
                <environment></environment>
            <key id="12814">DDC-1270</key>
            <summary>Incorrect  QueryBuilder example</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="a.bogomazov">Alex Bogomazov</reporter>
                        <labels>
                    </labels>
                <created>Mon, 11 Jul 2011 13:50:30 +0000</created>
                <updated>Mon, 11 Jul 2011 17:49:28 +0000</updated>
                                    <version>2.1</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16149" author="mridgway" created="Mon, 11 Jul 2011 17:49:28 +0000"  >&lt;p&gt;PR at &lt;a href=&quot;https://github.com/doctrine/orm-documentation/pull/35&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/orm-documentation/pull/35&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1269] Unexpected behavior while using association on a non primary key field</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1269</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;We have association on non primary key. Something like this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Entities\Payment:
  type: entity
  table: payments
  fields:
    id: 
      id: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      type: integer
      nullable: &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
      generator:
        strategy: IDENTITY
[-- skipped --]
  manyToOne:
    order:
      targetEntity: Entities\Order
      inversedBy: payments
      joinColumn:
        name: scode
        referencedColumnName: scode
&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;Entities\Order:
  type: entity
  table: h_orders
  fields:
    id:
      id: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      type: integer
      unsigned: &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
      nullable: &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
      generator:
        strategy: IDENTITY
    scode:
      type: integer
      unsigned: &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
      nullable: &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
[-- skipped --]
  oneToMany:
    payments:
      targetEntity: Entities\Payment
      mappedBy: order
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When I try to fetch Order from Payment with lazy loading I receive empty Order object with null properties. If I use eager fetching Order object is valid.&lt;br/&gt;
SQL generated for lazy loading seems to be valid, so I suppose the problem is in mapping result to the object. At the same time lazy loading works fine with 2.0.6 version.&lt;/p&gt;




&lt;p&gt;Another problem appears while persisting new Payment. &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;$payment = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Entities\Payment();
...
$order = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;getRepository(&apos;\Entities\Order&apos;)-&amp;gt;find(46320);
$payment-&amp;gt;setOrder($order);
$order-&amp;gt;addPayments($payment);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;persist($payment);
$&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;I get this error: Fatal error: Uncaught exception &apos;PDOException&apos; with message &apos;SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;23000&amp;#93;&lt;/span&gt;: Integrity constraint violation: 1048 Column &apos;scode&apos; cannot be null&apos; in /usr/share/php/Doctrine/DBAL/Statement.php:131&lt;/p&gt;

&lt;p&gt;I found issue which is still open and looks like mine &amp;#8211; &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1114&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1114&lt;/a&gt;. What do you think about this? &lt;/p&gt;</description>
                <environment></environment>
            <key id="12813">DDC-1269</key>
            <summary>Unexpected behavior while using association on a non primary key field</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="saniok">Alexandr Torchenko</reporter>
                        <labels>
                    </labels>
                <created>Mon, 11 Jul 2011 13:03:18 +0000</created>
                <updated>Wed, 13 Jul 2011 13:26:20 +0000</updated>
                                    <version>2.1</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16153" author="beberlei" created="Tue, 12 Jul 2011 20:26:04 +0000"  >&lt;p&gt;Formatting, please add a second ticket for the second issue.&lt;/p&gt;</comment>
                    <comment id="16154" author="beberlei" created="Tue, 12 Jul 2011 20:40:11 +0000"  >&lt;p&gt;I don&apos;t think its supported to use a non primary id for foreign key matching. I cant tell for sure though since i wasnt responsible to design this part of the Doctrine code. I would strongly suggest not to do this.&lt;/p&gt;</comment>
                    <comment id="16156" author="beberlei" created="Tue, 12 Jul 2011 20:42:09 +0000"  >&lt;p&gt;Marked as improvement. The problem is we cannot detect this invalid mapping, so no exception is thrown during compilation of the mappings,&lt;/p&gt;</comment>
                    <comment id="16157" author="beberlei" created="Tue, 12 Jul 2011 20:45:23 +0000"  >&lt;p&gt;This kind of mapping error is already acknowledged by the schema-validator console task.&lt;/p&gt;</comment>
                    <comment id="16169" author="saniok" created="Wed, 13 Jul 2011 13:20:02 +0000"  >&lt;p&gt;Should I create second ticket?&lt;/p&gt;

&lt;p&gt;Please confirm that I understood correctly. Should we avoid such mapping as it is considered as invalid.&lt;/p&gt;</comment>
                    <comment id="16170" author="beberlei" created="Wed, 13 Jul 2011 13:26:20 +0000"  >&lt;p&gt;Yes, it will not work at all. You dont need to create the second ticket as that error steams from the mapping error.&lt;/p&gt;

&lt;p&gt;You will see an error message when calling ./doctrine orm:schema:validate with this mapping.&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                                <inwardlinks description="is referenced by">
                            <issuelink>
            <issuekey id="12563">DDC-1114</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1264] Add more math related DQL funcs (trig, round, stuff?)</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1264</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="12808">DDC-1264</key>
            <summary>Add more math related DQL funcs (trig, round, stuff?)</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 9 Jul 2011 22:22:04 +0000</created>
                <updated>Sat, 9 Jul 2011 22:22:04 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1263] @ManyToOne Arbitrary References</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1263</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Could it be possible to allow for arbitrary many to one entities through a &quot;class + id&quot; construct as join columns?&lt;/p&gt;</description>
                <environment></environment>
            <key id="12807">DDC-1263</key>
            <summary>@ManyToOne Arbitrary References</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 9 Jul 2011 22:17:25 +0000</created>
                <updated>Sat, 9 Jul 2011 22:17:25 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1259] Atomic creation of Proxy files</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1259</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;From 265e5086ea51ebcafc73f91abc64334d17e2f416 Mon Sep 17 00:00:00 2001
From: Karsten Dambekalns &amp;lt;karsten@typo3.org&amp;gt;
Date: Wed, 25 May 2011 12:11:55 +0200
Subject: [PATCH 4/5] Use temporary file and rename &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; proxy class creation

Instead of a simple file_put_contents() the proxy class code is written to a
temporary file and renamed to the &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; filename. This allows file access even
&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; only allowed by the directory permission.
---
 lib/Doctrine/ORM/Proxy/ProxyFactory.php |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/lib/Doctrine/ORM/Proxy/ProxyFactory.php b/lib/Doctrine/ORM/Proxy/ProxyFactory.php
index f0cf19c..b2d42fb 100644
--- a/lib/Doctrine/ORM/Proxy/ProxyFactory.php
+++ b/lib/Doctrine/ORM/Proxy/ProxyFactory.php
@@ -152,7 +152,15 @@ class ProxyFactory
 
         $file = str_replace($placeholders, $replacements, $file);
 
-        file_put_contents($fileName, $file, LOCK_EX);
+        $temporaryFileName = $fileName . uniqid( ) . &apos;.temp&apos;;
+        $result = file_put_contents( $temporaryFileName, $file );
+
+        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;($result === FALSE) &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \RuntimeException(&apos;The temporary proxy class file &lt;span class=&quot;code-quote&quot;&gt;&quot;&apos; . $temporaryFileName . &apos;&quot;&lt;/span&gt; could not be written.&apos;);
+        $i = 0;
+        &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt;(!rename( $temporaryFileName, $fileName ) &amp;amp;&amp;amp; $i &amp;lt; 5) {
+            $i++;
+        }
+        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;($result === FALSE) &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \RuntimeException(&apos;The proxy class file &lt;span class=&quot;code-quote&quot;&gt;&quot;&apos; . $fileName . &apos;&quot;&lt;/span&gt; could not be written.&apos;);
     }
 
     /**
-- 
1.7.4.1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="12802">DDC-1259</key>
            <summary>Atomic creation of Proxy files</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Fri, 8 Jul 2011 13:29:04 +0000</created>
                <updated>Sat, 9 Jul 2011 19:44:50 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16134" author="beberlei" created="Sat, 9 Jul 2011 19:44:50 +0000"  >&lt;p&gt;Nette Framework uses a safe stream: &lt;a href=&quot;https://github.com/nette/nette/blob/master/Nette/Utils/SafeStream.php&quot; class=&quot;external-link&quot;&gt;https://github.com/nette/nette/blob/master/Nette/Utils/SafeStream.php&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1235] Provide fluent interfaces in stub methods</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1235</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Or maybe some template-files could be provided for all stubs.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; $_setMethodTemplate =
&apos;/**
 * &amp;lt;description&amp;gt;
 *
 * @param &amp;lt;variableType&amp;gt;$&amp;lt;variableName&amp;gt;
 */
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function &amp;lt;methodName&amp;gt;(&amp;lt;methodTypeHint&amp;gt;$&amp;lt;variableName&amp;gt;)
{
&amp;lt;spaces&amp;gt;$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;&amp;lt;fieldName&amp;gt; = $&amp;lt;variableName&amp;gt;;

&amp;lt;spaces&amp;gt;&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;;&amp;lt;/spaces&amp;gt;
}&apos;;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; </description>
                <environment></environment>
            <key id="12757">DDC-1235</key>
            <summary>Provide fluent interfaces in stub methods</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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, 28 Jun 2011 07:58:16 +0000</created>
                <updated>Mon, 29 Oct 2012 09:18:11 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18895" author="stof" created="Mon, 29 Oct 2012 09:18:11 +0000"  >&lt;p&gt;@beberlei this should be closed as it is the case since 2.2&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1164] doctrine:schema:update --force == doctrine:schema:create</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1164</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Doctrine:schema:update --force is the same as doctrine:schema:create.&lt;/p&gt;

&lt;p&gt;Under the hood, this may not be true, but they basically accomplish the same task. Schema:create should be removed, as it is redundant. &lt;/p&gt;

&lt;p&gt;Just look at django, one command to update db:&lt;/p&gt;

&lt;p&gt;./manage.py syncdb&lt;/p&gt;

&lt;p&gt;Not saying that django gets everything correct, but the one command to synchronize the database is consistent. doctrine:schema:update should be smart enough to do all of the work, instead of relying on the redundant doctrine:schema:create.&lt;/p&gt;
</description>
                <environment></environment>
            <key id="12657">DDC-1164</key>
            <summary>doctrine:schema:update --force == doctrine:schema:create</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="xaav">Geoff</reporter>
                        <labels>
                    </labels>
                <created>Fri, 20 May 2011 23:37:51 +0000</created>
                <updated>Fri, 20 May 2011 23:37:51 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1154] Proxies should take convention while loading *ToOne associations to reduce 1 extra query</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1154</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Read the IRC log:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;[2:38pm] guilhermeblanco: beberlei: ping
[2:38pm] guilhermeblanco: I&apos;m curious about a feature &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; Doctrine supports
[2:38pm] guilhermeblanco: &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; we &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; on a proxy:
[2:38pm] guilhermeblanco: $proxy-&amp;gt;getOneToOneAssoc()
[2:39pm] guilhermeblanco: shouldn&apos;t Doctrine already populate the assoc entity?
[2:39pm] guilhermeblanco: it would be an &lt;span class=&quot;code-keyword&quot;&gt;inner&lt;/span&gt; join
[2:39pm] beberlei: how would doctrine know it needs it?
[2:39pm] guilhermeblanco: beberlei: it always repass the ClassMetadata to Persister
[2:40pm] guilhermeblanco: so all needed item is to also pass the fieldname/assocname
[2:40pm] beberlei: but how would doctrine know getOneToOneASsoc() really returns &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; assoc
[2:40pm] beberlei: it could contain any logic
[2:40pm] guilhermeblanco: it wouldn&apos;t... but as soon as we trigger __load($fieldName)
[2:40pm] guilhermeblanco: we know that we could populate not only the Proxy, but also assoc
[2:40pm] beberlei: by convention?
[2:40pm] guilhermeblanco: ya
[2:41pm] beberlei: sounds good, can you open a ticket?
[2:41pm] guilhermeblanco: getUser() would trigger __load(&apos;user&apos;)
[2:41pm] guilhermeblanco: sure!
[2:41pm] guilhermeblanco: I&apos;ll pastie &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; as content... it would be awesome to have
[2:41pm] guilhermeblanco: I see a lot of queries here that could be optimized 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="12642">DDC-1154</key>
            <summary>Proxies should take convention while loading *ToOne associations to reduce 1 extra query</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Tue, 17 May 2011 17:58:37 +0000</created>
                <updated>Tue, 17 May 2011 17:58:37 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1143] deprecated or missing method, $cacheDriver-&gt;setManageCacheIds(true);</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1143</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/caching.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/reference/caching.html&lt;/a&gt;&lt;br/&gt;
mentions $cacheDriver-&amp;gt;setManageCacheIds(true);.&lt;br/&gt;
But method absent from V 2.04, possibly just needs a version note next to it.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12625">DDC-1143</key>
            <summary>deprecated or missing method, $cacheDriver-&gt;setManageCacheIds(true);</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="raiz">raiz</reporter>
                        <labels>
                    </labels>
                <created>Tue, 10 May 2011 13:27:47 +0000</created>
                <updated>Tue, 10 May 2011 13:27:47 +0000</updated>
                                    <version>2.0.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1038] there are tabs in the code base</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1038</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;a quick search through the ORM code base finds quite a few tabs. other doctrine projects there might also be some, though in common i only found some inside the LGPL license file.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12397">DDC-1038</key>
            <summary>there are tabs in the code base</summary>
                <type id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/task.png">Task</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="lsmith">Lukas Kahwe</reporter>
                        <labels>
                    </labels>
                <created>Wed, 16 Feb 2011 11:34:41 +0000</created>
                <updated>Wed, 16 Feb 2011 11:34:41 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-998] Code example for custom AST functions incorrect</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-998</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;On &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.0/en/reference/dql-doctrine-query-language.html#adding-your-own-functions-to-the-dql-language&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/reference/dql-doctrine-query-language.html#adding-your-own-functions-to-the-dql-language&lt;/a&gt; the code example is slightly incorrect.&lt;/p&gt;

&lt;p&gt;Mistakes:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Lexer::T_ABS doesn&apos;t exist anymore, I assume Lexer::T_IDENTIFIER is what one wants to use&lt;/li&gt;
	&lt;li&gt;Missing use for \Doctrine\ORM\Query\Lexer&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Additionally, the section should tell the user that he best has a look at lib/Doctrine/ORM/Query/AST/Functions/* to learn how to write custom functions. It also could be noted that stored procedures can be called with custom functions.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12318">DDC-998</key>
            <summary>Code example for custom AST functions incorrect</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="felicitus">Timo A. Hummel</reporter>
                        <labels>
                    </labels>
                <created>Sun, 23 Jan 2011 19:46:54 +0000</created>
                <updated>Sun, 23 Jan 2011 19:46:54 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-947] Optmize Code-Generation Strategies</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-947</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;We should optimize code-generation somehow.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12251">DDC-947</key>
            <summary>Optmize Code-Generation Strategies</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 24 Dec 2010 06:22:17 +0000</created>
                <updated>Tue, 29 Mar 2011 14:38:48 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15630" author="beberlei" created="Tue, 29 Mar 2011 14:38:48 +0000"  >&lt;p&gt;Descheduled to 2.x&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-946] Evaluate optional use of igbinary for serialization</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-946</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Igbinary is supposed to be faster and better than serialize/unserialize(). We should check if its relevant for us (metadata and query caching for example):&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/phadej/igbinary&quot; class=&quot;external-link&quot;&gt;https://github.com/phadej/igbinary&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="12246">DDC-946</key>
            <summary>Evaluate optional use of igbinary for serialization</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Wed, 22 Dec 2010 12:13:01 +0000</created>
                <updated>Wed, 22 Dec 2010 12:17:56 +0000</updated>
                                                                            <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="14997" author="beberlei" created="Wed, 22 Dec 2010 12:17:56 +0000"  >&lt;p&gt;&lt;a href=&quot;http://ilia.ws/archives/211-Igbinary,-The-great-serializer.html#extended&quot; class=&quot;external-link&quot;&gt;http://ilia.ws/archives/211-Igbinary,-The-great-serializer.html#extended&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1484] GH-162: ProxyFactory creates proxy&apos;s parent structure if it doesn&apos;t exist</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1484</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Pull-Request was automatically synchronized: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/162&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/162&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wheeee, nested proxies can be generated without hassle!&lt;/p&gt;</description>
                <environment></environment>
            <key id="13163">DDC-1484</key>
            <summary>GH-162: ProxyFactory creates proxy&apos;s parent structure if it doesn&apos;t exist</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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, 8 Nov 2011 23:50:39 +0000</created>
                <updated>Tue, 26 Jun 2012 20:40:34 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16802" author="beberlei" created="Sun, 13 Nov 2011 15:47:40 +0000"  >&lt;p&gt;Marked as improvement&lt;/p&gt;</comment>
                    <comment id="18090" author="beberlei" created="Sat, 16 Jun 2012 07:55:43 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-162&amp;#93;&lt;/span&gt; was opened&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/dbal/pull/162&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/162&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18143" author="beberlei" created="Tue, 26 Jun 2012 20:40:33 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-162&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/dbal/pull/162&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/162&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1459] Move DDC-331, DDC-448, DDC-493, DDC-513, DDC-698 Tests into SQLGeneration Testsuite</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1459</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="13131">DDC-1459</key>
            <summary>Move DDC-331, DDC-448, DDC-493, DDC-513, DDC-698 Tests into SQLGeneration Testsuite</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Sat, 29 Oct 2011 17:06:43 +0000</created>
                <updated>Wed, 1 Aug 2012 21:04:34 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1445] Improve error messages</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1445</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Error messages throughout ClassMetadata validation and UnitOfWork cycles can be significantly improved.&lt;/p&gt;

&lt;p&gt;Work is being done on: &lt;a href=&quot;https://github.com/doctrine/doctrine2/tree/ImproveErrorMessages&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/tree/ImproveErrorMessages&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13110">DDC-1445</key>
            <summary>Improve error messages</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Sat, 22 Oct 2011 08:48:50 +0000</created>
                <updated>Tue, 20 Dec 2011 22:21:04 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17070" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:21:04 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1438] Add test for DDC-1437</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1438</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Add test for &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1437&quot; title=&quot;Strange behavior  with proxied classes,expected to get entity, but returned identifier.&quot;&gt;&lt;del&gt;DDC-1437&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13103">DDC-1438</key>
            <summary>Add test for DDC-1437</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Wed, 19 Oct 2011 10:09:29 +0000</created>
                <updated>Wed, 19 Oct 2011 10:09:29 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1415] EventListener delegate on entity basis</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1415</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="13080">DDC-1415</key>
            <summary>EventListener delegate on entity basis</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 11 Oct 2011 21:22:28 +0000</created>
                <updated>Tue, 20 Dec 2011 22:22:59 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16970" author="beberlei" created="Mon, 12 Dec 2011 15:46:34 +0000"  >&lt;p&gt;Removed from master, as i dont like the api at all&lt;/p&gt;</comment>
                    <comment id="17077" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:22:59 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1393] Skipping tables or columns in database driver or SchemaTool</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1393</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;There should be a sane way to skip sources of errors in SchemaTool and the DatabaseDriver.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13040">DDC-1393</key>
            <summary>Skipping tables or columns in database driver or SchemaTool</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Sat, 24 Sep 2011 12:23:10 +0000</created>
                <updated>Tue, 20 Dec 2011 22:21:26 +0000</updated>
                                    <version>2.1.1</version>
                <version>Git Master</version>
                                <fixVersion>2.x</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16502" author="beberlei" created="Sat, 24 Sep 2011 13:17:52 +0000"  >&lt;p&gt;Idea:&lt;/p&gt;

&lt;p&gt;Develop a datastructure of sorts that allows saving information about skipping tables and columns therein when reverse engeneering.&lt;/p&gt;</comment>
                    <comment id="16953" author="guilhermeblanco" created="Fri, 9 Dec 2011 04:48:47 +0000"  >&lt;p&gt;This is not possible unless you take advantage of Topological Sorting to map class dependencies like we do inside of UnitOfWork AFTER creating the ClassMetadata.&lt;/p&gt;

&lt;p&gt;The necessity of having this is mandatory because we can never skip classes that have associations to other ones though FK.&lt;br/&gt;
You may try that, but it doesn&apos;t compensate the effort. I&apos;d rather mark this bug as won&apos;t fix, but I&apos;m leaving for you do that. =)&lt;/p&gt;</comment>
                    <comment id="17072" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:21:26 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1371] Optimistic Locking using hash column or all columns</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1371</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;We can implement optimistic locking using hash values or other all columns of an entity&lt;/p&gt;</description>
                <environment></environment>
            <key id="13008">DDC-1371</key>
            <summary>Optimistic Locking using hash column or all columns</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Sat, 10 Sep 2011 08:32:39 +0000</created>
                <updated>Sat, 10 Sep 2011 08:32:39 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1347] Github-PR-110 by shesek: Support NULL in EntityRepository&apos;s magic findBy and findOneBy methods</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1347</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 &lt;/p&gt;
{username}
&lt;p&gt;:&lt;/p&gt;

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

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

&lt;p&gt;The magic `findBy` and `findOneBy` methods don&apos;t support passing NULL as the value, because &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;we cannot (yet) transform it into IS NULL&amp;quot;&amp;#93;&lt;/span&gt;(&lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/EntityRepository.php#L207&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/EntityRepository.php#L207&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;However, `BasicEntityPersister::_getSelectConditionSQL()` &lt;span class=&quot;error&quot;&gt;&amp;#91;does support that&amp;#93;&lt;/span&gt;(&lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php#L1229&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php#L1229&lt;/a&gt;). It seems like leftovers from when there was no support for it. I tried it locally (after applying this change) and it does seem to work well.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12968">DDC-1347</key>
            <summary>Github-PR-110 by shesek: Support NULL in EntityRepository&apos;s magic findBy and findOneBy methods</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Thu, 25 Aug 2011 18:02:49 +0000</created>
                <updated>Thu, 25 Aug 2011 18:02:49 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1342] Github-PR-109: Remove trailing spaces</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1342</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;alOneh created a pull request on Github: &lt;/p&gt;

&lt;p&gt;Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/109&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/109&lt;/a&gt;&lt;/p&gt;
</description>
                <environment></environment>
            <key id="12941">DDC-1342</key>
            <summary>Github-PR-109: Remove trailing spaces</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Sun, 21 Aug 2011 14:12:43 +0000</created>
                <updated>Sun, 21 Aug 2011 14:12:43 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

&lt;p&gt;extract metadata if you would filter like this: --filter=&quot;Article&quot;&lt;br/&gt;
would extract also for &quot;ArticleItems&quot; (article_items table). Now you&lt;br/&gt;
can use --filter=&quot;Article$&quot; if you want only that table (articl)&lt;/p&gt;</description>
                <environment></environment>
            <key id="14199">DDC-2128</key>
            <summary>[GH-507] Now MetaDataFilter takess also regexp. For example whern you want to</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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, 6 Nov 2012 12:46:51 +0000</created>
                <updated>Sun, 6 Jan 2013 10:00:41 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2102] Make optional SubselectFromClause</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2102</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Subselect ::= SimpleSelectClause &lt;span class=&quot;error&quot;&gt;&amp;#91;SubselectFromClause&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;WhereClause&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;GroupByClause&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;HavingClause&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;OrderByClause&amp;#93;&lt;/span&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14166">DDC-2102</key>
            <summary>Make optional SubselectFromClause</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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 11:32:54 +0000</created>
                <updated>Thu, 25 Oct 2012 11:32:54 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2087] Select colum Hydration</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2087</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Simple way to select colum&lt;br/&gt;
for example I want select id&apos;s of entity&apos;s to save in cache or in other select query&lt;br/&gt;
Or i vant select one distinct field.&lt;/p&gt;

&lt;p&gt;SELECT u.id FROM User as u&lt;/p&gt;

&lt;p&gt;getResult give&lt;/p&gt;

&lt;p&gt;array( &lt;br/&gt;
0=&amp;gt;array(&apos;id&apos; =&amp;gt; 1),&lt;br/&gt;
1=&amp;gt;array(&apos;id&apos; =&amp;gt; 2),&lt;br/&gt;
)&lt;/p&gt;

&lt;p&gt;but how can take this&lt;/p&gt;

&lt;p&gt;array( &lt;br/&gt;
0=&amp;gt; 1,&lt;br/&gt;
0=&amp;gt; 2,&lt;br/&gt;
)&lt;/p&gt;</description>
                <environment></environment>
            <key id="14140">DDC-2087</key>
            <summary>Select colum Hydration</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ivan1986">Ivan Borzenkov</reporter>
                        <labels>
                    </labels>
                <created>Thu, 18 Oct 2012 09:47:54 +0000</created>
                <updated>Thu, 18 Oct 2012 09:56:52 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18848" author="ivan1986" created="Thu, 18 Oct 2012 09:55:04 +0000"  >&lt;p&gt;for example&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/11327798/change-the-getresult-array-key-for-the-primary-key-value&quot; class=&quot;external-link&quot;&gt;http://stackoverflow.com/questions/11327798/change-the-getresult-array-key-for-the-primary-key-value&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;this code would be good add in library&lt;br/&gt;
(and array key maybe too )&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2048] [GH-457] Fixes case when an entity has a relationship with a class with joined inheritance</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2048</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Fran6co:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="14080">DDC-2048</key>
            <summary>[GH-457] Fixes case when an entity has a relationship with a class with joined inheritance</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 29 Sep 2012 16:11:00 +0000</created>
                <updated>Sat, 29 Sep 2012 16:11:00 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2007] [GH-434] allowed to pass filter objects to the configurator</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2007</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of bamarni:&lt;/p&gt;

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

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

&lt;p&gt;If &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2004&quot; title=&quot;Allowing objects as filters&quot;&gt;&lt;del&gt;DDC-2004&lt;/del&gt;&lt;/a&gt; gets approved.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14004">DDC-2007</key>
            <summary>[GH-434] allowed to pass filter objects to the configurator</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 31 Aug 2012 13:30:27 +0000</created>
                <updated>Wed, 5 Sep 2012 17:18:24 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1999] Lazy loading doesn&apos;t get the field type when generating sql</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1999</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When calling with lazy loading the Sql generated doesn&apos;t convert the parameters according to their types. After debugging the problem I found that the problem is in the getType($field, $value) function in the BasicEntityPersister as it is it will never be able to return the filed type when called for lazy loading for oneToMany or ManyToMany. I put a quick fix for my self&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
 &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; function getType($field, $value)
    {

        &lt;span class=&quot;code-keyword&quot;&gt;switch&lt;/span&gt; (&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;) {
           &lt;span class=&quot;code-comment&quot;&gt;//here we have original code
&lt;/span&gt;            &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;:

            	$type = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
               &lt;span class=&quot;code-comment&quot;&gt;// my fix starts here
&lt;/span&gt;            	$fieldParts = explode(&apos;.&apos;, $field);
            	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (count($fieldParts &amp;gt; 1)) {
	            	foreach ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_class-&amp;gt;associationMappings as $mapping) {
						&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($mapping[&apos;joinColumnFieldNames&apos;][$fieldParts[1]])) {
							$targetClass  = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getClassMetadata($mapping[&apos;targetEntity&apos;]);

							&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($targetClass-&amp;gt;fieldNames[$fieldParts[1]])) {
								$type = $targetClass-&amp;gt;fieldMappings[$targetClass-&amp;gt;fieldNames[$fieldParts[1]]][&apos;type&apos;];
							}

							&lt;span class=&quot;code-keyword&quot;&gt;break&lt;/span&gt;;
						}
	            	}
            	}
&lt;span class=&quot;code-comment&quot;&gt;//my fix end here
&lt;/span&gt;        }

       &lt;span class=&quot;code-comment&quot;&gt;//here we have original code
&lt;/span&gt;
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $type;
    }


&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;i have only added that check in the default case of the switch. I am not sure if that is the most elegant way. I hope that helps and that it will be fixed soon. Thanks for the great work &lt;img class=&quot;emoticon&quot; src=&quot;http://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;</description>
                <environment></environment>
            <key id="13992">DDC-1999</key>
            <summary>Lazy loading doesn&apos;t get the field type when generating sql</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="vigor_bg">victor Velkov</reporter>
                        <labels>
                    </labels>
                <created>Wed, 29 Aug 2012 06:50:27 +0000</created>
                <updated>Wed, 29 Aug 2012 20:15:29 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="18564" author="beberlei" created="Wed, 29 Aug 2012 11:49:20 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=fabio.bat.silva&quot; class=&quot;user-hover&quot; rel=&quot;fabio.bat.silva&quot;&gt;Fabio B. Silva&lt;/a&gt; &lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=guilhermeblanco&quot; class=&quot;user-hover&quot; rel=&quot;guilhermeblanco&quot;&gt;Guilherme Blanco&lt;/a&gt; do we have a current best practice/policy regarding casting of join column types? There are some issues regarding it, this is another one.&lt;/p&gt;</comment>
                    <comment id="18581" author="guilhermeblanco" created="Wed, 29 Aug 2012 20:15:29 +0000"  >&lt;p&gt;We avoid the manual breakdown of path expressions.&lt;br/&gt;
Also, in BasicEntityPersister it is done behind the scenes and can get into weird scenarios. Personally speaking, I don&apos;t see how we can easily fix this issue.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2002] [GH-432] Add DBAL\TypeAwareObject type inference.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2002</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Romain-Geissler:&lt;/p&gt;

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

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

&lt;p&gt;DBAL allows you to define custom field types for your entities, and those are seamlessly converted from PHP to SQL value. However, you can&apos;t those custom types as parameters without type hinting it :&lt;/p&gt;

&lt;p&gt;```php&lt;br/&gt;
$qb-&amp;gt;select(&apos;e&apos;)&lt;br/&gt;
   -&amp;gt;from(&apos;Entity&apos;, &apos;e&apos;)&lt;br/&gt;
   -&amp;gt;where(&apos;e.customField = :customFieldValue&apos;)&lt;br/&gt;
   -&amp;gt;setParameter(&apos;customFieldValue&apos;,$customFieldValue,$customFieldDBALType);&lt;br/&gt;
   //this third argument is for now compulsory&lt;br/&gt;
:&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;In my case, ``$customFieldValue`` is an object that won&apos;t work well if converted with the default string type. I added a new DBAL interface (see doctrine/dbal#193 ) and tweaked the parameter type inference so that custom values can advertise their DBAL type.&lt;/p&gt;

&lt;p&gt;There is currently no way to dynamically override the parameter type inference logic, this is one design that allows it in some cases. &lt;/p&gt;</description>
                <environment></environment>
            <key id="13997">DDC-2002</key>
            <summary>[GH-432] Add DBAL\TypeAwareObject type inference.</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 29 Aug 2012 16:05:38 +0000</created>
                <updated>Wed, 5 Sep 2012 17:21:34 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18589" author="beberlei" created="Thu, 30 Aug 2012 13:27:31 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-432&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/432&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/432&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1996] [GH-429] Ensure a parameter mapping entry exists for InstanceOf DQL expressions</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1996</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of craigmarvelley:&lt;/p&gt;

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

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

&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;This is a possible fix for &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1995&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1995&lt;/a&gt;, in that it resolves the issue for me but I&apos;m afraid I haven&apos;t had time to test it extensively with more complex queries than the use case I gave in that ticket.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Craig&lt;/p&gt;</description>
                <environment></environment>
            <key id="13983">DDC-1996</key>
            <summary>[GH-429] Ensure a parameter mapping entry exists for InstanceOf DQL expressions</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 Aug 2012 14:23:10 +0000</created>
                <updated>Wed, 22 Aug 2012 14:23:10 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1971] [GH-419] Add ODM embedded-like functionality</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1971</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of djlambert:&lt;/p&gt;

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

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

&lt;p&gt;This PR adds ODM embedded-like functionality to the ORM.&lt;/p&gt;

&lt;p&gt;Including the new &lt;b&gt;@MappedAssociation&lt;/b&gt; annotation on a field having a one-to-one association adds a discriminator column to the table for storing the class name of a &quot;mapped&quot; entity.&lt;/p&gt;

&lt;p&gt;This allows a class or mapped superclass with a one-to-one identifying association to be extended by additional entities without requiring any code changes (as is required with the discriminator map when using inheritance).&lt;/p&gt;

&lt;p&gt;I apologize if this is the incorrect way to submit a feature request. Currently just the annotation driver has been updated, I wanted to get feedback before continuing with the remaining drivers. Models and tests are included.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13947">DDC-1971</key>
            <summary>[GH-419] Add ODM embedded-like functionality</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 7 Aug 2012 21:41:06 +0000</created>
                <updated>Tue, 14 Aug 2012 21:33:31 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1954] Specialized Batch Insert Mode for the Entity Manager</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1954</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;While it is already possible to speed up batch inserts by using raw SQL, that has the disadvantage to maintain a separate set of code that needs to be kept in sync with your schema.&lt;/p&gt;

&lt;p&gt;Therefore, it would be nice if the entity manager would provide a special batch insert mode where it can skip the change tracking related features, collection snapshots, etc. This might already be good enough for many people.&lt;/p&gt;
</description>
                <environment></environment>
            <key id="13892">DDC-1954</key>
            <summary>Specialized Batch Insert Mode for the Entity Manager</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="johannes">Johannes Schmitt</reporter>
                        <labels>
                    </labels>
                <created>Sun, 29 Jul 2012 11:35:32 +0000</created>
                <updated>Sun, 29 Jul 2012 11:35:32 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1621] Add support for FROM Class1 a1 JOIN Class2 a2 WITH cond queries</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1621</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Check feasibility of this kind of query different from FROM Class1 a1, Class2 a2 to allow arbitrary joins between classes.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13390">DDC-1621</key>
            <summary>Add support for FROM Class1 a1 JOIN Class2 a2 WITH cond queries</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/inprogress.png">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="asm89">Alexander</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 25 Jan 2012 21:17:27 +0000</created>
                <updated>Sun, 30 Dec 2012 20:16:47 +0000</updated>
                                                    <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19079" author="alex00888" created="Fri, 30 Nov 2012 10:14:47 +0000"  >&lt;p&gt;Hi all!&lt;br/&gt;
Maybe if this task is hard, you could do a simplier variant, &quot;FROM Class1 a1 JOIN a1,a2 WITH a2 INSTANCE OF Class2&quot;?&lt;br/&gt;
Doctrine 2.3 supports it, but in fact, it does not work. I can&apos;t use Class2 fields in query, and Doctrine ignores the INSTANCE OF operator when building a native queries.&lt;br/&gt;
I am working with system where I have many inherited classes with Class Table Inheritance. When I do a JOIN query, it generates native sql query more than 1KB(?!) length, and MySQL freezes for more than 7 minutes (?!) on it. It must join only tables for Class2, but it joins all my 20 tables inherited of my base class &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;br/&gt;
I don&apos;t know where to send bugreport &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;br/&gt;
It will be very good if I could manually select a joined class to make Doctrine do a better queries.&lt;br/&gt;
Sorry for my english, I am from Moscow.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1590] Fix Inheritance in Code-Generation</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1590</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="13345">DDC-1590</key>
            <summary>Fix Inheritance in Code-Generation</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Mon, 9 Jan 2012 14:07:08 +0000</created>
                <updated>Mon, 10 Dec 2012 11:00:40 +0000</updated>
                                                    <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>3</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="19118" author="lukxde" created="Mon, 10 Dec 2012 11:00:31 +0000"  >&lt;p&gt;(I have no Link Privileges, but this one #&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1379&quot; title=&quot;Entity Generator Bug with extended classes&quot;&gt;&lt;del&gt;DDC-1379&lt;/del&gt;&lt;/a&gt; is a duplicate with more extent info.)&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10002">
                <name>Dependency</name>
                                                <inwardlinks description="is required for">
                            <issuelink>
            <issuekey id="13330">DDC-1579</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1570] GH-243: Add ProxyFactoryInterface to allow custom proxy factories</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1570</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Pull-Request was automatically synchronized: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/243&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/243&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&apos;d love to have my custom proxy factory used with ORM, which is not possible at the moment&lt;/p&gt;

&lt;p&gt;(my experimental proxy &lt;a href=&quot;https://github.com/juzna/doctrine2/commit/7822446036201b066e390b2e182cac1dc0c85430&quot; class=&quot;external-link&quot;&gt;https://github.com/juzna/doctrine2/commit/7822446036201b066e390b2e182cac1dc0c85430&lt;/a&gt; and some comments about it &lt;a href=&quot;http://blog.juzna.cz/2011/06/lazy-loading-in-php/&quot; class=&quot;external-link&quot;&gt;http://blog.juzna.cz/2011/06/lazy-loading-in-php/&lt;/a&gt;)&lt;/p&gt;</description>
                <environment></environment>
            <key id="13316">DDC-1570</key>
            <summary>GH-243: Add ProxyFactoryInterface to allow custom proxy factories</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Wed, 28 Dec 2011 12:39:03 +0000</created>
                <updated>Wed, 28 Dec 2011 19:49:30 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1564] MySQL Failure when using setFirstResult() and omitting setMaxResults()</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1564</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When using setFirstResult() and omitting setMaxResults(), MySQL throws an error. This was very confusing for me until I dumped the SQL statements and found out the reason.&lt;/p&gt;

&lt;p&gt;I know that MySQL doesn&apos;t directly support this, their manual says that you should set the second parameter to LIMIT to a very high number (18446744073709551615 in their example).&lt;/p&gt;

&lt;p&gt;I&apos;d recommend that either throwing an error in the specific platform driver or follow the MySQL example.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13308">DDC-1564</key>
            <summary>MySQL Failure when using setFirstResult() and omitting setMaxResults()</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="felicitus">Timo A. Hummel</reporter>
                        <labels>
                    </labels>
                <created>Sun, 25 Dec 2011 11:47:33 +0000</created>
                <updated>Wed, 28 Dec 2011 08:48:17 +0000</updated>
                                    <version>2.1.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17125" author="beberlei" created="Wed, 28 Dec 2011 08:48:17 +0000"  >&lt;p&gt;Changed into improvement, i am not sure how this relates to other databases.&lt;/p&gt;

&lt;p&gt;You can just use this workaround yourself so long.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1563] Result cache for repository queries</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1563</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Many related &quot;standing data&quot; tables are very static and seldom change. There should be a metadata config to enable result cache for ALL repository operations.&lt;/p&gt;

&lt;p&gt;@entity(resultCache=@cache(ttl=3600))&lt;/p&gt;</description>
                <environment></environment>
            <key id="13307">DDC-1563</key>
            <summary>Result cache for repository queries</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 25 Dec 2011 11:22:11 +0000</created>
                <updated>Sun, 26 Aug 2012 19:34:52 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17103" author="beberlei" created="Sun, 25 Dec 2011 13:01:47 +0000"  >&lt;p&gt;This should directly support cache invalidation through a tag. Each repository gets a key with the current version. The version is one part ofthe actual cache datas key. &lt;/p&gt;

&lt;p&gt;A new cache key version is generated:&lt;/p&gt;

&lt;p&gt;1. When none is found during find operation&lt;br/&gt;
2. When any write operation is done.&lt;/p&gt;

&lt;p&gt;For transaction consisteny the rollback operation in UoW needs to reset cache keys and only after a succesful commit operation the new cache key version should be set.&lt;/p&gt;

&lt;p&gt;We may need begin, commit, rollback events in UoW for this.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1553] JTI Joining root tables could include ON ... AND root.id IS NOT NULL for each root in the inheritance</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1553</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Would lead to more optimal queries, while still allowing for LEFT JOIN. Also related to this:&lt;br/&gt;
&lt;a href=&quot;https://groups.google.com/forum/#!topic/doctrine-user/znkkP7IF_Aw&quot; class=&quot;external-link&quot;&gt;https://groups.google.com/forum/#!topic/doctrine-user/znkkP7IF_Aw&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13290">DDC-1553</key>
            <summary>JTI Joining root tables could include ON ... AND root.id IS NOT NULL for each root in the inheritance</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="asm89">Alexander</assignee>
                                <reporter username="asm89">Alexander</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Dec 2011 11:21:32 +0000</created>
                <updated>Thu, 22 Dec 2011 11:21:52 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17085" author="asm89" created="Thu, 22 Dec 2011 11:21:52 +0000"  >&lt;p&gt;Again I can pick this up if this improvement is agreed upon.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1549] GH-232: Recursive check for entity identifiers and hashes</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1549</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Pull-Request was automatically synchronized: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/232&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/232&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hi all!&lt;br/&gt;
This PR will add a better support for entities with association keys.&lt;/p&gt;

&lt;p&gt;getType will check recursively to find a type for the identifier.&lt;br/&gt;
getIndividualValue will search recursively to find the identifier value&lt;/p&gt;

&lt;p&gt;trygetById improved, using a recursive function to find an id value instead of implode functions (that cause exceptions if the identifier is an object and do not implements __toString method).  &lt;/p&gt;
</description>
                <environment></environment>
            <key id="13284">DDC-1549</key>
            <summary>GH-232: Recursive check for entity identifiers and hashes</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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, 20 Dec 2011 08:26:06 +0000</created>
                <updated>Thu, 22 Mar 2012 22:07:11 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17120" author="beberlei" created="Wed, 28 Dec 2011 08:03:40 +0000"  >&lt;p&gt;Mark as improvement&lt;/p&gt;</comment>
                    <comment id="17630" author="beberlei" created="Thu, 22 Mar 2012 22:07:11 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-232&amp;#93;&lt;/span&gt; was &lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/232&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/232&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1552] JTI Owning table for identifier columns could/should be the entitytable</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1552</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When ordering a JTI entity on id, the generated SQL will use the table of the root entity. This is because the root entity is listed as owner of the field in the _owningTableMap, leading to non-optimal queries.&lt;/p&gt;

&lt;p&gt;More information see:&lt;br/&gt;
&lt;a href=&quot;https://groups.google.com/forum/#!topic/doctrine-user/znkkP7IF_Aw&quot; class=&quot;external-link&quot;&gt;https://groups.google.com/forum/#!topic/doctrine-user/znkkP7IF_Aw&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13289">DDC-1552</key>
            <summary>JTI Owning table for identifier columns could/should be the entitytable</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="asm89">Alexander</assignee>
                                <reporter username="asm89">Alexander</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Dec 2011 11:15:52 +0000</created>
                <updated>Thu, 22 Dec 2011 11:36:51 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17084" author="asm89" created="Thu, 22 Dec 2011 11:17:04 +0000"  >&lt;p&gt;I can pick this up if it&apos;s agreed upon that this could indeed be improved.&lt;/p&gt;</comment>
                    <comment id="17086" author="ocramius" created="Thu, 22 Dec 2011 11:33:06 +0000"  >&lt;p&gt;The problem here is that joining with a JTI causes LEFT JOINS, which don&apos;t perform very well when it comes to sorting the results.&lt;/p&gt;

&lt;p&gt;Just as a quick reference, here&apos;s where &quot;something&quot; should be changed to get this working:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Query/SqlWalker.php#L316&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Query/SqlWalker.php#L316&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When the field is part of the primary key, the field used for sorting results should be the one of the table of the entity itself, and not of the root of the CTI.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1543] Support for Mapping Files on Traits</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1543</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;With PHP 5.4 and traits coming we should find a way where you can add xml and yml configurations for a trait and upon loading an entity X, it also loads the trait configuration of this entity.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13277">DDC-1543</key>
            <summary>Support for Mapping Files on Traits</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 17 Dec 2011 17:08:06 +0000</created>
                <updated>Sat, 17 Dec 2011 17:08:06 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1538] GH-217: [BUG] Schema Manager had no way to define extra options</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1538</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Pull-Request was automatically synchronized: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/217&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/217&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Schema Manager had no way to define extra options (&quot;comment&quot; option for example). It is possible to add these options via Annotations. After the fix adding `@ORM\Column(type=&quot;string&quot;, options=&lt;/p&gt;
{&quot;comment&quot; = &quot;test&quot;}
&lt;p&gt;)` starts to work producing valid SQL schema with COMMENT output.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13266">DDC-1538</key>
            <summary>GH-217: [BUG] Schema Manager had no way to define extra options</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 14 Dec 2011 16:45:03 +0000</created>
                <updated>Sat, 17 Dec 2011 11:52:55 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1530] HIDDEN values cannot be used in WhereClause</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1530</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT  u, u.name AS HIDDEN n FROM User u WHERE n = ?1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Is broken. Error:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SQLSTATE[42S22]: Column not found: 1054 Unknown column &apos;sclr16&apos; in &apos;where clause
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;On a query like:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT s0_.id AS id0, s0_.a AS a1, s0_.b AS b2, s0_.c AS c3, s0_.d AS d4, s0_.e AS e5, s0_.f AS f6, s0_.g AS g7, s0_.h AS h8, s0_.i AS i9, s0_.j AS j10, s0_.k AS k11, s0_.l AS l12, s0_.m AS m13, s0_.n AS n14, s0_.o AS o15, 123456789 AS sclr16, s0_.p AS p17 FROM myEntity s0_ WHERE s0_.a = 1 AND sclr16 &amp;lt;= ? ORDER BY sclr16 ASC 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13254">DDC-1530</key>
            <summary>HIDDEN values cannot be used in WhereClause</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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, 12 Dec 2011 17:23:37 +0000</created>
                <updated>Wed, 25 Jan 2012 21:40:26 +0000</updated>
                                    <version>Git Master</version>
                                <fixVersion>2.x</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17068" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:20:23 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                    <comment id="17209" author="craue" created="Mon, 9 Jan 2012 23:45:52 +0000"  >&lt;p&gt;It occurs even if the value is not HIDDEN.&lt;/p&gt;</comment>
                    <comment id="17212" author="beberlei" created="Tue, 10 Jan 2012 10:39:26 +0000"  >&lt;p&gt;@Christian this sounds like a completly different error, please explain why you think this belongs here or open a new ticket.&lt;/p&gt;</comment>
                    <comment id="17213" author="craue" created="Tue, 10 Jan 2012 10:47:38 +0000"  >&lt;p&gt;Benjamin: Because I get exactly the same error message regardless of using HIDDEN. So HIDDEN doesn&apos;t seem to be liable here.&lt;/p&gt;</comment>
                    <comment id="17214" author="beberlei" created="Tue, 10 Jan 2012 11:12:24 +0000"  >&lt;p&gt;Can you paste your DQL and SQL?&lt;/p&gt;</comment>
                    <comment id="17215" author="craue" created="Tue, 10 Jan 2012 12:22:18 +0000"  >&lt;p&gt;Code:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$queryBuilder
	-&amp;gt;select(&apos;myEntity, 123456789 AS distance&apos;)
	-&amp;gt;where(&apos;distance &amp;lt;= 10&apos;)
;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;DQL:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT myEntity, 123456789 AS distance FROM MyCompany\MyBundle\Entity\MyEntity myEntity WHERE distance &amp;lt;= 10
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;SQL:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT s0_.id AS id0, s0_.a AS a1, s0_.b AS b2, s0_.c AS c3, s0_.d AS d4, s0_.e AS e5, s0_.f AS f6, s0_.g AS g7, s0_.h AS h8, s0_.i AS i9, s0_.j AS j10, s0_.k AS k11, s0_.l AS l12, s0_.m AS m13, s0_.n AS n14, s0_.o AS o15, 123456789 AS sclr16, s0_.p AS p17 FROM myEntity s0_ WHERE sclr16 &amp;lt;= 10
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="17217" author="beberlei" created="Wed, 11 Jan 2012 11:33:32 +0000"  >&lt;p&gt;That is expected behavior, ANSI SQL defines SELECT to be evaluated &lt;b&gt;AFTER&lt;/b&gt; WHERE.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT 1234 AS foo FROM `test` HAVING foo = 1234
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;DQL has a HAVING clause as well, not sure it works without the group by. Please try.&lt;/p&gt;</comment>
                    <comment id="17320" author="craue" created="Sat, 21 Jan 2012 14:04:28 +0000"  >&lt;p&gt;So we might just close this issue then?&lt;/p&gt;</comment>
                    <comment id="17335" author="beberlei" created="Wed, 25 Jan 2012 21:40:26 +0000"  >&lt;p&gt;Its not a bug, just the error message is supposed to be improved (if possible) in a cheap way.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

<item>
            <title>[DDC-1923] Type conversion error with oracle</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1923</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;a href=&quot;https://github.com/symfony/symfony/pull/4730&quot; class=&quot;external-link&quot;&gt;https://github.com/symfony/symfony/pull/4730&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13850">DDC-1923</key>
            <summary>Type conversion error with oracle</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="asm89">Alexander</reporter>
                        <labels>
                    </labels>
                <created>Thu, 12 Jul 2012 10:40:41 +0000</created>
                <updated>Thu, 12 Jul 2012 10:40:41 +0000</updated>
                                                                            <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1913] Updates for Fedora packaging</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1913</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am packaging the DoctrineDBAL PEAR package for Fedora and would like to have the following updates:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;package.xml role for LICENSE changed from &quot;data&quot; to &quot;doc&quot;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;package.xml role for UPGRADE* changed from &quot;data&quot; to &quot;doc&quot;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;package.xml role for Doctrine/ORM/README.markdown changed from &quot;data&quot; to &quot;doc&quot;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;add some content to Doctrine/ORM/README.markdown (when building RPM this file throws a warning because it is empty)&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;doctrine.bat should only be installed on Windows OS&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment>Fedora</environment>
            <key id="13830">DDC-1913</key>
            <summary>Updates for Fedora packaging</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="siwinski">Shawn Iwinski</reporter>
                        <labels>
                    </labels>
                <created>Sat, 7 Jul 2012 03:40:25 +0000</created>
                <updated>Sat, 7 Jul 2012 03:56:52 +0000</updated>
                                    <version>2.2.2</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1899] [GH-385] set metadata for interface to be able to fetch entites by interface name</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1899</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Burgov:&lt;/p&gt;

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

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

&lt;p&gt;using the new ResolveTargetEntity functionality we noticed we needed another feature:&lt;/p&gt;

&lt;p&gt;From the Symfony Bundle defining the interface, we&apos;d like to be able to fetch entities by this very interface name, e.g.:&lt;/p&gt;

&lt;p&gt;``` php&lt;br/&gt;
$em-&amp;gt;find(&apos;Foo\BarBundle\Entity\PersonInterface&apos;, 1);&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;p&gt;``` php&lt;br/&gt;
$em-&amp;gt;getRepository(&apos;Foo\BarBundle\Entity\PersonInterface&apos;)-&amp;gt;findAll();&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;This PR sets metadata for the interface when metadata for a class is loaded that the interface is configured for&lt;/p&gt;</description>
                <environment></environment>
            <key id="13808">DDC-1899</key>
            <summary>[GH-385] set metadata for interface to be able to fetch entites by interface name</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Fri, 29 Jun 2012 10:22:55 +0000</created>
                <updated>Sat, 7 Jul 2012 15:02:12 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1860] Make usage of Composer for CLI optional</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1860</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;There&apos;s two problems with current CLI implementation:&lt;/p&gt;

&lt;p&gt; 1 - composer `autoload.php` file is hardcoded, which means that it is making assumptions about where `doctrine/orm` has been installed, and it also makes the assumption that `doctrine/orm` is not the main package.&lt;br/&gt;
 2 - composer is a requirement, while requiring it should just fail silently and allow the end user to use his own autoloading strategy&lt;/p&gt;</description>
                <environment></environment>
            <key id="13763">DDC-1860</key>
            <summary>Make usage of Composer for CLI optional</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="ocramius">Marco Pivetta</reporter>
                        <labels>
                    </labels>
                <created>Sat, 9 Jun 2012 09:06:53 +0000</created>
                <updated>Sat, 9 Jun 2012 12:56:33 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18072" author="ocramius" created="Sat, 9 Jun 2012 12:56:33 +0000"  >&lt;p&gt;Merged at &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/365&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/365&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1859] Implement console command to convert DQL into object running NativeQuery</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1859</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;As per our conversation during SFLive Paris 2012, we should create a command that receives a DQL and exposes back to you a PHP code of an object holding a conversion to NativeQuery, which is faster.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13762">DDC-1859</key>
            <summary>Implement console command to convert DQL into object running NativeQuery</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Fri, 8 Jun 2012 10:02:01 +0000</created>
                <updated>Fri, 8 Jun 2012 10:02:01 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1840] Create ParameterCollection indexed and implement it on AbstractQuery and QueryBuilder</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1840</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Currently, method setParameters in AbstractQuery and QueryBuilder only appends new parameters to the list. It should actually override the existing ones.&lt;br/&gt;
To be able to correctly fix this, we need to create a ParameterCollection which we can use/reuse to set/remove/append new parameters.&lt;br/&gt;
These elements should also support parameter types.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13733">DDC-1840</key>
            <summary>Create ParameterCollection indexed and implement it on AbstractQuery and QueryBuilder</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Sat, 26 May 2012 16:57:36 +0000</created>
                <updated>Thu, 20 Sep 2012 06:20:48 +0000</updated>
                                                    <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17987" author="beberlei" created="Sun, 27 May 2012 08:07:59 +0000"  >&lt;p&gt;Not a bug&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1829] [GH-352] Add the posibility to add a custom Comparator for Schema tool</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1829</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of catacgc:&lt;/p&gt;

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

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

&lt;p&gt;See catacgc/dbal#153&lt;/p&gt;</description>
                <environment></environment>
            <key id="13716">DDC-1829</key>
            <summary>[GH-352] Add the posibility to add a custom Comparator for Schema tool</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Mon, 21 May 2012 11:31:59 +0000</created>
                <updated>Tue, 22 May 2012 17:47:53 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1820] [GH-348] [DDC-1819][WIP] Arbitrary object hydrator</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1820</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of marijn:&lt;/p&gt;

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

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

&lt;p&gt;Initial work (in progress) on a test suite for the arbitrary object hydrator, as discussed in &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1819&quot; title=&quot;Allow ResultSetMapping to be used for objects that are not entities&quot;&gt;DDC-1819&lt;/a&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;. Any tips are appreciated. I&apos;m not too sure what the test suite should and should not cover. &lt;/p&gt;

&lt;p&gt;Other questions I have include:&lt;/p&gt;

&lt;p&gt;1. Should the `HYDRATE_ARBITRARY_OBJECT` constant be added to the `AbstractQuery` class or the `NativeQuery` class? It only makes sense in the former but it might be missed when more constants are added in the future...&lt;br/&gt;
2. Should I use data providers in my tests for the result set data?&lt;br/&gt;
3. Should my tests be added to a `DDC1819` namespace?&lt;br/&gt;
4. Should I add functional tests?&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;: &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1819&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1819&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13697">DDC-1820</key>
            <summary>[GH-348] [DDC-1819][WIP] Arbitrary object hydrator</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Mon, 14 May 2012 10:25:15 +0000</created>
                <updated>Sun, 27 May 2012 10:52:38 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1813] Save column types in ClassMetadataInfo#columnTypes array instead of ClassMetadataInfo#fieldMappings[&apos;type&apos;]</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1813</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Because you save column types in fieldmappings only, type information is not saved for join columns.&lt;/p&gt;

&lt;p&gt;Not having type info for join columns, makes it impossible to do call &apos;convertToPhpValue&apos; on join columns.&lt;/p&gt;

&lt;p&gt;For example see a demo of problem here:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/347&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/347&lt;/a&gt;&lt;/p&gt;
</description>
                <environment></environment>
            <key id="13686">DDC-1813</key>
            <summary>Save column types in ClassMetadataInfo#columnTypes array instead of ClassMetadataInfo#fieldMappings[&apos;type&apos;]</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="rivaros">ross neacoders</reporter>
                        <labels>
                    </labels>
                <created>Sun, 6 May 2012 11:36:16 +0000</created>
                <updated>Sun, 6 May 2012 11:36:41 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1814] Save quoted info in ClassmetadataInfo#quotedColumns instead of ClassmetadataInfo#fieldmappings[&apos;fieldname&apos;][&apos;quoted&apos;]</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1814</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Similar to &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1813&quot; title=&quot;Save column types in ClassMetadataInfo#columnTypes array instead of ClassMetadataInfo#fieldMappings[&amp;#39;type&amp;#39;]&quot;&gt;DDC-1813&lt;/a&gt; I propose saving &apos;quote&apos; status in ClassmetadataInfo#quotedColumns instead of ClassmetadataInfo#fieldmappings&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;fieldname&amp;#39;&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;quoted&amp;#39;&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Otherwise you have quotation info only for fieldColumns and not association columns&lt;/p&gt;</description>
                <environment></environment>
            <key id="13687">DDC-1814</key>
            <summary>Save quoted info in ClassmetadataInfo#quotedColumns instead of ClassmetadataInfo#fieldmappings[&apos;fieldname&apos;][&apos;quoted&apos;]</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="rivaros">ross neacoders</reporter>
                        <labels>
                    </labels>
                <created>Sun, 6 May 2012 11:39:54 +0000</created>
                <updated>Sun, 6 May 2012 11:39:54 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1812] Modify ResultSetMapping#addMetaResult function definition</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1812</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Give correct names to arguments&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addMetaResult($alias, $columnName, $fieldName, $isIdentifierColumn = &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    {
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;$alias - should be $tableAlias&lt;br/&gt;
$columnName should be $columnAlias&lt;br/&gt;
$fieldName should be $columnName&lt;/p&gt;

&lt;p&gt;Here are some exmple calls from code:&lt;br/&gt;
AbstractEntityInheritancePersister.php&lt;br/&gt;
79: $this-&amp;gt;_rsm-&amp;gt;addMetaResult(&apos;r&apos;, $columnAlias, $joinColumnName); &lt;br/&gt;
SqlWalker.php&lt;br/&gt;
$this-&amp;gt;_rsm-&amp;gt;addMetaResult($dqlAlias, $columnAlias, $discrColumn&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;fieldName&amp;#39;&amp;#93;&lt;/span&gt;); &lt;br/&gt;
$this-&amp;gt;_rsm-&amp;gt;addMetaResult($dqlAlias, $columnAlias, $srcColumn, (isset($assoc&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;id&amp;#39;&amp;#93;&lt;/span&gt;) &amp;amp;&amp;amp; $assoc&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;id&amp;#39;&amp;#93;&lt;/span&gt; === true)); &lt;br/&gt;
$this-&amp;gt;_rsm-&amp;gt;addMetaResult($dqlAlias, $columnAlias, $srcColumn); &lt;/p&gt;




</description>
                <environment></environment>
            <key id="13685">DDC-1812</key>
            <summary>Modify ResultSetMapping#addMetaResult function definition</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="rivaros">ross neacoders</reporter>
                        <labels>
                    </labels>
                <created>Sun, 6 May 2012 11:28:54 +0000</created>
                <updated>Sun, 6 May 2012 11:28:54 +0000</updated>
                                    <version>2.2</version>
                <version>2.2.1</version>
                <version>2.2.2</version>
                <version>Git Master</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1792] [GH-340] add public has() method to filter collection.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1792</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of pjedrzejewski:&lt;/p&gt;

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

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

&lt;p&gt;Sorry if there is any reason why this is not implemented already.&lt;br/&gt;
This is useful when some feature, for example `soft-deleteable` filter may be optional.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13650">DDC-1792</key>
            <summary>[GH-340] add public has() method to filter collection.</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Thu, 19 Apr 2012 18:03:16 +0000</created>
                <updated>Fri, 4 May 2012 17:58:14 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1787] Fix for JoinedSubclassPersister, multiple inserts with versioning throws an optimistic locking exception</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1787</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Attached is a small patch for a bug in the file JoinedSubclassPersister.php. When persisting multiple new entities that are subclasses of a baseclass (joined), and having the @Version attribute set, only for the last one a query is run to fetch the new value of the version field. The other one is tested with NULL, and throws an optimistic locking exception.&lt;/p&gt;
</description>
                <environment></environment>
            <key id="13644">DDC-1787</key>
            <summary>Fix for JoinedSubclassPersister, multiple inserts with versioning throws an optimistic locking exception</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="jack@actinum.nl">Jack van Galen</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 Apr 2012 19:40:56 +0000</created>
                <updated>Wed, 18 Apr 2012 19:40:56 +0000</updated>
                                    <version>2.2.2</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11185" name="JoinedSubclassPersister.php.patch" size="744" author="jack@actinum.nl" created="Wed, 18 Apr 2012 19:40:56 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-1760] [GH-324] simplified __call method</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1760</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of brikou:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="13599">DDC-1760</key>
            <summary>[GH-324] simplified __call method</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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, 3 Apr 2012 15:34:06 +0000</created>
                <updated>Sat, 7 Apr 2012 07:25:24 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17756" author="beberlei" created="Wed, 4 Apr 2012 19:59:07 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-324&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/324&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/324&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17794" author="beberlei" created="Fri, 6 Apr 2012 13:50:37 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-324&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/324&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/324&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17820" author="beberlei" created="Sat, 7 Apr 2012 07:21:04 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-324&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/324&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/324&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1750] [GH-319] [WIP] Added support to Multiple ID Generators</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1750</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of guilhermeblanco:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="13588">DDC-1750</key>
            <summary>[GH-319] [WIP] Added support to Multiple ID Generators</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Sun, 1 Apr 2012 16:55:51 +0000</created>
                <updated>Sun, 27 May 2012 17:15:44 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17724" author="beberlei" created="Sun, 1 Apr 2012 20:19:37 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-319&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/319&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/319&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17725" author="beberlei" created="Sun, 1 Apr 2012 20:48:16 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-319&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/319&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/319&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17726" author="beberlei" created="Mon, 2 Apr 2012 04:21:38 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-319&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/319&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/319&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17730" author="beberlei" created="Mon, 2 Apr 2012 19:15:14 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-319&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/319&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/319&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17733" author="beberlei" created="Tue, 3 Apr 2012 03:42:14 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-319&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/319&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/319&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17734" author="beberlei" created="Tue, 3 Apr 2012 03:55:21 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-319&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/319&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/319&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17752" author="beberlei" created="Wed, 4 Apr 2012 19:59:03 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-319&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/319&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/319&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17787" author="beberlei" created="Fri, 6 Apr 2012 13:50:37 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-319&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/319&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/319&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17816" author="beberlei" created="Sat, 7 Apr 2012 07:21:04 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-319&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/319&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/319&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
SELECT ... WHERE entity.field = ?1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

&lt;p&gt;&lt;tt&gt;Type::convertToDatabaseValue()&lt;/tt&gt; is correctly called when using:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$query-&amp;gt;setParameter(&apos;1&apos;, &apos;foo&apos;, &apos;the_mapping_type&apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But it is not called when using:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$query-&amp;gt;setParameter(&apos;1&apos;, &apos;foo&apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

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

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

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

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

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

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

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

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


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

&lt;p&gt;Thanks!&lt;/p&gt;</description>
                <environment>Symfony 2, linux</environment>
            <key id="14394">DDC-2249</key>
            <summary>Default value sequence </summary>
                <type id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/task.png">Task</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="mdev">Maria</reporter>
                        <labels>
                    </labels>
                <created>Sat, 19 Jan 2013 18:44:07 +0000</created>
                <updated>Sat, 19 Jan 2013 18:44:07 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

<item>
            <title>[DDC-2193] Named native query bug?</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2193</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;@NamedNativeQueries is a useful thing, but I have found some problems during my using.&lt;br/&gt;
1&#12289;Normal&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
 /**
 * @NamedNativeQueries({
 *      @NamedNativeQuery(
 *          name            = &lt;span class=&quot;code-quote&quot;&gt;&quot;fetchMultipleJoinsEntityResults&quot;&lt;/span&gt;,
 *          resultSetMapping= &lt;span class=&quot;code-quote&quot;&gt;&quot;mappingMultipleJoinsEntityResults&quot;&lt;/span&gt;,
 *          query            = &lt;span class=&quot;code-quote&quot;&gt;&quot;SELECT * FROM test &quot;&lt;/span&gt;
 *      )
 * })
 */
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;2&#12289;Error&#65292;cannot connect to the server&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
 /**
 * @NamedNativeQueries({
 *      @NamedNativeQuery(
 *          name            = &lt;span class=&quot;code-quote&quot;&gt;&quot;fetchMultipleJoinsEntityResults&quot;&lt;/span&gt;,
 *          resultSetMapping= &lt;span class=&quot;code-quote&quot;&gt;&quot;mappingMultipleJoinsEntityResults&quot;&lt;/span&gt;,
 *          query            = &quot;SELECT * 
            FROM test &quot;
 *      )
 * })
 */
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;3&#12289;Cannot use alias.The same problem as the second one.&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
.......
 query            = &lt;span class=&quot;code-quote&quot;&gt;&quot;SELECT a as test FROM test &quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14303">DDC-2193</key>
            <summary>Named native query bug?</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="dingdangjyz">dingdangjyz</reporter>
                        <labels>
                    </labels>
                <created>Tue, 11 Dec 2012 01:43:00 +0000</created>
                <updated>Mon, 31 Dec 2012 04:02:50 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="19125" author="fabio.bat.silva" created="Wed, 12 Dec 2012 13:56:30 +0000"  >&lt;p&gt;Hi&lt;/p&gt;

&lt;p&gt;Doctrine does not change the native query at all&lt;br/&gt;
The problem seems related with database connection.&lt;/p&gt;

&lt;p&gt;Could you provide more details please?&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;</comment>
                    <comment id="19127" author="dingdangjyz" created="Thu, 13 Dec 2012 01:12:44 +0000"  >&lt;p&gt;Doctrine\Common\Lexer.php&lt;/p&gt;

&lt;p&gt;Hello, after checking&#65292; I found the problem should be here. As long as SQL wrap, or fill in alias, it will be error. It seems to be the preg_split problem?&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
        $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE;
        $matches = preg_split($regex, $input, -1, $flags);

        foreach ($matches as $match) {
            &lt;span class=&quot;code-comment&quot;&gt;// Must remain before &apos;value&apos; assignment since it can change content
&lt;/span&gt;            $type = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getType($match[0]);

            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;tokens[] = array(
                &apos;value&apos; =&amp;gt; $match[0],
                &apos;type&apos;  =&amp;gt; $type,
                &apos;position&apos; =&amp;gt; $match[1],
            );
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="19128" author="fabio.bat.silva" created="Thu, 13 Dec 2012 10:59:21 +0000"  >&lt;p&gt;Hi&lt;/p&gt;

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

&lt;p&gt;Cheers&lt;/p&gt;</comment>
                    <comment id="19133" author="dingdangjyz" created="Fri, 14 Dec 2012 02:06:21 +0000"  >&lt;p&gt;xp php5.3.8 Apache&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&amp;lt;?php

namespace Models\Entities;

/**
 * @Entity
 * @Table
 *
 * @NamedNativeQueries({
 *      @NamedNativeQuery(
 *          name             = &lt;span class=&quot;code-quote&quot;&gt;&quot;find-hotel-item&quot;&lt;/span&gt;,
 *          resultSetMapping = &lt;span class=&quot;code-quote&quot;&gt;&quot;mapping-find-item&quot;&lt;/span&gt;,
 *          query            = &quot;SELECT Top 1 VEI_SN AS SN 
            FROM tourmanager.dbo.VEndorInfo vi 
INNER JOIN tourmanager.dbo.VEndorInfo2 vi2 ON 
vi.VEI_SN = vi2.VEI2_VEI_SN LEFT OUTER JOIN tourmanager.dbo.HotelInfo hi 
ON hi.hotelid = vi2.VEI2_VEI_SN INNER JOIN tourmanager.dbo.HotelInfo2 
hi2 ON hi2.hotelid = vi2.VEI2_VEI_SN AND hi2.LGC = 1 &quot;
 *      )
 * })
 *
 * @SqlResultSetMappings({
 *      @SqlResultSetMapping(
 *          name    = &lt;span class=&quot;code-quote&quot;&gt;&quot;mapping-find-item&quot;&lt;/span&gt;,
 *          entities= {
 *              @EntityResult(
 *                  entityClass = &lt;span class=&quot;code-quote&quot;&gt;&quot;HTHotelItem&quot;&lt;/span&gt;,
 *                  fields = {
 *                      @FieldResult(name = &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;,   column=&lt;span class=&quot;code-quote&quot;&gt;&quot;SN&quot;&lt;/span&gt;)
 *                  }
 *              )
 *          }
 *      )
 * })
 *
 */

class HTHotelItem{
    /** @Id @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;) @GeneratedValue */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;
        
    /** @name */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name;
    
    /** @city */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $city;
    
    /** @url */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $url;
    
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; function loadMetadata(\Doctrine\ORM\Mapping\ClassMetadataInfo $metadata){
        $metadata-&amp;gt;addNamedNativeQuery(array(
            &apos;name&apos;              =&amp;gt; &apos;find-hotel-item&apos;,
            &apos;query&apos;             =&amp;gt; &apos;SELECT h FROM HTHotelItem h&apos;,
            &apos;resultSetMapping&apos;  =&amp;gt; &apos;\\Models\\Entities\\HTHotelItem&apos;
        ));
    }
    
    function getId(){
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;id;
    }
    
    function getName(){
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;name;
    }
    
    function getCity(){
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;city;
    }
    
    function getUrl(){
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;url;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="19134" author="dingdangjyz" created="Fri, 14 Dec 2012 07:59:21 +0000"  >&lt;p&gt;@NamedNativeQueries query  &lt;/p&gt;

&lt;p&gt;If we write the long SQL, it will be fault. NO error massage.&lt;br/&gt;
1251 charecter must be wrong.&lt;br/&gt;
I still insist it is the problem of preg_split in &lt;br/&gt;
Doctrine\Common\Lexer.php&lt;/p&gt;</comment>
                    <comment id="19152" author="fabio.bat.silva" created="Sun, 16 Dec 2012 20:50:10 +0000"  >&lt;p&gt;Can&apos;t reproduce,&lt;/p&gt;

&lt;p&gt;Could you try to change the attached test case and make it fail.&lt;/p&gt;


&lt;p&gt;Cheers&lt;/p&gt;</comment>
                    <comment id="19178" author="beberlei" created="Mon, 24 Dec 2012 09:22:16 +0000"  >&lt;p&gt;The Doctrine\Common\Lexer is never used in combination with native queries, only with the Annotation Parser, so i cannot be the preg_split that causes your SQL to be broken. Or do you get annotation errors?&lt;/p&gt;

&lt;p&gt;Also what database are you using? maybe its related to the DBAL sql parsing?&lt;/p&gt;</comment>
                    <comment id="19195" author="dingdangjyz" created="Mon, 31 Dec 2012 04:02:50 +0000"  >&lt;p&gt;I&apos;m sorry my English is too bad. &lt;/p&gt;

&lt;p&gt;I think it&apos;s Doctrine \ is \ Lexer. PHP preg_split the function of the problem in this file.&lt;br/&gt;
My system environment is xp/apache 5.3 + / php_pdo_sqlsrv_53 / mssql2000&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11363" name="DDC2193Test.php" size="2501" author="fabio.bat.silva" created="Sun, 16 Dec 2012 20:48:10 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2183] Second Level Cache improvements</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2183</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hibernate has a second level cache feature that is much more advanced than Doctrines result cache.&lt;/p&gt;

&lt;p&gt;With NoSQL in-memory databases such as Riak or MongoDB we could need a much more powerful cache to make Doctrine faaaaaasst. This ticket tracks the design and implementation of that feature.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14289">DDC-2183</key>
            <summary>Second Level Cache improvements</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Mon, 3 Dec 2012 22:44:09 +0000</created>
                <updated>Mon, 3 Dec 2012 22:44:09 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>4</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2170] Decorator base classes for query related objects</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2170</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;tt&gt;Doctrine\ORM\Query&lt;/tt&gt; should not be directly extendable but it would be nice to decorate query objects and add additional methods. Use cases are e.g. doctrine-fun (see &lt;a href=&quot;https://github.com/lstrojny/doctrine-fun/blob/master/src/Doctrine/Fun/Query.php&quot; class=&quot;external-link&quot;&gt;https://github.com/lstrojny/doctrine-fun/blob/master/src/Doctrine/Fun/Query.php&lt;/a&gt;) or even cases where users want to add domain specific methods. As &lt;tt&gt;Doctrine\ORM\Query&lt;/tt&gt; is final it is not so easy to decorate correctly. I would propose:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Add a new interfaces: &lt;tt&gt;Doctrine\ORM\QueryInterface&lt;/tt&gt; that provides a contract for all methods &lt;tt&gt;Doctrine\ORM\Query&lt;/tt&gt; provides&lt;/li&gt;
	&lt;li&gt;Add a decorator base class &lt;tt&gt;Doctrine\ORM\QueryDecorator&lt;/tt&gt; as an extension point&lt;/li&gt;
	&lt;li&gt;Some for &lt;tt&gt;NativeQuery&lt;/tt&gt; and &lt;tt&gt;QueryBuilder&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
            <key id="14273">DDC-2170</key>
            <summary>Decorator base classes for query related objects</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="lstrojny">Lars Strojny</reporter>
                        <labels>
                    </labels>
                <created>Mon, 26 Nov 2012 01:30:18 +0000</created>
                <updated>Mon, 26 Nov 2012 01:31:19 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19062" author="lstrojny" created="Mon, 26 Nov 2012 01:31:19 +0000"  >&lt;p&gt;Related:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/524&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/524&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/doctrine/common/pull/229&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/pull/229&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2166] Improve Identifier hashing in IdentiyMap</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2166</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;There are currently some drawbacks with identifier hashing:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;They only work on one level for derived keys&lt;/li&gt;
	&lt;li&gt;The code is suspect to high performance requirements&lt;/li&gt;
	&lt;li&gt;Composite Keys might be suspect to weird bugs if they contain spaces.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;There is a PR by goetas (&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/232&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/232&lt;/a&gt;) that solves some issues, however adds a performance hit.&lt;/p&gt;

&lt;p&gt;We should move the conditional logic of this code out and use a strategy pattern to improve both performance and robustness of this code.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14268">DDC-2166</key>
            <summary>Improve Identifier hashing in IdentiyMap</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Sun, 25 Nov 2012 13:38:29 +0000</created>
                <updated>Sun, 25 Nov 2012 13:38:29 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2154] Traits and Code Generation</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2154</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;See &lt;a href=&quot;https://github.com/doctrine/DoctrineBundle/issues/106#issuecomment-10479116&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/DoctrineBundle/issues/106#issuecomment-10479116&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14242">DDC-2154</key>
            <summary>Traits and Code Generation</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 18 Nov 2012 13:11:41 +0000</created>
                <updated>Sun, 18 Nov 2012 13:11:41 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1739] [GH-314] [WIP] Doctrine\Common metadata drivers reuse</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1739</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Ocramius:&lt;/p&gt;

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

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

&lt;p&gt;This PR is strictly related with &lt;a href=&quot;https://github.com/doctrine/common/pull/98&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/pull/98&lt;/a&gt; and tests won&apos;t pass until the doctrine-common submodule points to a merged version of it (will do so later, so &lt;b&gt;please don&apos;t merge now&lt;/b&gt; ).&lt;/p&gt;

&lt;p&gt;Basically, I just stripped any code duplicate of what already available in dcom master under Doctrine\Common\Persistence\Mapping\Driver.&lt;/p&gt;

&lt;p&gt;Tests are OK on my environment when using the new commons submodule.&lt;/p&gt;

&lt;p&gt;(This is a cleanup for #263, where I sadly did pull from the remote branch after rebasing)&lt;/p&gt;

&lt;p&gt;Tests are still failing.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13577">DDC-1739</key>
            <summary>[GH-314] [WIP] Doctrine\Common metadata drivers reuse</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Fri, 30 Mar 2012 16:10:32 +0000</created>
                <updated>Sat, 7 Apr 2012 07:21:02 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17678" author="beberlei" created="Fri, 30 Mar 2012 17:56:45 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-314&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/314&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/314&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17680" author="beberlei" created="Fri, 30 Mar 2012 19:37:27 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-314&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/314&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/314&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17684" author="beberlei" created="Fri, 30 Mar 2012 19:55:57 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-314&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/314&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/314&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17687" author="beberlei" created="Fri, 30 Mar 2012 20:01:01 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-314&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/314&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/314&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17710" author="beberlei" created="Sun, 1 Apr 2012 09:02:14 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-314&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/314&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/314&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17747" author="beberlei" created="Wed, 4 Apr 2012 19:59:02 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-314&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/314&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/314&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17792" author="beberlei" created="Fri, 6 Apr 2012 13:50:37 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-314&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/314&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/314&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17809" author="beberlei" created="Sat, 7 Apr 2012 07:21:02 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-314&amp;#93;&lt;/span&gt; was synchronize&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/314&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/314&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1723] Custom ID Generators</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1723</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Allow specify custom id generators, pull request is GH-206&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/206&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/206&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13551">DDC-1723</key>
            <summary>Custom ID Generators</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Mar 2012 21:27:59 +0000</created>
                <updated>Thu, 20 Sep 2012 06:20:48 +0000</updated>
                                                    <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1681] loadRelated() - Method to efficiently load sets of related entities in &quot;sub&quot;-select strategies</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1681</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;As per Request of Seldaek &lt;img class=&quot;emoticon&quot; src=&quot;http://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="13496">DDC-1681</key>
            <summary>loadRelated() - Method to efficiently load sets of related entities in &quot;sub&quot;-select strategies</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 5 Mar 2012 20:14:44 +0000</created>
                <updated>Mon, 5 Mar 2012 21:22:52 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="17522" author="seldaek" created="Mon, 5 Mar 2012 20:43:09 +0000"  >&lt;p&gt;Sample:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$result = $queryBuilder-&amp;gt;select(&apos;a&apos;)-&amp;gt;from(&apos;User&apos;, &apos;a&apos;)-&amp;gt;getQuery()-&amp;gt;getResult();
$result-&amp;gt;loadRelated(&apos;roles&apos;); &lt;span class=&quot;code-comment&quot;&gt;// loads all a.roles&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Would be the equivalent of:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$result = $queryBuilder-&amp;gt;select(&apos;a, r&apos;)-&amp;gt;from(&apos;User&apos;, &apos;a&apos;)-&amp;gt;join(&apos;a.roles&apos;, &apos;r&apos;)-&amp;gt;getQuery()-&amp;gt;getResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Except that the above does one simple query without join, then one WHERE IN query with all ids from the collection.&lt;br/&gt;
The latter obviously does a join and retrieves everything in one - more complex - query.&lt;/p&gt;

&lt;p&gt;Bonus points if you can loadRelated multiple relations at once.&lt;/p&gt;</comment>
                    <comment id="17523" author="stof" created="Mon, 5 Mar 2012 21:09:31 +0000"  >&lt;p&gt;I see an issue here: if you do a WHERE IN with the multiple ids, how do you know which entity the role is related to ?&lt;/p&gt;

&lt;p&gt;and btw, the interface you suggested above would require breaking the BC: ``$result`` is an array right now.&lt;/p&gt;</comment>
                    <comment id="17524" author="seldaek" created="Mon, 5 Mar 2012 21:15:47 +0000"  >&lt;p&gt;The interface is just an example mimicking the way it worked in D1, take it with a grain of salt.&lt;/p&gt;

&lt;p&gt;As for the implementation, if you assume the roles table has a user_id and role column, then you can do WHERE user_id IN (1, 2, 3) and you&apos;ll get back the user ids so you know where to attach them. It might still require some joining in some cases, but the point is to keep the joins out of the main query.&lt;/p&gt;</comment>
                    <comment id="17525" author="guilhermeblanco" created="Mon, 5 Mar 2012 21:22:52 +0000"  >&lt;p&gt;The one to be implemented would be:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$result = $queryBuilder-&amp;gt;select(&apos;a&apos;)-&amp;gt;from(&apos;User&apos;, &apos;a&apos;)-&amp;gt;getQuery()-&amp;gt;getResult();
$em-&amp;gt;loadRelated($result, &apos;roles&apos;); &lt;span class=&quot;code-comment&quot;&gt;// loads all a.roles&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The reason for that is not all the times you have a PersistentCollection. You may have an ArrayCollection too.&lt;br/&gt;
I just don&apos;t know yet how to handle array and ArrayCollection situations, since you may not know which class you&apos;re trying to fetch.&lt;br/&gt;
Maybe I can try to grab the first item of array and retrieve Association information from ClassMetadata retrieved via get_class on first item. That would solve the problem.&lt;/p&gt;

&lt;p&gt;Any other ideas, feel free to give me.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-213] Persist order of collections</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-213</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;A Collection is like a php array, an ordered map. Hence there should be the possibility to persist this order.&lt;/p&gt;</description>
                <environment></environment>
            <key id="10620">DDC-213</key>
            <summary>Persist order of collections</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="romanb">Roman S. Borschel</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Dec 2009 17:40:38 +0000</created>
                <updated>Tue, 16 Oct 2012 07:43:02 +0000</updated>
                                    <version>2.0</version>
                                <fixVersion>2.x</fixVersion>
                                        <due></due>
                    <votes>10</votes>
                        <watches>8</watches>
                        <comments>
                    <comment id="13042" author="shurakai" created="Fri, 21 May 2010 19:50:28 +0000"  >&lt;p&gt;Roman, I&apos;d like to do this one as I have currently a use case for this. Do you have any idea of how to do this? What I&apos;m wondering is whether it is possible to implement this without user intervention. (This would simply mean &quot;store the entities as they were added&quot;). But this would need another column in DB that we&apos;d have to add within oneToMany / manyToMany relationships, but in this case one could save a serialized array holding &quot;entityId =&amp;gt; position&quot; key / value pairs.&lt;/p&gt;

&lt;p&gt;Afterwards, one could easily rebuild / reorder the collection via $collection-&amp;gt;set($entity, $order&lt;span class=&quot;error&quot;&gt;&amp;#91;$entity-&amp;gt;identifier&amp;#93;&lt;/span&gt;);&lt;/p&gt;

&lt;p&gt;If you&apos;ve got another thought about this, please don&apos;t hesitate to point me into the right direction!&lt;/p&gt;</comment>
                    <comment id="13043" author="beberlei" created="Sat, 22 May 2010 02:54:25 +0000"  >&lt;p&gt;this won&apos;t be implemented until 2.1, since its a pretty complex feature. &lt;/p&gt;

&lt;p&gt;Changes are probably required in:&lt;/p&gt;

&lt;p&gt;1. CollectionPersister - Add a new collection persister that takes the position into account&lt;br/&gt;
2. SchemaTool - Add a &apos;col_position&apos; column to either the many-to-many or the one-to-many tables.&lt;br/&gt;
3. EntityPersister - Use and extend current order-by support to make the sorting happen&lt;/p&gt;

&lt;p&gt;You can implement this already though with some performance hit in update scenarios. If you use the ORDER BY support and implement an API around your entity that abstracts those changes and always sets a &quot;position&quot; field on the many entity that is supposed to be sorted.&lt;/p&gt;</comment>
                    <comment id="13044" author="romanb" created="Sat, 22 May 2010 05:35:48 +0000"  >&lt;p&gt;I don&apos;t think we necessarily need a new collection persister. Simply adjusting the ManyToManyPersister to be able to deal with it might be sufficient.&lt;/p&gt;

&lt;p&gt;For OneToMany, that is always persisted from the &quot;many&quot; side, thus there is no collection persister, we would need to adjust the normal persisters.&lt;/p&gt;

&lt;p&gt;They key element for the user should be a new annotation (or corresponding xml/yaml element) @OrderColumn. By default the order should not be persistent, only when an @OrderColumn annotation is present. The name of the order column can have a default, i.e. &quot;position&quot;. Thus this enhancement of persisting the order should be fully backwards compatible.&lt;/p&gt;</comment>
                    <comment id="13045" author="romanb" created="Sat, 22 May 2010 05:41:07 +0000"  >&lt;p&gt;On another note, the getInsertDiff/getDeleteDiff methods of PersistentCollection should already be &quot;ready&quot; for this. That is, when an element in the collection changed only its position, this is already tracked as a change. However the ManyToManyPersister issues no &quot;UPDATE&quot; queries, it simply deletes and inserts. A position change may be more effectively persisted with an UPDATE.&lt;/p&gt;</comment>
                    <comment id="14493" author="beberlei" created="Thu, 30 Sep 2010 03:23:11 +0000"  >&lt;p&gt;From a mailinglist entry, required check/changepoints:&lt;/p&gt;

&lt;p&gt;1. ClassMetadata of Many-To-Many associations have to be extended to publish the required datastructure to the ORM.&lt;br/&gt;
2. All Metadata Mapping Drivers have to be extended&lt;br/&gt;
3. Persisters\ManyToManyCollectionPersister has to be extended to save the key in the many to many table if desired by the user.&lt;br/&gt;
4. Schema-Tool has to be extended to create the additional column.&lt;br/&gt;
5. PersistentCollection has to be extended so that lazy loading of collections with additional key works.&lt;br/&gt;
6. Array- and ObjectHydrator have to be extended to allow fetch join of collections with key column.&lt;br/&gt;
7. Discuss wheather to support this for One-To-Many also with the key-column on the many side. This is much more tricky internally though.&lt;/p&gt;</comment>
                    <comment id="15006" author="beberlei" created="Fri, 24 Dec 2010 04:48:03 +0000"  >&lt;p&gt;Push back to 2.x, we will have support for &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-250&quot; title=&quot;ArrayCollection Key Column @indexBy&quot;&gt;&lt;del&gt;DDC-250&lt;/del&gt;&lt;/a&gt; first and for this at a later release.&lt;/p&gt;</comment>
                    <comment id="17377" author="armetiz" created="Tue, 7 Feb 2012 17:25:33 +0000"  >&lt;p&gt;Hi there,&lt;br/&gt;
I&apos;m looking for this feature.&lt;/p&gt;

&lt;p&gt;Benjamin Eberlei said that : &quot;You can implement this already&quot;, but I don&apos;t understand the &quot;how to&quot;.&lt;/p&gt;

&lt;p&gt;Also,&lt;br/&gt;
The problem should be solve if RDBMS had a &quot;natural&quot; order. An order based on item position inside table.&lt;/p&gt;

&lt;p&gt;To get this feature without any change on Doctrine, I have remplace the PK defined by the target &amp;amp; mapped field identifier. The new PK is a new field with type &quot;integer&quot; and with auto-increment enable.&lt;br/&gt;
In this configuration, Doctrine use the &quot;natural&quot; order of the RDBMS. And I can change order of my item inside Collection and persist it.&lt;/p&gt;

&lt;p&gt;It&apos;s an very bad solution, but It work before an official support.&lt;/p&gt;

&lt;p&gt;Waiting for advices, and solutions,&lt;/p&gt;

&lt;p&gt;Thomas.&lt;/p&gt;</comment>
                    <comment id="17379" author="armetiz" created="Wed, 8 Feb 2012 10:41:00 +0000"  >&lt;p&gt;Answering to Benjamin Eberlei on the &quot;7. Discuss wheather to support this for One-To-Many also with the key-column on the many side. This is much more tricky internally though.&quot;.&lt;/p&gt;

&lt;p&gt;I think that for One-To-Many relations, if user want to store the collection order, Doctrine can store the One-To-Many as Many-To-Many with a &quot;model&quot; limitation. &lt;br/&gt;
In that case, if storing order collection for Many-To-Many work, it should work for One-To-Many.&lt;/p&gt;

&lt;p&gt;What do you think about it ?&lt;/p&gt;</comment>
                    <comment id="17486" author="ndm" created="Wed, 29 Feb 2012 05:41:55 +0000"  >&lt;p&gt;I think that it must be possible to have two keys ordering : the order isn&apos;t obligatory reversible.&lt;/p&gt;

&lt;p&gt;For exemple  with user and group : &lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;You can order groups for one user : with preference by exemple, or importance.&lt;/li&gt;
	&lt;li&gt;And  with a different order,  users for a group : rank by example.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;And maybe more, if you decide to add multi-order : an user show group by his rank in it, if his rank is identical, the order is make by love preference, and after by the importance given by the user (not necessary a number, if we imagine filter on them).&lt;/p&gt;

&lt;p&gt;So a default order can be choice with parametized fields and could be : &lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
@ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Group&quot;&lt;/span&gt;)
...
@JoinFields ( rank: { type: &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;} , preference:{type:&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;}, importance:{type: string, length: 40} )
@OrderByJoinFields({&lt;span class=&quot;code-quote&quot;&gt;&quot;rank&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;ASC&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;preference&quot;&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;ASC&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;importance&quot;&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;ASC&quot;&lt;/span&gt; } )
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;In this case the order must be optional and would be clean if another order appears in the same scope (DQL...). And manytomany became virtual entities act as other entities except they don&apos;t appears permetting in the same time a better conception.&lt;/p&gt;

&lt;p&gt;So if the solution take in &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-181&quot; class=&quot;external-link&quot;&gt;DDC-181&lt;/a&gt; will become the only solution. This would a good idea to document this. Because, this seems to me a very important point.&lt;/p&gt;

&lt;p&gt;My last point is &lt;b&gt;even an unique ordering field&lt;/b&gt; created in the join table will be a &lt;b&gt;big and usefull improvement&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Thank a lot for your beautiful work.&lt;/b&gt;&lt;/p&gt;</comment>
                    <comment id="17487" author="armetiz" created="Wed, 29 Feb 2012 07:05:59 +0000"  >&lt;p&gt;In my point of view, a collection can be order in a single way only.&lt;br/&gt;
If you want to add more than one order between User &amp;amp; Group, it&apos;s a new collection, a new relation.&lt;br/&gt;
Like : &lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;User.memberOf() : Group[]&lt;/li&gt;
	&lt;li&gt;Group.members() : User[]&lt;/li&gt;
	&lt;li&gt;Group.importantMembers() : User[]&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;And it&apos;s your role to keep a consistency between members &amp;amp; importantMembers array.&lt;/p&gt;

&lt;p&gt;Because ManyToMany join table is the reflection of a state of an ArrayCollection. It&apos;s not a usefull feature to be able to store all of the state of an ArrayCollection, even the order of this Array. It&apos;s just a normal feature that is really missing &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/tongue.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;Thomas.&lt;/p&gt;</comment>
                    <comment id="17488" author="ndm" created="Wed, 29 Feb 2012 10:14:27 +0000"  >&lt;p&gt;I don&apos;t think:&lt;/p&gt;

&lt;p&gt;If you have three collection, you &lt;b&gt;duplicate one relation 3 times&lt;/b&gt; and it&apos;s easy in consequence &lt;b&gt;to lost the data integrity and unicity&lt;/b&gt;.&lt;/p&gt;

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

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Thomas have rank 10 in Admin&lt;/li&gt;
	&lt;li&gt;Thomas think the admin group has importance noted 3 on all of his groups.&lt;/li&gt;
	&lt;li&gt;If a responsable of admin group decide to delete Thomas from it.&lt;/li&gt;
	&lt;li&gt;Thomas, in his ordered list of groups, think always to be in group admin.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;So in my idea, the &lt;b&gt;many to many relation&lt;/b&gt; isn&apos;t just an array collection, but &lt;b&gt;should be an virtual entity&lt;/b&gt;. In UML or in Merise method this is a common problem to have a parametized relation. I think an orm should just implement this.&lt;/p&gt;
</comment>
                    <comment id="17489" author="armetiz" created="Wed, 29 Feb 2012 10:43:59 +0000"  >&lt;p&gt;Hum,&lt;br/&gt;
I agree with you.. In a SQL Schema, it&apos;s a good choice to add many fields in a ManyToMany join table to description &quot;order&quot;.&lt;/p&gt;</comment>
                    <comment id="17535" author="armetiz" created="Wed, 7 Mar 2012 15:12:35 +0000"  >&lt;p&gt;I just want to add a piece of Doctrine ORM Document : &lt;/p&gt;

&lt;p&gt;&quot;When working with collections, keep in mind that a Collection is essentially an &lt;b&gt;ordered map&lt;/b&gt; (just like a PHP array). That is why the remove operation accepts an index/key. removeElement is a separate method that has O ( n) complexity using array_search, where n is the size of the map.&quot;&lt;/p&gt;</comment>
                    <comment id="17636" author="armetiz" created="Fri, 23 Mar 2012 09:45:13 +0000"  >&lt;p&gt;Hi there,&lt;br/&gt;
After several discussions. on IRC, I have changed my point of view.&lt;/p&gt;

&lt;p&gt;Doctrine Documentation says : &quot;When working with collections, keep in mind that a Collection is essentially an ordered map (just like a PHP array)&quot;.&lt;br/&gt;
So, I think that Doctrine have to be able to store or not the order of a Collection. By adding a new field on the Joined table to store the position of each elements.&lt;/p&gt;

&lt;p&gt;But I not agree with @Nicolas. Because in his case, he&apos;s talking about Association Class : &lt;a href=&quot;http://etutorials.org/Programming/UML/Chapter+6.+Class+Diagrams+Advanced+Concepts/Association+Class/&quot; class=&quot;external-link&quot;&gt;http://etutorials.org/Programming/UML/Chapter+6.+Class+Diagrams+Advanced+Concepts/Association+Class/&lt;/a&gt;&lt;br/&gt;
Because he&apos;s talking of a business logic, he&apos;s talking of a dedicated Entity class.&lt;/p&gt;

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

&lt;p&gt;Thomas;&lt;/p&gt;
</comment>
                    <comment id="18593" author="armetiz" created="Fri, 31 Aug 2012 13:43:00 +0000"  >&lt;p&gt;Any news ? &lt;/p&gt;</comment>
                    <comment id="18841" author="mnapoli" created="Tue, 16 Oct 2012 07:43:02 +0000"  >&lt;p&gt;Hi, any news on this?&lt;/p&gt;

&lt;p&gt;If I may add any info to this feature request, maybe something like JPA/Hibernate could be a good start?&lt;/p&gt;

&lt;p&gt;See &lt;a href=&quot;http://docs.oracle.com/javaee/6/api/javax/persistence/OrderColumn.html&quot; class=&quot;external-link&quot;&gt;http://docs.oracle.com/javaee/6/api/javax/persistence/OrderColumn.html&lt;/a&gt; or &lt;a href=&quot;http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/collections.html#collections-indexed&quot; class=&quot;external-link&quot;&gt;http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/collections.html#collections-indexed&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The idea in Hibernate is that you persist the order of the list in an extra column. This column is not a field of the entity however.&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="10523">DDC-181</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                                <inwardlinks description="is referenced by">
                            <issuelink>
            <issuekey id="10718">DDC-250</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-586] Repo does not find &quot;unflushed&quot; object</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-586</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The problem is this:&lt;/p&gt;

&lt;p&gt;$bar = new \entity\content\ContentTag();&lt;br/&gt;
$bar-&amp;gt;setName(&apos;bar&apos;);&lt;br/&gt;
$em-&amp;gt;persist($bar);&lt;/p&gt;

&lt;p&gt;$existingTag = $em-&amp;gt;getRepository(&apos;entity\content\ContentTag&apos;)-&amp;gt;findOneByName(&apos;bar&apos;);&lt;/p&gt;

&lt;p&gt;Seeing as in EntityRepository &quot;find()&quot; queries the Unit of Work first, and &quot;findBy()&quot; goes directly to the persister, only remotely stored objects will be found. Now if I want a tag object to attach related tags, it would have to query by name to see if an object already exist, BUT it wont find one as the UoW has not been committed, resulting in a new one being created, ultimately resulting in a PDO error on the unique name constraint.&lt;/p&gt;

&lt;p&gt;This can be &quot;solved&quot; by inserting a flush, but it is impossible to know whether a flush is required, without knowledge of what comes next. I.e. for one part to know it has to flush, it has to know another wants to fetch an object you just created.&lt;/p&gt;

&lt;p&gt;This causes an unacceptable amount of coupling.&lt;/p&gt;

&lt;p&gt;Somehow the repo will have to be able execute DQL against the objects in the UoW.  This does not have to be full support (straight away), but it should fail (throw an exception) if the possibility exists that the UoW contains items that are excluded (e.g. the operation is not supported and the UoW still contains items).&lt;/p&gt;

&lt;p&gt;For right now, this means the EntityManager should throw an exception if DQL is executed on the type when the UoW is not empty. Until the time that the EntityManager can query the UoW using DQL. The alternative would be to &quot;flush&quot; before every operation that goes to the database for data.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11358">DDC-586</key>
            <summary>Repo does not find &quot;unflushed&quot; object</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="jkleijn">John Kleijn</reporter>
                        <labels>
                    </labels>
                <created>Fri, 14 May 2010 05:04:34 +0000</created>
                <updated>Thu, 26 Aug 2010 08:01:27 +0000</updated>
                                    <version>2.0</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="12946" author="romanb" created="Fri, 14 May 2010 07:04:31 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;you mention a good point, however, this currently only affects findBy queries made through a repository. A DQL query already triggers a flush when there are pending insertions but this still has its own problems. First of, querying against the objects in the UoW is not a viable solution in my eyes.&lt;/p&gt;

&lt;p&gt;For a regular find() (by identifier) the situation is clear anyway, you &lt;b&gt;must&lt;/b&gt; flush prior to a lookup on an entity you previously persisted in the same request because, by definition, generated primary key values are only guaranteed to be available after the next flush.&lt;/p&gt;

&lt;p&gt;Automatic flushing if the UoW has pending inserts (new objects) and a query is executed (either through DQL or a repository) currently has its own set of problems, namely that it is still subject to infinite recursion if such a query is triggered in an event (listener) that executes during commit of a UoW, and secondly, that it will easily lead to double-flushes that cause unnecessary overhead (currently a flush() even if nothing needs to be done is not free because the UoW actually has to check whether nothing needs to be done). Both of these problems could be addressed with some sort of flags, but the question still is whether its not better to flush manually in the first place.&lt;br/&gt;
That would mean, in your example, you should flush after persisting the new objects, irrespectively of what code comes next, you persisted (a) new object(s) and you want to make sure these are fully available to the rest of the script.&lt;/p&gt;</comment>
                    <comment id="12947" author="romanb" created="Fri, 14 May 2010 07:13:00 +0000"  >&lt;p&gt;Furthermore, automatic flushing when there is no transaction active is probably also not a great idea, as it may split a single unit of work (that was supposed to be atomic) into 2 without the user knowing about it. So auto-flushing should better only happen when a transaction is active (i.e. explicit transaction demarcation is used).&lt;/p&gt;</comment>
                    <comment id="12948" author="jkleijn" created="Fri, 14 May 2010 07:27:40 +0000"  >&lt;p&gt;That would mean, in every example, you should flush after persisting new objects, period. If I flush in some cases and not in others, I&apos;m asking for issues that may not be caught by tests. It&apos;s an inconsistency that I personally am not comfortable with.&lt;/p&gt;

&lt;p&gt;Could be that I&apos;m overlooking something, I&apos;ve just started playing with D2.&lt;/p&gt;

&lt;p&gt;Why is querying against registered objects not viable? It&apos;s not easy, granted, but it doesn&apos;t seem impossible. There should probably be a layer between the UoW and the &quot;persisters&quot; (Data Mappers?).&lt;/p&gt;

&lt;p&gt;RE: the UoW double flush: state management on the UoW as a whole should prevent that. i.e. after a commit the whole UoW is clean? Just a suggestion, as I said, still getting my bearings.&lt;/p&gt;

&lt;p&gt;On a side note I just want to say that what I&apos;ve seen so far, for the better part, pleases me greatly. Kudos.&lt;/p&gt;</comment>
                    <comment id="12949" author="romanb" created="Fri, 14 May 2010 08:16:03 +0000"  >&lt;p&gt;@&quot;That would mean, in every example, you should flush after persisting new objects, period.&quot;&lt;/p&gt;

&lt;p&gt;Yes, if you want the objects to be visible to queries in the same request. Generally, you should flush when you complete a unit of work and that is usually not the whole request (but can be).&lt;/p&gt;

&lt;p&gt;I don&apos;t want to &quot;query&quot; against registered objects because it is a) not easy b) likely a lot of code and c) very likely error-prone. And in addition I don&apos;t see this helping with solving any inconsistency. If you want to use find() you have to flush anyway because you can not find() without having the identifier in the first place, which is only available after a flush.&lt;/p&gt;

&lt;p&gt;@RE: the UoW double flush:&lt;/p&gt;

&lt;p&gt;Yes, like I said, it can be done but it is a compromise. Having a &quot;clean/dirty&quot; flag &lt;b&gt;in addition&lt;/b&gt; to calculating the changesets of the work to do (which implicitly tells us whether the UoW is dirty) adds more code and more potential for errors. Forget to update the flag in one location and you get flushes that don&apos;t do anything, because the flag was not updated. A dirty-flag for the UoW is not really required for proper working. It is similar to the approach of maintaining a separate counter for the number of elements in a collection implementation: can make many size/count requests faster but complicates the internal implementation and increases the likelihood for errors (and lock contention for the counter in a thread-safe/concurrent implementation, an interesting case where performance goes against scalability, but I digress and that does not apply to php obviously). That said, I am not strongly opposed to doing this.&lt;/p&gt;

&lt;p&gt;If you&apos;re interested in how this is specified by &quot;big brother&quot;, take a look at section 3.8.7 of the JPA 2 specification. Shortly, with the default behavior it requires the implementation to ensure that unflushed changes are visible to queries which can be achieved by flushing these to the database automatically but &lt;b&gt;only&lt;/b&gt; if a transaction is active, otherwise the implementation must not flush to the database. There is alternatively also a &quot;MANUAL&quot; flush mode, in that case the effect of updates made to entities in the UoW upon queries is unspecified. We do not have different flush modes anymore, however, in Doctrine.&lt;/p&gt;

&lt;p&gt;So I see two possible ways to go here:&lt;/p&gt;

&lt;p&gt;1) More effort, more code, (really better?)&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Maintaining a dirty flag in the UoW (this could be done anyway at some point, even if 2) is chosen)&lt;/li&gt;
	&lt;li&gt;Maintaining a flag to avoid infinite recursion triggered from events within a UoW commit/flush&lt;/li&gt;
	&lt;li&gt;Flushing automatically when querying while there are pending inserts &lt;b&gt;and a transaction is active&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;2) No effort, less code&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Removing the current auto-flush on DQL queries which is still subject to infinite recursion&lt;/li&gt;
	&lt;li&gt;No automatic flushes, anywhere (less magic, so to speak?)&lt;/li&gt;
	&lt;li&gt;Clearly documenting that new, unflushed entities are not visible in subsequent queries issued in the same request, and if this is desired, a flush should be issued.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;That&apos;s how I see it. Now we need some votes and volunteers for the implementation &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; Personally, I am not sure yet about which version I prefer, 2) does not sound too bad for me.&lt;/p&gt;
</comment>
                    <comment id="12950" author="romanb" created="Fri, 14 May 2010 08:20:18 +0000"  >&lt;p&gt;In Nr. 1) the case with the infinite recursion may actually be more problematic. I think you simply &lt;b&gt;can not see&lt;/b&gt; unflushed new objects in queries made &lt;b&gt;during&lt;/b&gt; a UoW commit.&lt;/p&gt;</comment>
                    <comment id="12956" author="jkleijn" created="Fri, 14 May 2010 10:47:17 +0000"  >&lt;p&gt;When there&apos;s no in-memory objects inclusion, I&apos;d say 2) as well. Again, I have no idea how this is implemented currently, but I would prefer something like this:&lt;/p&gt;

&lt;p&gt;$repo-&amp;gt;start();&lt;/p&gt;

&lt;p&gt;$repo-&amp;gt;register($object);&lt;/p&gt;

&lt;p&gt;$repo-&amp;gt;commit();&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Commit instead of flush: &quot;flush&quot; has little semantic value IMO, &quot;commit&quot; leaves no questions: you&apos;re committing your changes (which implies that they are not, before)&lt;/li&gt;
	&lt;li&gt;Operating on the repo leaves no question to what you are committing: changes of the associated type and relations configured to cascade, made after start()&lt;/li&gt;
	&lt;li&gt;Register instead of persist: &quot;persist&quot; is misleading as the object is not immediately persisted, and as my example shows, may not be.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The way I see it &quot;start&quot; would create a UoW associated with the repo, &quot;commit&quot; would calculate changes and write (the enitity manager would make sure references in other UoWs are removed).&lt;/p&gt;

&lt;p&gt;Because the way it is currently implemented (or so it seems), it&apos;s unclear when to flush and when not to flush, and unclear what I&apos;m flushing at any one point in the code (because it is not locally isolated). If I have to decide whether to flush in some bit of client code, I am apparently making an assumption about the target entity, i.e. coupling.&lt;/p&gt;

&lt;p&gt;I know, you already went beta, so it&apos;s unlikely you would consider such a large change, but anyway, for your consideration.&lt;/p&gt;

&lt;p&gt;Finally, I realize I&apos;m borderline nagging now as you&apos;ve made it clear you see nothing it, but a Repository (as in the PoEAA pattern, p 322) may provide a method of fetching native in-memory objects using criteria, acting as a &quot;buffer&quot; between code and database. The Repository in D2 does effectively nothing but delegate to the UoW (or mostly to the underlying persister). Ref PoEAA 327 for an example of an in-memory strategy. As a final point of critique, the Repository does not always seem to be used as entry point for data requests, which is the whole point of the pattern. Most of what&apos;s in EntityManager, should be in EntityRepository (&quot;manager&quot; is a bit to abstract a concept to expect clear responsibilities anyway). EntityManager::find() delegates to EntityRepository, but pretty much everything else is the other way around. EntityManager would be better off named DataGateway, as that accurately describes its intended function.&lt;/p&gt;

&lt;p&gt;I admit, it would be very difficult to use DQL on in memory objects, but it would be far superior and if it work lead to much more predictable behaviour. It&apos;s the ONLY way the data store is ever going to be truly transparent. A few examples (DQL from the docs):&lt;/p&gt;

&lt;p&gt;SELECT &lt;br/&gt;
u, &lt;br/&gt;
UPPER(u.name) nameUpper &lt;br/&gt;
FROM MyProject\Model\User u&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Fetch everything from the db&lt;/li&gt;
	&lt;li&gt;Select all objects from the User UoW&lt;/li&gt;
	&lt;li&gt;Iterate over the in memory ones and &lt;b&gt;modify&lt;/b&gt; the name property to upper case&lt;/li&gt;
	&lt;li&gt;Merge the results and return&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;SELECT u FROM User u WHERE u.id = ?1 OR u.nickname LIKE ?2 ORDER BY u.surname DESC&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Execute against database&lt;/li&gt;
	&lt;li&gt;Iterate over the User UoW, indexing by &quot;surname&quot;, adding items that match the criteria&lt;/li&gt;
	&lt;li&gt;Merge the results and return&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;With joins it could get more complex, provided you want to intelligently merge results into existing objects. Question is whether that is really needed, but there&apos;s obviously a performance benefit. Actually this may already be implemented.&lt;/p&gt;

&lt;p&gt;I suspect there are edge cases, rooted in DQL still being based on SQL, but in theory it should be possible. Likely you would still want to do start(), and delegate to the driver to start an actual transaction to prevent inconsistent reads... The only way to find out if it&apos;s truly feasible is to to try it, I think.&lt;/p&gt;

&lt;p&gt;Ramble, ramble, ramble, I&apos;m done. &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; I know I seem critical, but it&apos;s positive critique, I love the direction you went with D2.&lt;/p&gt;</comment>
                    <comment id="12957" author="romanb" created="Fri, 14 May 2010 11:26:45 +0000"  >&lt;p&gt;Maybe I was not clear, with approach Nr.1 there would be in-memory objects inclusion (of new objects), in fact, there always is, due to the identity map. When you query for objects and some of them are already in memory, these are used, not again reconstructed.&lt;/p&gt;

&lt;p&gt;The EntityRepository provided by Doctrine is just a convenient mechanism for writing your own repositories. There are many different understandings for what a repository is, you can make it whatever you want it to be. Is a PoEAA repository the same as a DDD repository? Anyway, the repository could be stripped of the project, it is optional, the state management is handled by the EntityManager and UnitOfWork. These are the core components. I agree that the delegation from EntityManager#find to the repository is suboptimal in this regard and should be the other way around.&lt;/p&gt;

&lt;p&gt;Now to your question: &quot;When should I flush?&quot;. Generally, you should flush at the end of a transaction, which in turn is a unit of work. That means, use explicit transaction demarcation. begin() ... flush() commit(). I&apos;ve added some control abstractions recently that should make this even easier. I can only recommend to explicitly demarcate your transaction boundaries. As you probably know, you can not talk to your database outside of a transaction anyway. The default behavior (flush() wrapping all its stuff in a transaction) is for convenience mostly and so as not to alienate or confuse people even more who are used to autocommit mode.&lt;/p&gt;

&lt;p&gt;Concerning the naming, we mostly stick with the JPA specification and I, for one, really like the naming and I don&apos;t want to invent new names. PoEAA is far more abstract (and the examples far too specific) than what is specified in JPA, so I recommend giving that a read. The patterns in PoEAA obviously and intentionally leave a lot of room for different variants of implementation and also leave open a lot of open questions (many of the difficult questions especially, it is for a reason that the author recommends using an existing tool instead of writing your own). In my opinion it is just not feasible to query in-memory objects in a generic way, all the examples in PoEAA do not have generic but rather concrete code examples, which is obviously a lot easier. The feasible strategy, and that is what we do, is to do in-memory lookups only when querying by PK, otherwise the query is executed and afterwards nevertheless any objects reused that are already in memory (based on the PK) and not reconstructed. This is the approach we use.&lt;/p&gt;

&lt;p&gt;Thanks for your input, I do see that you are an experienced fellow in object-relational persistence, maybe we can see you as a committer some day? &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="12958" author="romanb" created="Fri, 14 May 2010 11:35:43 +0000"  >&lt;p&gt;@ &quot;SELECT u, UPPER(u.name) nameUpper FROM MyProject\Model\User u&quot;&lt;/p&gt;

&lt;p&gt;This selects all users and their names in uppercase, the uppercase names are scalar values, the users are not modified! Scalar values are separate from objects.&lt;/p&gt;

&lt;p&gt;@ &quot;... and unclear what I&apos;m flushing at any one point in the code&quot;&lt;/p&gt;

&lt;p&gt;flush() means: Synchronize the in-memory state of my objects with the database, making any changes that are only in-memory persistent. Nothing more, nothing less.&lt;/p&gt;

&lt;p&gt;Again, objects are always reused based on the identity map and the state that is in-memory prevails, unless you use refresh() or execute a query with the Query::HINT_REFRESH query hint. All objects you fetch from DQL, be it as a root object or as a joined association, are first looked up in-memory (but after the SQL query has been issued!).&lt;/p&gt;

&lt;p&gt;Maybe we have been talking past each other here, what I refer to as not feasible is querying the in-memory objects first in some way, even before the SQL query. This is just too complicated and error-prone, except for the simple case of a PK lookup and that is where we do it already.&lt;/p&gt;</comment>
                    <comment id="12959" author="jkleijn" created="Fri, 14 May 2010 12:11:07 +0000"  >&lt;p&gt;&amp;gt; Scalar values are separate from objects.&lt;/p&gt;

&lt;p&gt;Right. Bad example.&lt;/p&gt;

&lt;p&gt;&amp;gt; flush() means: Synchronize the in-memory state of my objects with the database, making any changes that are only in-memory persistent. Nothing more, nothing less.&lt;/p&gt;

&lt;p&gt;I realize that it means that, but commit() would be more obvious.&lt;/p&gt;

&lt;p&gt;&amp;gt; Maybe we have been talking past each other here, what I refer to as not feasible is querying the in-memory objects first in some way, even before the SQL query. This is just too complicated and error-prone, except for the simple case of a PK lookup and that is where we do it already.&lt;/p&gt;

&lt;p&gt;Fair enough, you don&apos;t think it&apos;s feasible, so we&apos;ll keep it at that. Maybe I&apos;ll give it a shot some time.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

<item>
            <title>[DDC-536] Remove the _ prefix from private and protected members</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-536</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The reasoning is simple: The prefix &quot;_&quot; is usually either used for easier distinction of instance variables from other, i.e. local variables, instead of always using &quot;this.&quot; (often seen in C#), or it is used to signal that a member is not meant to be accessed from outside of the class when the language does not have visibility modifiers (PHP4).&lt;/p&gt;

&lt;p&gt;Since you always have to use &quot;$this-&amp;gt;&quot; in PHP5+ when accessing instance members and there are visibility modifiers, the &quot;_&quot; is largely superfluous and just makes the verbose OO code even more verbose.&lt;/p&gt;

&lt;p&gt;Maybe the following find/replace steps will do the job almost completely:&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-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $_&quot;&lt;/span&gt; =&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $_&quot;&lt;/span&gt; =&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $&quot;&lt;/span&gt;
&lt;span class=&quot;code-quote&quot;&gt;&quot;$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_&quot;&lt;/span&gt; =&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&quot;$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;&quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="11261">DDC-536</key>
            <summary>Remove the _ prefix from private and protected members</summary>
                <type id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/task.png">Task</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="romanb">Roman S. Borschel</reporter>
                        <labels>
                    </labels>
                <created>Fri, 23 Apr 2010 09:26:24 +0000</created>
                <updated>Fri, 19 Nov 2010 00:00:39 +0000</updated>
                                                    <fixVersion>2.0</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="12761" author="beberlei" created="Tue, 27 Apr 2010 05:50:39 +0000"  >&lt;p&gt;i just found a possible BC issue with this.&lt;/p&gt;

&lt;p&gt;EntityRepository is allowed to be extended by us, it has several variables that are underscore prefixed. How to proceed in this case?&lt;/p&gt;</comment>
                    <comment id="12762" author="romanb" created="Tue, 27 Apr 2010 05:56:06 +0000"  >&lt;p&gt;I know but its not really a problem I think. We should just decide whether we make them private in the first place and provide getters instead (which would have avoided this problem in the first place).&lt;/p&gt;</comment>
                    <comment id="12763" author="romanb" created="Tue, 27 Apr 2010 05:56:59 +0000"  >&lt;p&gt;Leaving the prefixes on the repository class only is also an option... but I dont think thats necessary.&lt;/p&gt;</comment>
                    <comment id="12764" author="beberlei" created="Tue, 27 Apr 2010 06:28:59 +0000"  >&lt;p&gt;can we commit getters for Beta 1 then? We could give everyone a period until Beta 2 to fix their code and then make the change.&lt;/p&gt;

&lt;p&gt;EntityRepository is the only class that is meant to be userland extendable to my knowledge, so this should be the only problem to adress&lt;/p&gt;</comment>
                    <comment id="12766" author="romanb" created="Tue, 27 Apr 2010 09:25:21 +0000"  >&lt;p&gt;Yes, you can add getters and commit right away if you want. Plus adding a note on the upgrade document that direct access of these properties is deprecated.&lt;/p&gt;</comment>
                    <comment id="12767" author="romanb" created="Tue, 27 Apr 2010 09:26:22 +0000"  >&lt;p&gt;Persisters will be also extensible some day in userland but they need more polish for that, I&apos;ve already started with it &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="14785" author="johnnypeck" created="Fri, 19 Nov 2010 00:00:39 +0000"  >&lt;p&gt;Is this still planned? Searching the code base finds this is not being implemented. It would be a good idea to implement the change sooner than later if it will be done at all.  Also, +1 for the change. It makes complete sense.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-678] OneToMany/OneToOne + onDelete=CASCADE may corrupt UoW.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-678</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;OneToMany/OneToOne associations together with an onDelete=CASCADE schema generation hint on the @JoinColumn and appropriate foreign key constraints can potentially result in a corrupt UoW if the associated objects are already managed. We need to add tests for such scenarios and settle on a well-defined behavior in such cases.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11606">DDC-678</key>
            <summary>OneToMany/OneToOne + onDelete=CASCADE may corrupt UoW.</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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>Sat, 10 Jul 2010 07:07:01 +0000</created>
                <updated>Sun, 5 Jun 2011 15:15:44 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14646" author="beberlei" created="Sun, 31 Oct 2010 07:18:22 +0000"  >&lt;p&gt;I think to preserve the semantics the following has to happen:&lt;/p&gt;

&lt;p&gt;&quot;on-delete&quot; =&amp;gt; &quot;cascade&quot; has to implicitly set cascade = remove. This hurts performance of course vs just using the on-delete, however it won&apos;t corrupt the UoW.&lt;/p&gt;</comment>
                    <comment id="15093" author="beberlei" created="Sun, 2 Jan 2011 05:21:14 +0000"  >&lt;p&gt;Not entirely would it hurt performance, you could check if on-delete =&amp;gt; cascade is set. If this is the case you wouldnt need to do an explicit remove using the UnitOfWorks cascade.&lt;/p&gt;</comment>
                    <comment id="15944" author="beberlei" created="Sun, 5 Jun 2011 15:15:44 +0000"  >&lt;p&gt;Changed to improvement&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-624] Partial object query that leaves out an association to avoid loading it fetches the association anyway.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-624</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Assuming:&lt;/p&gt;

&lt;p&gt;Customer &amp;lt;onetoone&amp;gt; Cart&lt;/p&gt;

&lt;p&gt;where Cart is the owning side.&lt;/p&gt;

&lt;p&gt;Since the association from Customer to Cart can not be lazy, it would make sense to leave out the association in a query to avoid loading the carts like this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;select partial c.{id,name, ... anything except cart} from Customer c&quot;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But this is ignored and the carts of all customers are fetched anyway. Query::HINT_FORCE_PARTIAL_LOAD is an alternative solution, however it has the disadvantage that it disables lazy-loading for &lt;b&gt;all&lt;/b&gt; queried objects. If partial querying would honor associations this would allow more fine-grained control.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11442">DDC-624</key>
            <summary>Partial object query that leaves out an association to avoid loading it fetches the association anyway.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="romanb">Roman S. Borschel</reporter>
                        <labels>
                    </labels>
                <created>Thu, 3 Jun 2010 12:13:06 +0000</created>
                <updated>Fri, 11 Nov 2011 09:28:13 +0000</updated>
                                    <version>2.0-BETA1</version>
                                <fixVersion>2.x</fixVersion>
                                        <due></due>
                    <votes>2</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="14085" author="romanb" created="Thu, 26 Aug 2010 08:06:33 +0000"  >&lt;p&gt;Might need to be pushed back to a 2.0.x / 2.x.x bugfix release. Not clear yet.&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="13141">DDC-1465</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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


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



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


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



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



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



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



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



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



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


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




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




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

&lt;ol&gt;
	&lt;li&gt;
	&lt;ol&gt;
		&lt;li&gt;
		&lt;ol&gt;
			&lt;li&gt;OPERATIONS&lt;/li&gt;
		&lt;/ol&gt;
		&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
&lt;/ol&gt;



&lt;ol&gt;
	&lt;li&gt;
	&lt;ol&gt;
		&lt;li&gt;
		&lt;ol&gt;
			&lt;li&gt;
			&lt;ol&gt;
				&lt;li&gt;INSERT :&lt;/li&gt;
			&lt;/ol&gt;
			&lt;/li&gt;
		&lt;/ol&gt;
		&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;    *********************************************************************************************&lt;br/&gt;
    UnitOfWork#commit&lt;br/&gt;
        Connection#beginTransaction&lt;br/&gt;
        Persister#executeInserts&lt;br/&gt;
        Connection#commit&lt;br/&gt;
        Persister#afterTransactionComplete&lt;br/&gt;
            -&amp;gt; EntityRegionAccessStrategy#afterInsert&lt;br/&gt;
    *********************************************************************************************&lt;br/&gt;
    METHOD      | READ-ONLY             | NONSTRICT-READ-WRITE      | READ-WRITE                |&lt;br/&gt;
    ---------------------------------------------------------------------------------------------&lt;br/&gt;
    afterInsert | add item to the cache | add item to the cache     | add item to the cache     |&lt;br/&gt;
    ---------------------------------------------------------------------------------------------&lt;/p&gt;


&lt;ol&gt;
	&lt;li&gt;
	&lt;ol&gt;
		&lt;li&gt;
		&lt;ol&gt;
			&lt;li&gt;
			&lt;ol&gt;
				&lt;li&gt;UPDATE :&lt;/li&gt;
			&lt;/ol&gt;
			&lt;/li&gt;
		&lt;/ol&gt;
		&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;    *********************************************************************************************&lt;br/&gt;
    UnitOfWork#commit&lt;br/&gt;
        Connection#beginTransaction&lt;br/&gt;
        Persister#update&lt;br/&gt;
            -&amp;gt; TransactionalRegionAccess#lockItem&lt;br/&gt;
            -&amp;gt; execute&lt;br/&gt;
        Connection#commit&lt;br/&gt;
        Persister#afterTransactionComplete&lt;br/&gt;
            -&amp;gt; RegionAccess#afterUpdate&lt;br/&gt;
            -&amp;gt; TransactionalRegionAccess#unlockItem&lt;br/&gt;
    *********************************************************************************************&lt;br/&gt;
    METHOD      | READ-ONLY             | NONSTRICT-READ-WRITE      | READ-WRITE                |&lt;br/&gt;
    ---------------------------------------------------------------------------------------------&lt;br/&gt;
    lockItem    |                       |                           | lock item                 |&lt;br/&gt;
    ---------------------------------------------------------------------------------------------&lt;br/&gt;
    afterUpdate | throws exception      | update item cache         | update item cache         |&lt;br/&gt;
    ---------------------------------------------------------------------------------------------&lt;br/&gt;
    unlockItem  |                       |                           | unlock item               |&lt;br/&gt;
    ---------------------------------------------------------------------------------------------&lt;/p&gt;


&lt;ol&gt;
	&lt;li&gt;
	&lt;ol&gt;
		&lt;li&gt;
		&lt;ol&gt;
			&lt;li&gt;
			&lt;ol&gt;
				&lt;li&gt;DELETE :&lt;/li&gt;
			&lt;/ol&gt;
			&lt;/li&gt;
		&lt;/ol&gt;
		&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;    *********************************************************************************************&lt;br/&gt;
    UnitOfWork#commit&lt;br/&gt;
        Connection#beginTransaction&lt;br/&gt;
        Persister#delete&lt;br/&gt;
            -&amp;gt; TransactionalRegionAccess#lockItem&lt;br/&gt;
            -&amp;gt; execute&lt;br/&gt;
        Connection#commit&lt;br/&gt;
        Persister#afterTransactionComplete&lt;br/&gt;
            -&amp;gt; RegionAccess#evict&lt;br/&gt;
    *********************************************************************************************&lt;br/&gt;
    METHOD      | READ-ONLY             | NONSTRICT-READ-WRITE      | READ-WRITE                |&lt;br/&gt;
    ---------------------------------------------------------------------------------------------&lt;br/&gt;
    lockItem    |                       |                           | lock item                 |&lt;br/&gt;
    ---------------------------------------------------------------------------------------------&lt;br/&gt;
    evict       | remove item cache     | remove item cache         | remove item cache         |&lt;br/&gt;
    ---------------------------------------------------------------------------------------------&lt;/p&gt;


&lt;ol&gt;
	&lt;li&gt;
	&lt;ol&gt;
		&lt;li&gt;
		&lt;ol&gt;
			&lt;li&gt;
			&lt;ol&gt;
				&lt;li&gt;USAGE :&lt;/li&gt;
			&lt;/ol&gt;
			&lt;/li&gt;
		&lt;/ol&gt;
		&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
&lt;/ol&gt;


&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
```php
&amp;lt;?php

/**
 * @Entity
 * @Cache(&lt;span class=&quot;code-quote&quot;&gt;&quot;NONSTRICT_READ_WRITE&quot;&lt;/span&gt;)
 */
class State
{
    /**
     * @Id
     * @GeneratedValue
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;
    /**
     * @Column
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name;
    /**
     * @Cache()
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Country&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;country_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $country;
    /**
     * @Cache()
     * @OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;City&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;state&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $cities;
}
```

```php
&amp;lt;?php

$em-&amp;gt;persist(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; State($name, $country));
$em-&amp;gt;flush();                                &lt;span class=&quot;code-comment&quot;&gt;// Put into cache
&lt;/span&gt;
$em-&amp;gt;clear();                                &lt;span class=&quot;code-comment&quot;&gt;// Clear entity manager
&lt;/span&gt;
$state   = $em-&amp;gt;find(&apos;Entity\State&apos;, 1);     &lt;span class=&quot;code-comment&quot;&gt;// Retreive item from cache
&lt;/span&gt;$country = $state-&amp;gt;getCountry();             &lt;span class=&quot;code-comment&quot;&gt;// Retreive item from cache
&lt;/span&gt;$cities  = $state-&amp;gt;getCities();              &lt;span class=&quot;code-comment&quot;&gt;// Load from database and put into cache
&lt;/span&gt;
$state-&amp;gt;setName(&lt;span class=&quot;code-quote&quot;&gt;&quot;New Name&quot;&lt;/span&gt;);
$em-&amp;gt;persist($state);
$em-&amp;gt;flush();                                &lt;span class=&quot;code-comment&quot;&gt;// Update item cache
&lt;/span&gt;
$em-&amp;gt;clear();                                &lt;span class=&quot;code-comment&quot;&gt;// Clear entity manager
&lt;/span&gt;
$em-&amp;gt;find(&apos;Entity\State&apos;, 1)-&amp;gt;getCities();   &lt;span class=&quot;code-comment&quot;&gt;// Retreive from cache
&lt;/span&gt;

$em-&amp;gt;getCache()-&amp;gt;containsEntity(&apos;Entity\State&apos;, $state-&amp;gt;getId())  &lt;span class=&quot;code-comment&quot;&gt;// Check &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; the cache exists
&lt;/span&gt;$em-&amp;gt;getCache()-&amp;gt;evictEntity(&apos;Entity\State&apos;, $state-&amp;gt;getId());    &lt;span class=&quot;code-comment&quot;&gt;// Remove an entity from cache
&lt;/span&gt;$em-&amp;gt;getCache()-&amp;gt;evictEntityRegion(&apos;Entity\State&apos;);               &lt;span class=&quot;code-comment&quot;&gt;// Remove all entities from cache
&lt;/span&gt;
$em-&amp;gt;getCache()-&amp;gt;containsCollection(&apos;Entity\State&apos;, &apos;cities&apos;, $state-&amp;gt;getId());   &lt;span class=&quot;code-comment&quot;&gt;// Check &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; the cache exists        
&lt;/span&gt;$em-&amp;gt;getCache()-&amp;gt;evictCollection(&apos;Entity\State&apos;, &apos;cities&apos;, $state-&amp;gt;getId());      &lt;span class=&quot;code-comment&quot;&gt;// Remove an entity collection from cache
&lt;/span&gt;$em-&amp;gt;getCache()-&amp;gt;evictCollectionRegion(&apos;Entity\State&apos;, &apos;cities&apos;);                 &lt;span class=&quot;code-comment&quot;&gt;// Remove all collections from cache
&lt;/span&gt;
```
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;ol&gt;
	&lt;li&gt;
	&lt;ol&gt;
		&lt;li&gt;
		&lt;ol&gt;
			&lt;li&gt;
			&lt;ol&gt;
				&lt;li&gt;TODO :&lt;/li&gt;
			&lt;/ol&gt;
			&lt;/li&gt;
		&lt;/ol&gt;
		&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
	&lt;li&gt;handle many to many collection&lt;/li&gt;
	&lt;li&gt;handle inheritance&lt;/li&gt;
	&lt;li&gt;remove/add colection items on update&lt;/li&gt;
	&lt;li&gt;improve region tests&lt;/li&gt;
	&lt;li&gt;improve access strategy tests&lt;/li&gt;
	&lt;li&gt;implement xml / yml / php drivers&lt;/li&gt;
	&lt;li&gt;implement transaction region&lt;/li&gt;
	&lt;li&gt;implement transaction  access strategy&lt;/li&gt;
	&lt;li&gt;.... ????&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
            <key id="14481">DDC-2295</key>
            <summary>[GH-580] Second cache level POC</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 14 Feb 2013 01:01:12 +0000</created>
                <updated>Thu, 14 Mar 2013 21:36:42 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

&lt;p&gt;I have following code:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$related = 
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getDoctrine()-&amp;gt;getRepository(&apos;MyWebBundle:LineRelated&apos;)
-&amp;gt;findBy(array(&apos;line&apos; =&amp;gt; $lines), array(&apos;count&apos; =&amp;gt; &apos;DESC&apos;), 20);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;that generate the sql like this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-sql&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; *
&lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; line_related t0 
&lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; t0.line_id IN (&apos;6059&apos;, 126352, &apos;5677&apos;, &apos;6058&apos;) 
ORDER &lt;span class=&quot;code-keyword&quot;&gt;BY&lt;/span&gt; t0.count DESC 
LIMIT 20
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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


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

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

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

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

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

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

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

&lt;p&gt;Repository#findBy does not quote the values,  It uses PDO:bindParam.&lt;br/&gt;
so the expected query string should be someting like : &lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
WHERE t0.line_id IN (?, ? ,?) 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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


&lt;p&gt;Cheers&lt;/p&gt;</comment>
                    <comment id="19185" author="scourgen" created="Fri, 28 Dec 2012 06:02:41 +0000"  >&lt;p&gt;reproduced :&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
SELECT t0.id AS id1, t0.line_id_related AS line_id_related2, t0.count AS count3, t0.line_id AS line_id4 FROM line_related t0 WHERE t0.line_id IN (&apos;6059&apos;, 4851, &apos;6068&apos;, 126352, &apos;6060&apos;, &apos;1000000&apos;) ORDER BY t0.count DESC LIMIT 20
Parameters: [[&apos;6059&apos;, 4851, &apos;6068&apos;, 126352, &apos;6060&apos;, &apos;1000000&apos;]] 
[Hide runnable query]
Time: 234.53 ms [   Explain query ]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-2424] Removing an inherited entity via a delete cascade constraint does not remove the parent row</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2424</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;For a parent class:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * @ORM\Entity
 * @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;Base&quot;&lt;/span&gt;)
 * @ORM\InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;JOINED&quot;&lt;/span&gt;)
 * @ORM\DiscriminatorColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;discr&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
 * @ORM\DiscriminatorMap({&lt;span class=&quot;code-quote&quot;&gt;&quot;child1&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;Child1&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;child2&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;Child2&quot;&lt;/span&gt;})
 */
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

&lt;p&gt;Enough for the context.&lt;br/&gt;
The symptoms:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$em-&amp;gt;remove(instanceOfExternalEntity);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt; removes the ExternalEntity row and the Child1 row. But a dangling row in the Base table is still there for the now inexistent Child1 instance.&lt;/p&gt;

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

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

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

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

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

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

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

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

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

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

&lt;p&gt;The first error message is shown in every Doctrine file when I declare the file format as such (for example: &lt;a href=&quot;https://github.com/thewholelifetolearn/Social-Library/blob/master/src/SocialLibrary/ReadBundle/Resources/config/doctrine/GraphicNovel.orm.xml&quot; class=&quot;external-link&quot;&gt;https://github.com/thewholelifetolearn/Social-Library/blob/master/src/SocialLibrary/ReadBundle/Resources/config/doctrine/GraphicNovel.orm.xml&lt;/a&gt; )&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&amp;lt;?xml version=&lt;span class=&quot;code-quote&quot;&gt;&quot;1.0&quot;&lt;/span&gt; encoding=&lt;span class=&quot;code-quote&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;?&amp;gt;
&amp;lt;doctrine-mapping xmlns=&lt;span class=&quot;code-quote&quot;&gt;&quot;http:&lt;span class=&quot;code-comment&quot;&gt;//doctrine-project.org/schemas/orm/doctrine-mapping&quot;&lt;/span&gt;
&lt;/span&gt;                  xmlns:xsi=&lt;span class=&quot;code-quote&quot;&gt;&quot;http:&lt;span class=&quot;code-comment&quot;&gt;//www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;
&lt;/span&gt;                  xsi:schemaLocation=&quot;http:&lt;span class=&quot;code-comment&quot;&gt;//doctrine-project.org/schemas/orm/doctrine-mapping
&lt;/span&gt;                  http:&lt;span class=&quot;code-comment&quot;&gt;//doctrine-project.org/schemas/orm/doctrine-mapping.xsd&quot;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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



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

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

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


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

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

&lt;p&gt;Ideally we should have a possibility to join other entities, the Category entity in our case here:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    $criteria = Criteria::create()
        -&amp;gt;where(Criteria::expr()-&amp;gt;eq(&apos;storeId&apos;, $store-&amp;gt;getId()))
        -&amp;gt;andWhere(Criteria::expr()-&amp;gt;eq(&apos;Category&apos;, 20))
        -&amp;gt;innerJoin(Criteria::expr()-&amp;gt;field(&apos;Category&apos;, &apos;Category&apos;))
        -&amp;gt;andWhere(Criteria::expr()-&amp;gt;eq(&apos;Category.name&apos;, &apos;Electronics&apos;))
        -&amp;gt;orderBy(array(&apos;popularity&apos; =&amp;gt; &apos;DESC&apos;));
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;BrandCategories-&amp;gt;matching($criteria);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

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

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

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

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

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

</description>
                <environment></environment>
            <key id="14943">DDC-2445</key>
            <summary>[GH-665] oo 	Add Null in ScalarExpression </summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Sun, 12 May 2013 10:40:41 +0000</created>
                <updated>Sun, 12 May 2013 10:40:41 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

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

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

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

</description>
                <environment></environment>
            <key id="14964">DDC-2456</key>
            <summary>[GH-669] Fixed generating column names for self referencing entity.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Fri, 17 May 2013 10:11:02 +0000</created>
                <updated>Fri, 17 May 2013 10:11:02 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-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-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-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-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-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-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-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-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-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-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>
</channel>
</rss>