<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Wed May 22 15:57:05 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+DDC+AND+fixVersion+%3D+%222.2%22&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+fixVersion+%3D+%222.2%22</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="138" total="138"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DDC-2148] Many-to-many not working with interface</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2148</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;First off, here&apos;s a pastie with all the code and mappings involved, and a stacktrace: &lt;a href=&quot;http://pastie.org/5372087&quot; class=&quot;external-link&quot;&gt;http://pastie.org/5372087&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Not sure if this a bug or not, but I think that according to the docs this should work - in a vendor bundle I have an entity defining a unidirectional many-to-many relation to an interface: the entity is Group and defines a many-to-many relation to a UserInterface, which is resolved correctly in the app configuration (as the many-to-one relations using it in the other entities of this vendor bundle work fine).&lt;/p&gt;

&lt;p&gt;I&apos;m going by these docs:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://symfony.com/doc/master/cookbook/doctrine/resolve_target_entity.html&quot; class=&quot;external-link&quot;&gt;http://symfony.com/doc/master/cookbook/doctrine/resolve_target_entity.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, when adding a user to a group, I&apos;m getting a weird error:&lt;/p&gt;

&lt;p&gt;An exception occurred while executing &apos;INSERT INTO acme_group_user (group_id, user_id) VALUES (?, ?)&apos; with params &lt;/p&gt;
{&quot;1&quot;:2,&quot;2&quot;:1,&quot;3&quot;:2,&quot;4&quot;:1}
&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;

&lt;p&gt;For some reason it&apos;s adding 4 parameters to the statement instead of 2.&lt;/p&gt;

&lt;p&gt;Oddly enough, the query generation works perfectly fine when I replace the interface in the mapping with the actual final entity. But that wasn&apos;t the point of the exercise... &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; I need to use the interface there.&lt;/p&gt;

&lt;p&gt;Also, in other entities in that GroupBundle which are referencing the UserInterface using a different relation type, i.e. many-to-one, the relations work perfectly fine.&lt;/p&gt;

&lt;p&gt;The schema validates as well, using doctrine:schema:validate in the console.&lt;/p&gt;</description>
                <environment>Linux, PHP 5.3.10, Symfony 2.2</environment>
            <key id="14231">DDC-2148</key>
            <summary>Many-to-many not working with interface</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="userfriendly">Moritz Kraft</reporter>
                        <labels>
                        <label>dql</label>
                    </labels>
                <created>Fri, 16 Nov 2012 09:55:13 +0000</created>
                <updated>Thu, 22 Nov 2012 14:28:35 +0000</updated>
                    <resolved>Thu, 22 Nov 2012 14:28:35 +0000</resolved>
                            <version>2.3</version>
                                <fixVersion>2.2</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="18994" author="ocramius" created="Fri, 16 Nov 2012 09:59:07 +0000"  >&lt;p&gt;&quot;many-to-many TO a mapped superclass&quot;? I don&apos;t think relations TO mapped superclasses are supported in any way... A mapped superclass should never appear in a `targetEntity` mapping.&lt;/p&gt;

&lt;p&gt;Could you please re-formulate the description of the issue? There is no mapped superclass in your examples &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="18995" author="userfriendly" created="Fri, 16 Nov 2012 11:30:37 +0000"  >&lt;p&gt;You are of course right. Edited the issue description/title.&lt;/p&gt;

&lt;p&gt;It is a blocker for us, btw., not minor - being able to use a many-to-many relation there is rather central to the code of our app. I&apos;m not seeing a workaround, easy or otherwise.&lt;/p&gt;</comment>
                    <comment id="18999" author="ocramius" created="Fri, 16 Nov 2012 13:23:32 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=userfriendly&quot; class=&quot;user-hover&quot; rel=&quot;userfriendly&quot;&gt;Moritz Kraft&lt;/a&gt; yes, but it is not a blocker for the next release &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; Will restore prio.&lt;/p&gt;</comment>
                    <comment id="19002" author="userfriendly" created="Fri, 16 Nov 2012 13:38:51 +0000"  >&lt;p&gt;Ah right, yeah, that makes sense. &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; Thank you!&lt;/p&gt;</comment>
                    <comment id="19023" author="userfriendly" created="Thu, 22 Nov 2012 14:27:39 +0000"  >&lt;p&gt;Fixed in 1b5f051 - thanks Benjamin!&lt;/p&gt;</comment>
                    <comment id="19024" author="userfriendly" created="Thu, 22 Nov 2012 14:28:35 +0000"  >&lt;p&gt;Fixed in 2.3 branch, backported to 2.2 as well&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1653] command line cache clear commands clear everything from caches including non Doctrine related caches</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1653</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When I run doctrine orm:clear-cache:metadata I noticed that it clears everything within the cache, even items which have nothing to do with Doctrine at all.&lt;/p&gt;

&lt;p&gt;In looking into the various driver implementations it seems that the AbstractCache-&amp;gt;deleteAll() depends on getIds of each cache driver, yet the getIds of XcacheCache and MemcacheCache drivers seem to just get every single item within the cache.&lt;/p&gt;

&lt;p&gt;This has several implications:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;clearing metadata cache actually clears query cache and any other Doctrine cache using the same cache driver&lt;/li&gt;
	&lt;li&gt;clearing Doctrine cache of one project actually clears caches of every project using the same cache container&lt;/li&gt;
	&lt;li&gt;clearing Doctrine cache clears every object cached within that container, leading to increased risk of cache stampeding&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;In looking at the stored cache data it seems possible to fix #2 by using the Namespace of that project when executing a cache clear.  it also seems possible to use the cache driver&apos;s deleteByRegex() to solve #1 by deleting only items listed as metadata cache vs query cache.  Fixing #1 and #2 automatically fixes concern #3&lt;/p&gt;

&lt;p&gt;Or, as an alternative, I could suggest that deleteAll() in MetaDataCommand should be replaced by:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-none&quot;&gt;$cacheIds = $cacheDriver-&amp;gt;deleteBySuffix(&apos;METADATA&apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13453">DDC-1653</key>
            <summary>command line cache clear commands clear everything from caches including non Doctrine related caches</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="redemption">Howard Ha</reporter>
                        <labels>
                    </labels>
                <created>Wed, 15 Feb 2012 20:11:36 +0000</created>
                <updated>Sat, 3 Mar 2012 17:07:55 +0000</updated>
                    <resolved>Sat, 3 Mar 2012 17:07:55 +0000</resolved>
                            <version>2.1.5</version>
                                <fixVersion>2.2</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17492" author="redemption" created="Fri, 2 Mar 2012 22:50:17 +0000"  >&lt;p&gt;I think this issue might be resolved in 2.2 since the cache layer seems to have been rewritten.&lt;/p&gt;</comment>
                    <comment id="17494" author="guilhermeblanco" created="Sat, 3 Mar 2012 17:07:55 +0000"  >&lt;p&gt;To address this issue we require the rewrite that was done in 2.2.&lt;br/&gt;
Closing as fixed.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1641] [Tests] Wrong tearDown() in UnitOfWorkTest</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1641</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;root@ubuntu-server-1110:/home/zerkms/src/doctrine2# phpunit&lt;br/&gt;
PHPUnit 3.6.10 by Sebastian Bergmann.&lt;/p&gt;

&lt;p&gt;Configuration read from /home/zerkms/src/doctrine2/phpunit.xml.dist&lt;/p&gt;

&lt;p&gt;.SSSSSS.........................EEEEEEEEEEEEEEEEEEEEEEEEEEEEE   61 / 1472 (  4%)&lt;br/&gt;
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.EEESE...SSSEEEEEEEEEEEEEE  122 / 1472 (  8%)&lt;br/&gt;
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE  183 / 1472 ( 12%)&lt;br/&gt;
.EEEEEEESSESESEESESEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFEEEEE  244 / 1472 ( 16%)&lt;br/&gt;
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEESE  305 / 1472 ( 20%)&lt;br/&gt;
SSSEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFEEEEEEEEEEEEEEEEEE  366 / 1472 ( 24%)&lt;br/&gt;
EEEEEEEEEEESSSEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEESSSSSSSSS  427 / 1472 ( 29%)&lt;br/&gt;
SSSS...........SEEEEEEEEEEEEEEEEEEEEEEEEEESEEESEEEEEEEEEEEEEE  488 / 1472 ( 33%)&lt;br/&gt;
EEEEEEEEEEEEEEEEEEEEEEEEESEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE  549 / 1472 ( 37%)&lt;br/&gt;
EEEEEEEEEEEEEEEEEEEEEE.EEEEEEEEEEEEE.EEEEEEEEEEESSEEEEEEEEEEE  610 / 1472 ( 41%)&lt;br/&gt;
EEEEEEEEEEEEEEEEEEEEEEEEEE...................................  671 / 1472 ( 45%)&lt;br/&gt;
.............................................................  732 / 1472 ( 49%)&lt;br/&gt;
.............................................................  793 / 1472 ( 53%)&lt;br/&gt;
.............................................S...............  854 / 1472 ( 58%)&lt;br/&gt;
......S......................................................  915 / 1472 ( 62%)&lt;br/&gt;
.............................................................  976 / 1472 ( 66%)&lt;br/&gt;
............................................................. 1037 / 1472 ( 70%)&lt;br/&gt;
............................................................. 1098 / 1472 ( 74%)&lt;br/&gt;
............................................................. 1159 / 1472 ( 78%)&lt;br/&gt;
............................................................. 1220 / 1472 ( 82%)&lt;br/&gt;
............................................................. 1281 / 1472 ( 87%)&lt;br/&gt;
............................................................. 1342 / 1472 ( 91%)&lt;br/&gt;
...........................S............S.................... 1403 / 1472 ( 95%)&lt;br/&gt;
.................................SSSSSSSS.PHP Fatal error:  Class &apos;Doctrine\Tests\Mocks\EntityPersisterMock&apos; not found in /home/zerkms/src/doctrine2/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php on line 55&lt;/p&gt;

&lt;p&gt;This (the fatal error) happens because of in ORM/Tools/SetupTest there is a condition in setUp() that marks test as skipped, but tearDown() is being invoked anyway (that is how phpunit works).&lt;/p&gt;

&lt;p&gt;So tearDown() should run only in case if setUp() hasn&apos;t skipped the test, otherwise tearDown() deletes registered autoloaders&lt;/p&gt;

&lt;p&gt;PS: other tests failed because I haven&apos;t set up any database&lt;/p&gt;</description>
                <environment></environment>
            <key id="13428">DDC-1641</key>
            <summary>[Tests] Wrong tearDown() in UnitOfWorkTest</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="zerkms">zerkms</reporter>
                        <labels>
                    </labels>
                <created>Thu, 9 Feb 2012 05:42:24 +0000</created>
                <updated>Fri, 10 Feb 2012 20:40:28 +0000</updated>
                    <resolved>Fri, 10 Feb 2012 20:40:28 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17403" author="beberlei" created="Fri, 10 Feb 2012 20:40:28 +0000"  >&lt;p&gt;Fixed.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1620] Partial merge of PR261</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1620</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The PR261 &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; has two commits, but only one (the first one) was merged to 2.1 and 2.2&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;https://github.com/doctrine/doctrine2/pull/261&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/261&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13387">DDC-1620</key>
            <summary>Partial merge of PR261</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/blocker.png">Blocker</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="mvrhov">Miha Vrhovnik</reporter>
                        <labels>
                    </labels>
                <created>Wed, 25 Jan 2012 11:43:03 +0000</created>
                <updated>Wed, 25 Jan 2012 22:29:59 +0000</updated>
                    <resolved>Wed, 25 Jan 2012 21:39:04 +0000</resolved>
                            <version>2.1</version>
                <version>2.1.1</version>
                <version>2.1.2</version>
                <version>2.1.3</version>
                <version>2.1.4</version>
                <version>2.1.5</version>
                <version>2.2-BETA1</version>
                <version>2.2-BETA2</version>
                <version>2.2.0-RC1</version>
                                <fixVersion>2.1.6</fixVersion>
                <fixVersion>2.2</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17334" author="beberlei" created="Wed, 25 Jan 2012 21:39:04 +0000"  >&lt;p&gt;fixed&lt;/p&gt;</comment>
                    <comment id="17337" author="mvrhov" created="Wed, 25 Jan 2012 22:22:37 +0000"  >&lt;p&gt;Hm github is still saying that this is not in 2.2 branch....&lt;/p&gt;</comment>
                    <comment id="17338" author="beberlei" created="Wed, 25 Jan 2012 22:29:05 +0000"  >&lt;p&gt;Cherrypick&lt;/p&gt;</comment>
                    <comment id="17339" author="beberlei" created="Wed, 25 Jan 2012 22:29:59 +0000"  >&lt;p&gt;ah no, now its up. thanks&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1619] Missing QueryBuilder::distinct() method</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1619</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The QueryBuilder misses a way to make a query distinct.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13386">DDC-1619</key>
            <summary>Missing QueryBuilder::distinct() method</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 25 Jan 2012 09:10:49 +0000</created>
                <updated>Wed, 25 Jan 2012 09:29:40 +0000</updated>
                    <resolved>Wed, 25 Jan 2012 09:29:40 +0000</resolved>
                            <version>2.1.5</version>
                <version>2.2.0-RC1</version>
                <version>Git Master</version>
                                <fixVersion>2.1.6</fixVersion>
                <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17331" author="beberlei" created="Wed, 25 Jan 2012 09:29:40 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1618] Query::Iterate() with fetch join exception but no associaiton selected</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1618</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Iterate with fetch join in class Application\Sonata\NewsBundle\Entity\Post using association tags not allowed. &lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT o FROM Application\Sonata\NewsBundle\Entity\Post o LEFT JOIN o.tags s_tags LEFT JOIN o.author s_author WHERE ( o.id = :field_4f1f118cf04ff_id_0 OR o.id = :field_4f1f118cf04ff_id_1 OR o.id = :field_4f1f118cf04ff_id_2 )
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;The SqlWalker.php (line 742) does not check if the association is selected ... &lt;/p&gt;

&lt;p&gt;The PR : &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/271&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/271&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13384">DDC-1618</key>
            <summary>Query::Iterate() with fetch join exception but no associaiton selected</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="rande">Thomas Rabaix</reporter>
                        <labels>
                    </labels>
                <created>Tue, 24 Jan 2012 20:32:14 +0000</created>
                <updated>Tue, 24 Jan 2012 23:04:55 +0000</updated>
                    <resolved>Tue, 24 Jan 2012 23:04:56 +0000</resolved>
                            <version>2.1.5</version>
                                <fixVersion>2.1.6</fixVersion>
                <fixVersion>2.2</fixVersion>
                                <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17330" author="beberlei" created="Tue, 24 Jan 2012 23:04:55 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1617] EntityGenerator does not create uniqueConstraints annotations</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1617</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have add some uniqueConstraints in ClassMetadataInfo but the EntityGenerator does not create the annotations for this.&lt;/p&gt;

&lt;p&gt;&lt;br class=&quot;atl-forced-newline&quot; /&gt;&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; function _generateTableAnnotation($metadata)
{
    $table = array();

    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($metadata-&amp;gt;table[&apos;schema&apos;])) {
         $table[] = &apos;schema=&lt;span class=&quot;code-quote&quot;&gt;&quot;&apos; . $metadata-&amp;gt;table[&apos;schema&apos;] . &apos;&quot;&lt;/span&gt;&apos;;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($metadata-&amp;gt;table[&apos;name&apos;])) {
        $table[] = &apos;name=&lt;span class=&quot;code-quote&quot;&gt;&quot;&apos; . $metadata-&amp;gt;table[&apos;name&apos;] . &apos;&quot;&lt;/span&gt;&apos;;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &apos;@&apos; . $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_annotationsPrefix . &apos;Table(&apos; . implode(&apos;, &apos;, $table) . &apos;)&apos;;
}

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13383">DDC-1617</key>
            <summary>EntityGenerator does not create uniqueConstraints annotations</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="davidbadura">David Badura</reporter>
                        <labels>
                    </labels>
                <created>Tue, 24 Jan 2012 12:05:09 +0000</created>
                <updated>Sat, 28 Jan 2012 10:17:42 +0000</updated>
                    <resolved>Sat, 28 Jan 2012 10:17:42 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17347" author="beberlei" created="Sat, 28 Jan 2012 10:17:42 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1613] Add Pagination Tools</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1613</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;We should add pagination tools to the Doctrine\ORM\Tools\Pagination namespace. There are already 3 libraries out there that share the same code-base:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/KnpLabs/knp-components/tree/master/src/Knp/Component/Pager/Event/Subscriber/Paginate/Doctrine/ORM/Query&quot; class=&quot;external-link&quot;&gt;https://github.com/KnpLabs/knp-components/tree/master/src/Knp/Component/Pager/Event/Subscriber/Paginate/Doctrine/ORM/Query&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/beberlei/DoctrineExtensions&quot; class=&quot;external-link&quot;&gt;https://github.com/beberlei/DoctrineExtensions&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/whiteoctober/Pagerfanta&quot; class=&quot;external-link&quot;&gt;https://github.com/whiteoctober/Pagerfanta&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;We should merge the currently best one of this into the code soon, as the cost of maintaining them is very high and their code is pretty stable by now.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13377">DDC-1613</key>
            <summary>Add Pagination Tools</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 22 Jan 2012 10:19:46 +0000</created>
                <updated>Sun, 22 Jan 2012 17:34:18 +0000</updated>
                    <resolved>Sun, 22 Jan 2012 12:37:58 +0000</resolved>
                                            <fixVersion>2.2.0-RC1</fixVersion>
                <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17326" author="beberlei" created="Sun, 22 Jan 2012 12:37:58 +0000"  >&lt;p&gt;Implemented, using the KNP Code, the PAgerfanta tests and putting a set of functional tests on top.&lt;/p&gt;

&lt;p&gt;Merged back into 2.2 aswell as the code can be considered stable and does not affect any other area of the code.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1612] Cannot call entityManager-&gt;flush($entity) with new entity</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1612</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Following works:&lt;br/&gt;
$entity = $em-&amp;gt;find(&apos;Entity&apos;, 1);&lt;br/&gt;
$entity-&amp;gt;setName(&apos;newName&apos;);&lt;br/&gt;
$em-&amp;gt;persist($entity);&lt;br/&gt;
$em-&amp;gt;flush($entity);&lt;/p&gt;

&lt;p&gt;Following does NOT work:&lt;br/&gt;
$entity = new Entity();&lt;br/&gt;
$entity-&amp;gt;setName(&apos;newName&apos;);&lt;br/&gt;
$em-&amp;gt;persist($entity);&lt;br/&gt;
$em-&amp;gt;flush($entity);&lt;/p&gt;</description>
                <environment></environment>
            <key id="13374">DDC-1612</key>
            <summary>Cannot call entityManager-&gt;flush($entity) with new 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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="prolic">Sascha-Oliver Prolic</reporter>
                        <labels>
                    </labels>
                <created>Thu, 19 Jan 2012 09:40:20 +0000</created>
                <updated>Sun, 22 Jan 2012 17:34:38 +0000</updated>
                    <resolved>Sat, 21 Jan 2012 12:59:48 +0000</resolved>
                            <version>2.2-BETA1</version>
                <version>2.2-BETA2</version>
                <version>Git Master</version>
                                <fixVersion>2.2.0-RC1</fixVersion>
                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17313" author="beberlei" created="Sat, 21 Jan 2012 12:59:47 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1610] Associations loaded in &apos;loadClassMetadata&apos; event are not well initialized inside ClassMetadata</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1610</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Reproduce&lt;br/&gt;
---------------&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;I have an entity&lt;/li&gt;
	&lt;li&gt;I&apos;m loading an association (named &apos;myfield&apos;) inside a `LoadClassMetadata` event.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Error&lt;br/&gt;
------&lt;/p&gt;

&lt;p&gt;Then i get this error : Notice: Undefined index: myfield in /vendor/doctrine/lib/Doctrine/ORM/UnitOfWork.php line 2473&lt;/p&gt;

&lt;p&gt;Problem&lt;br/&gt;
-----------&lt;/p&gt;

&lt;p&gt;It seems that here &lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php#L294&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php#L294&lt;/a&gt; we call the method &apos;wakeupReflection&apos; before the loadClassMetadata event is dispatched.&lt;/p&gt;


&lt;p&gt;A solution&lt;br/&gt;
-------------&lt;/p&gt;

&lt;p&gt;I&apos;ve created a patch (all tests pass) here &lt;a href=&quot;https://github.com/gordonslondon/doctrine2/commit/0823cd54d0b2720f5e72aa9a29d16271904d99f0&quot; class=&quot;external-link&quot;&gt;https://github.com/gordonslondon/doctrine2/commit/0823cd54d0b2720f5e72aa9a29d16271904d99f0&lt;/a&gt; that fixed the issue. Do you want a PR ?&lt;/p&gt;

&lt;p&gt;Here&apos;s the PR : &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/264&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/264&lt;/a&gt;&lt;/p&gt;
</description>
                <environment></environment>
            <key id="13371">DDC-1610</key>
            <summary>Associations loaded in &apos;loadClassMetadata&apos; event are not well initialized inside ClassMetadata</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="gordonslondon">jules b</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 Jan 2012 21:05:58 +0000</created>
                <updated>Sat, 21 Jan 2012 12:59:56 +0000</updated>
                    <resolved>Sat, 21 Jan 2012 12:59:56 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17314" author="beberlei" created="Sat, 21 Jan 2012 12:59:56 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1609] Weird testerror on PostgreSQL</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1609</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/3bb803fd697d92d661f5b8cea473f75f46c34857&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/3bb803fd697d92d661f5b8cea473f75f46c34857&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Git Bisect found this commit to lead to the following 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;$ phpunit -c postgresql.phpunit.xml --filter DDC-742
PHPUnit 3.6.5 by Sebastian Bergmann.

Configuration read from /home/benny/code/php/wsnetbeans/doctrine2/postgresql.phpunit.xml

E

Time: 12 seconds, Memory: 36.00Mb

There was 1 error:

1) Doctrine\Tests\ORM\Functional\Ticket\DDC742Test::testIssue
Exception: [PHPUnit_Framework_Error_Notice] Undefined index: 0000000016f5d67f000000001fa7794e

With queries:
11. SQL: &apos;INSERT INTO comments (content) VALUES (?)&apos; Params: &apos;baz&apos;
10. SQL: &apos;INSERT INTO comments (content) VALUES (?)&apos; Params: &apos;bar&apos;
9. SQL: &apos;INSERT INTO comments (content) VALUES (?)&apos; Params: &apos;foo&apos;
8. SQL: &apos;ALTER TABLE user_comments ADD CONSTRAINT FK_BF13722AF8697D13 FOREIGN KEY (comment_id) REFERENCES comments (id) NOT DEFERRABLE INITIALLY IMMEDIATE&apos; Params: 
7. SQL: &apos;ALTER TABLE user_comments ADD CONSTRAINT FK_BF13722AA76ED395 FOREIGN KEY (user_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE&apos; Params: 
6. SQL: &apos;CREATE TABLE comments (id SERIAL NOT NULL, content VARCHAR(100) NOT NULL, PRIMARY KEY(id))&apos; Params: 
5. SQL: &apos;CREATE INDEX IDX_BF13722AF8697D13 ON user_comments (comment_id)&apos; Params: 
4. SQL: &apos;CREATE INDEX IDX_BF13722AA76ED395 ON user_comments (user_id)&apos; Params: 
3. SQL: &apos;CREATE TABLE user_comments (user_id INT NOT NULL, comment_id INT NOT NULL, PRIMARY KEY(user_id, comment_id))&apos; Params: 
2. SQL: &apos;CREATE TABLE users (id SERIAL NOT NULL, title VARCHAR(100) NOT NULL, PRIMARY KEY(id))&apos; Params: 

Trace:
/home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/UnitOfWork.php:2171
/home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php:113
/home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php:95
/home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php:130
/home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php:108
/home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/UnitOfWork.php:310
/home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/EntityManager.php:334
/home/benny/code/php/wsnetbeans/doctrine2/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC742Test.php:63


/home/benny/code/php/wsnetbeans/doctrine2/tests/Doctrine/Tests/OrmFunctionalTestCase.php:359
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13370">DDC-1609</key>
            <summary>Weird testerror on 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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 Jan 2012 19:57:25 +0000</created>
                <updated>Sun, 22 Jan 2012 17:34:46 +0000</updated>
                    <resolved>Wed, 18 Jan 2012 20:53:51 +0000</resolved>
                            <version>2.2-BETA1</version>
                <version>2.2-BETA2</version>
                                <fixVersion>2.2.0-RC1</fixVersion>
                <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17303" author="beberlei" created="Wed, 18 Jan 2012 20:08:48 +0000"  >&lt;p&gt;This error depends on the caching layer. Without APC/Memcache this test works for me, not with cache. But it only happens on PGSQL not on MySQL or SQLITE&lt;/p&gt;</comment>
                    <comment id="17304" author="beberlei" created="Wed, 18 Jan 2012 20:17:52 +0000"  >&lt;p&gt;It specifically depends on the Memcache driver, test works with APC&lt;/p&gt;</comment>
                    <comment id="17305" author="beberlei" created="Wed, 18 Jan 2012 20:53:51 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1608] Lazy load more restrict when consuming PersistentCollection trigger actions to *Persisters</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1608</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Since &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/259&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/259&lt;/a&gt; we identified an issue with the Persisters that are failing to check for entities that exist in UoW (managed and sched for insert) and are now being checked is they are part of Collection.&lt;br/&gt;
Also it missed some tests. It should be easy, just -&amp;gt;persist the entity then triggers Collection actions.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13369">DDC-1608</key>
            <summary>Lazy load more restrict when consuming PersistentCollection trigger actions to *Persisters</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Tue, 17 Jan 2012 15:40:33 +0000</created>
                <updated>Wed, 18 Jan 2012 19:18:35 +0000</updated>
                    <resolved>Wed, 18 Jan 2012 06:02:52 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                <fixVersion>2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17297" author="guilhermeblanco" created="Wed, 18 Jan 2012 06:02:52 +0000"  >&lt;p&gt;Fixed in &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/d39760ba49418f42f235e9befe223896f11de4bd&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/d39760ba49418f42f235e9befe223896f11de4bd&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17302" author="beberlei" created="Wed, 18 Jan 2012 19:18:35 +0000"  >&lt;p&gt;Merged back to 2.2&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1606] Added fix for collection-&gt;contains with many-to-many extra lazy fetchMode</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1606</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;That case previously triggered a PHP error along the lines 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;Notice: Undefined index: 0000000062a3a7690000000033c91b26 in doctrine/lib/Doctrine/ORM/UnitOfWork.php line 2202
#0 doctrine/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php(267): Doctrine\ORM\UnitOfWork-&amp;gt;getEntityIdentifier(&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;(Item))
#1 doctrine/lib/Doctrine/ORM/PersistentCollection.php(411): Doctrine\ORM\Persisters\ManyToManyPersister-&amp;gt;contains(&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;(Doctrine\ORM\PersistentCollection), &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;(Item))
#2 Test.php(71): Doctrine\ORM\PersistentCollection-&amp;gt;contains(&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;(Item))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Associated PR: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/259&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/259&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13367">DDC-1606</key>
            <summary>Added fix for collection-&gt;contains with many-to-many extra lazy fetchMode</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Tue, 17 Jan 2012 03:50:37 +0000</created>
                <updated>Sun, 22 Jan 2012 17:35:27 +0000</updated>
                    <resolved>Tue, 17 Jan 2012 03:51:36 +0000</resolved>
                                            <fixVersion>2.2.0-RC1</fixVersion>
                <fixVersion>2.2</fixVersion>
                <fixVersion>2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17294" author="guilhermeblanco" created="Tue, 17 Jan 2012 03:51:36 +0000"  >&lt;p&gt;Merged in &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/c1012f79706491e9dbf6c8741225b62833c6d2ce&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/c1012f79706491e9dbf6c8741225b62833c6d2ce&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1604] Implement Common Proxy</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1604</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="13365">DDC-1604</key>
            <summary>Implement Common Proxy</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 Jan 2012 09:55:44 +0000</created>
                <updated>Sun, 22 Jan 2012 17:35:03 +0000</updated>
                    <resolved>Mon, 16 Jan 2012 12:14:51 +0000</resolved>
                            <version>2.2-BETA1</version>
                <version>2.2-BETA2</version>
                                <fixVersion>2.2.0-RC1</fixVersion>
                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17285" author="beberlei" created="Mon, 16 Jan 2012 12:14:51 +0000"  >&lt;p&gt;done&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1603] Unique key name isn&apos;t correctly set</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1603</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Example :&lt;/p&gt;

&lt;p&gt;&amp;lt;unique-constraints&amp;gt;&lt;br/&gt;
        &amp;lt;unique-constraint columns=&quot;permalink&quot; /&amp;gt;&lt;br/&gt;
        &amp;lt;unique-constraint columns=&quot;code&quot; /&amp;gt;&lt;br/&gt;
&amp;lt;/unique-constraints&amp;gt;&lt;/p&gt;

&lt;p&gt;This will create : &lt;br/&gt;
CREATE UNIQUE INDEX UNIQ_6C3BF144F286BC32 ON shows (permalink);&lt;br/&gt;
CREATE UNIQUE INDEX 1 ON shows (code);&lt;/p&gt;

&lt;p&gt;instead of :&lt;br/&gt;
CREATE UNIQUE INDEX UNIQ_6C3BF144F286BC32 ON shows (permalink);&lt;br/&gt;
CREATE UNIQUE INDEX UNIQ_6C3BF14477153098 ON shows (code);&lt;/p&gt;

&lt;p&gt;The problem comme from SchemaTool, and the first key is a valid result because of &quot;==&quot; instead of &quot;===&quot; inside Table.php.&lt;/p&gt;

&lt;p&gt;I have create a PR on Github.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13364">DDC-1603</key>
            <summary>Unique key name isn&apos;t correctly set</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="armetiz">Thomas Tourlourat - Armetiz</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 Jan 2012 09:21:49 +0000</created>
                <updated>Sun, 22 Jan 2012 17:34:28 +0000</updated>
                    <resolved>Tue, 17 Jan 2012 03:44:57 +0000</resolved>
                            <version>2.2-BETA2</version>
                                <fixVersion>2.1.6</fixVersion>
                <fixVersion>2.2.0-RC1</fixVersion>
                <fixVersion>2.2</fixVersion>
                <fixVersion>2.3</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17282" author="armetiz" created="Mon, 16 Jan 2012 09:25:50 +0000"  >&lt;p&gt;Here the PR for the ORM SchemaTool : &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/261&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/261&lt;/a&gt;&lt;br/&gt;
Here the PR for the DBAL Table : &lt;a href=&quot;https://github.com/doctrine/dbal/pull/94&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/94&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17293" author="guilhermeblanco" created="Tue, 17 Jan 2012 03:44:57 +0000"  >&lt;p&gt;Merged &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/2bb511584e5d37ddad6c669a19d8e6b4a20f7b2b&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/2bb511584e5d37ddad6c669a19d8e6b4a20f7b2b&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17322" author="beberlei" created="Sat, 21 Jan 2012 14:34:56 +0000"  >&lt;p&gt;DBAL merged back into 2.2 and 2.1.x&lt;/p&gt;</comment>
                    <comment id="17323" author="beberlei" created="Sat, 21 Jan 2012 14:38:02 +0000"  >&lt;p&gt;and Merged into 2.2 and 2.1.x ORM&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1601] Schema Validator wrong on entities with pk as fk</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1601</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="13360">DDC-1601</key>
            <summary>Schema Validator wrong on entities with pk as fk</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 15 Jan 2012 09:32:10 +0000</created>
                <updated>Sun, 15 Jan 2012 11:13:11 +0000</updated>
                    <resolved>Sun, 15 Jan 2012 11:13:11 +0000</resolved>
                            <version>2.1.5</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17246" author="beberlei" created="Sun, 15 Jan 2012 11:13:11 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1598] ProxyFactory makes assumptions on identifier getter code</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1598</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;As of &lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Proxy/ProxyFactory.php#L214&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Proxy/ProxyFactory.php#L214&lt;/a&gt;&lt;br/&gt;
and&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Proxy/ProxyFactory.php#L237&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Proxy/ProxyFactory.php#L237&lt;/a&gt;&lt;br/&gt;
the current ProxyFactory isn&apos;t actually checking if the identifier getter has logic in it.&lt;br/&gt;
Current checks aren&apos;t enough/valid.&lt;/p&gt;

&lt;p&gt;In my opinion the check should be matching following:&lt;/p&gt;

&lt;p&gt;(public|protected)\s+function\s+getFieldname\s*&amp;#40;\s*&amp;#41;\s+&lt;/p&gt;
{\s*\$this\s*-&amp;gt;Fieldname\s*;\s*}

&lt;p&gt;Not really experienced with regex, but currently cannot come up with a more secure check.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13356">DDC-1598</key>
            <summary>ProxyFactory makes assumptions on identifier getter code</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ocramius">Marco Pivetta</reporter>
                        <labels>
                    </labels>
                <created>Fri, 13 Jan 2012 17:28:03 +0000</created>
                <updated>Mon, 16 Jan 2012 09:56:15 +0000</updated>
                    <resolved>Mon, 16 Jan 2012 08:28:11 +0000</resolved>
                            <version>2.0</version>
                <version>2.0.1</version>
                <version>2.0.2</version>
                <version>2.0.3</version>
                <version>2.0.4</version>
                <version>2.0.5</version>
                <version>2.0.6</version>
                <version>2.0.7</version>
                <version>2.1</version>
                <version>2.1.1</version>
                <version>2.1.2</version>
                <version>2.1.3</version>
                <version>2.1.4</version>
                <version>2.1.5</version>
                <version>2.2-BETA1</version>
                <version>2.2-BETA2</version>
                <version>Git Master</version>
                                <fixVersion>2.2</fixVersion>
                <fixVersion>2.3</fixVersion>
                <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17247" author="beberlei" created="Sun, 15 Jan 2012 11:19:31 +0000"  >&lt;p&gt;Can you explain why you think this is necessary?&lt;/p&gt;

&lt;p&gt;You are right an id method with logic could exist in 4 lines of code, but for what purpose? &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="17250" author="ocramius" created="Sun, 15 Jan 2012 12:40:31 +0000"  >&lt;p&gt;First of all it is a question of concept. Doctrine &lt;b&gt;shouldn&apos;t&lt;/b&gt; assume anything about entities outside of their fields. It already introduces a level of complication when we explain how to clone/serialize objects, which was very confusing.&lt;/p&gt;

&lt;p&gt;Asking for the purpose of an identifier field getter method is in my opinion again an attempt of making assumptions over user&apos;s code...&lt;/p&gt;

&lt;p&gt;What if the user wrote something like:&lt;/p&gt;

&lt;p&gt;public function getIdentifierField1()&lt;br/&gt;
 {&lt;br/&gt;
    return $this-&amp;gt;identifierField1? $this-&amp;gt;_myInitializationStuff() : null;&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;private function _myInitializationStuff() &lt;br/&gt;
{&lt;br/&gt;
    //open files, check stuff, make things difficult for the D2 team &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/biggrin.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;For instance, opening file handlers, sockets, whatever... This is a case that would break the entity because of optimization introduced by the ProxyFactory. (not to mention when getIdentifierField1 does some conversion, like return $this-&amp;gt;identifierField1 + self::OFFSET_REQUIRED_BY_WEBSERVICE;&lt;/p&gt;

&lt;p&gt;I&apos;m not arguing about the validity of this optimization, but that the checks are too lazy.&lt;/p&gt;

&lt;p&gt;I&apos;ve read something about moving the ProxyFactory to common and using code scanner tools, and the check should be about applying the optimization only when the form is&lt;/p&gt;

&lt;p&gt;return $this-&amp;gt;identifierField1;&lt;/p&gt;

&lt;p&gt;That&apos;s why I put the example of the regex. That would probably not be as safe as using some reflection-based tool, but surely more than just checking if the code is &amp;lt;= 4 lines...&lt;/p&gt;</comment>
                    <comment id="17251" author="ocramius" created="Sun, 15 Jan 2012 13:03:58 +0000"  >&lt;p&gt;Also don&apos;t know what stuff like EAccelerator (known in this Jira as of it&apos;s fantastic idea about stripping comments) would make the check of the 4 lines like.&lt;/p&gt;</comment>
                    <comment id="17280" author="beberlei" created="Mon, 16 Jan 2012 08:28:03 +0000"  >&lt;p&gt;This argument is void i just seen&lt;/p&gt;

&lt;p&gt;A method:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getIdentifierField1()
{
   &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;identifierField1? $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_myInitializationStuff() : &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
} 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Will only used when the id is not set anyways.&lt;/p&gt;

&lt;p&gt;In any other case Ids are Immutable and changing them in your code would break a lot more than just this smart proxy method generation.&lt;/p&gt;</comment>
                    <comment id="17283" author="ocramius" created="Mon, 16 Jan 2012 09:28:51 +0000"  >&lt;p&gt;Nope, this code actually works only if the ID &lt;b&gt;is&lt;/b&gt; set &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;br/&gt;
I&apos;m not talking about changing IDs, it&apos;s just that getters and setters don&apos;t always reflect the class attributes...&lt;/p&gt;</comment>
                    <comment id="17284" author="ocramius" created="Mon, 16 Jan 2012 09:56:15 +0000"  >&lt;p&gt;As of IRC there&apos;s 3 ways (for now) to get this solved:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Some code scanner/stronger checks (difficult/problems with private methods/slow)&lt;/li&gt;
	&lt;li&gt;Regex (as of description)&lt;/li&gt;
	&lt;li&gt;Adding configuration (per-entity or per-method. Probably too messy)&lt;/li&gt;
	&lt;li&gt;Documenting it as &quot;magic&quot; of proxies and let the users be aware of it&lt;/li&gt;
&lt;/ul&gt;
</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1594] Merging serialized entity back to the UnitOfWork</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1594</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;(I&apos;m using doctrine 2.1.4.)&lt;/p&gt;

&lt;p&gt;I&apos;m trying to merge an Entity back to the UnitOfWork.&lt;br/&gt;
The Entity is created from a serialized object (The deserialzed Entity is a valid Entity Object. The only difference &lt;br/&gt;
is that it is not managed by Doctrine yet) and I&apos;m using the merge&lt;br/&gt;
method of the EntityManager to get it in managed state again.&lt;/p&gt;

&lt;p&gt;This results in a call of the Method doMerge() in the UnitOfWork&lt;br/&gt;
class.&lt;br/&gt;
This method takes the id of my deserialized Entity, that I want to&lt;br/&gt;
merge, and looks if an Entity with that id is already in doctrine&lt;br/&gt;
cache. If that is the case my deserialized Entity is merged with the&lt;br/&gt;
one in the cache. So far so good. But I&apos;ve got the Problem, that the&lt;br/&gt;
Entity, which is in cache, is not initialized yet. It is not initialized because&lt;br/&gt;
this Entity has a relation to another Entity that a used earlier in code. &lt;br/&gt;
It&apos;s there but in uninitialized stat, because I did not access it yet.&lt;br/&gt;
So when my deserialized Entity and the one from cache gets merged, some field are&lt;br/&gt;
uninitialized (the id field, for example).&lt;/p&gt;

&lt;p&gt;I fixed the problem by adding this piece of code in line 1446 in the&lt;br/&gt;
UnitOfWork class:&lt;br/&gt;
  if(! $managedCopy-&amp;gt;_&lt;em&gt;isInitialized&lt;/em&gt;_)&lt;/p&gt;
{
            $managedCopy-&amp;gt;__load();
   }</description>
                <environment>Windows 7, Apache, PHP 5.3.8, Zend Framework</environment>
            <key id="13350">DDC-1594</key>
            <summary>Merging serialized entity back to the UnitOfWork</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="mrkanister">MB</reporter>
                        <labels>
                    </labels>
                <created>Wed, 11 Jan 2012 07:18:57 +0000</created>
                <updated>Sun, 15 Jan 2012 16:47:20 +0000</updated>
                    <resolved>Sun, 15 Jan 2012 16:47:20 +0000</resolved>
                            <version>2.1.4</version>
                                <fixVersion>2.1.6</fixVersion>
                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17259" author="beberlei" created="Sun, 15 Jan 2012 16:47:20 +0000"  >&lt;p&gt;Fixed and merged into 2.2 and 2.1&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1588] There is no way to get the Query&apos;s result cache impl without going to EM</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1588</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Ok, my problem is this:&lt;/p&gt;

&lt;p&gt;I have created a Query object. Now I&apos;d like to get it&apos;s result cache driver.&lt;/p&gt;

&lt;p&gt;My options:&lt;br/&gt;
 1) Ask QueryCacheProfile for the driver. I can, but it&apos;s never populated by default so I always get just NULL.&lt;br/&gt;
 2) Ask Query with getResultCacheDriver(), but wait, I can&apos;t, that&apos;s now deprecated&lt;br/&gt;
 3) Ask from EM&apos;s configuration the result cache driver. This always works.&lt;/p&gt;

&lt;p&gt;I propose that either the QueryCacheProfile is always populated with the Query&apos;s default result cache impl unless specifically overridden for the QueryCacheProfile&lt;/p&gt;

&lt;p&gt;OR &lt;/p&gt;

&lt;p&gt;Make getResultCacheDriver() not deprecated. Like the other two related methods, they are not deprecated, why should this one. Calling this could populate the QueryCacheProfile for future use like all the other (get cache ttl, id) methods.&lt;/p&gt;

&lt;p&gt;My problem with with option 3) is &quot;leaving the context of my method and the Query&quot; (mentally of course). Why should I have to go poke around in EM&apos;s configuration when the result cache IS (or is easily obtainable behind the scenes) in the query object anyways?&lt;/p&gt;</description>
                <environment></environment>
            <key id="13342">DDC-1588</key>
            <summary>There is no way to get the Query&apos;s result cache impl without going to EM</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ambis">Matti Niemel&#228;</reporter>
                        <labels>
                    </labels>
                <created>Sun, 8 Jan 2012 20:56:12 +0000</created>
                <updated>Mon, 9 Jan 2012 09:44:01 +0000</updated>
                    <resolved>Mon, 9 Jan 2012 07:27:46 +0000</resolved>
                            <version>2.2-BETA2</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17177" author="beberlei" created="Sun, 8 Jan 2012 21:14:51 +0000"  >&lt;p&gt;Weird, this code looks very strange. I will check and fix that before the 2.2 RC release.&lt;/p&gt;</comment>
                    <comment id="17180" author="beberlei" created="Mon, 9 Jan 2012 07:27:46 +0000"  >&lt;p&gt;The default result cache is now passed to any new query cache profile. The following API is now working as expected:&lt;/p&gt;

&lt;div class=&quot;code panel&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;useResultCache(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;);
$cache = $query-&amp;gt;getQueryCacheProfile()-&amp;gt;getResultCacheDriver();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="17191" author="ambis" created="Mon, 9 Jan 2012 09:44:01 +0000"  >&lt;p&gt;That&apos;s perfect! Thank you!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1585] Doctrine2 doesn&apos;t check for the correct entity type on @ManyToOne relations</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1585</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I made a mistake when creating a @ManyToOne entity:&lt;/p&gt;

&lt;p&gt;/**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@ManyToOne(targetEntity=&quot;Entities\EntityA&quot;)&lt;br/&gt;
 */&lt;br/&gt;
private $test;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;However, I was setting Entities\EntityB into $test.&lt;/p&gt;

&lt;p&gt;Doctrine2 doesn&apos;t check for this, resulting in a hard-to-find issue.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13339">DDC-1585</key>
            <summary>Doctrine2 doesn&apos;t check for the correct entity type on @ManyToOne relations</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="felicitus">Timo A. Hummel</reporter>
                        <labels>
                    </labels>
                <created>Sat, 7 Jan 2012 17:11:54 +0000</created>
                <updated>Sun, 15 Jan 2012 14:01:33 +0000</updated>
                    <resolved>Sun, 15 Jan 2012 14:01:33 +0000</resolved>
                            <version>2.1.5</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17232" author="guilhermeblanco" created="Fri, 13 Jan 2012 05:42:20 +0000"  >&lt;p&gt;Duplicated&lt;/p&gt;</comment>
                    <comment id="17249" author="beberlei" created="Sun, 15 Jan 2012 12:36:38 +0000"  >&lt;p&gt;This is not a duplicate, its a runtime issue in the code when setting the wrong target entity type.&lt;/p&gt;</comment>
                    <comment id="17252" author="beberlei" created="Sun, 15 Jan 2012 14:01:33 +0000"  >&lt;p&gt;Implemented an instanceof check.&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                <outwardlinks description="duplicates">
                            <issuelink>
            <issuekey id="13340">DBAL-479</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1577] Remove static Reflection dependency from ClassMetadata</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1577</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;See &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DCOM-93&quot; title=&quot;Add Reflection Abstraction&quot;&gt;&lt;del&gt;DCOM-93&lt;/del&gt;&lt;/a&gt; for more information&lt;/p&gt;</description>
                <environment></environment>
            <key id="13327">DDC-1577</key>
            <summary>Remove static Reflection dependency from ClassMetadata</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 3 Jan 2012 21:56:33 +0000</created>
                <updated>Tue, 3 Jan 2012 21:56:55 +0000</updated>
                    <resolved>Tue, 3 Jan 2012 21:56:41 +0000</resolved>
                                            <fixVersion>2.2-BETA2</fixVersion>
                <fixVersion>2.2</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                            <issuelinks>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                <outwardlinks description="relates to">
                            <issuelink>
            <issuekey id="13317">DCOM-93</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1561] GH-239: Fix $qb-&gt;expr() PHPDoc @return type.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1561</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/239&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/239&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The autocompletion was missing so i was sad.&lt;/p&gt;

&lt;p&gt;But hey, it&apos;s open source!&lt;/p&gt;</description>
                <environment></environment>
            <key id="13301">DDC-1561</key>
            <summary>GH-239: Fix $qb-&gt;expr() PHPDoc @return type.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 23 Dec 2011 16:07:04 +0000</created>
                <updated>Tue, 3 Jan 2012 21:53:35 +0000</updated>
                    <resolved>Wed, 28 Dec 2011 07:49:25 +0000</resolved>
                                            <fixVersion>2.1.6</fixVersion>
                <fixVersion>2.2-BETA2</fixVersion>
                <fixVersion>2.2</fixVersion>
                <fixVersion>2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17119" author="beberlei" created="Wed, 28 Dec 2011 07:49:25 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1554] GH-235: Allow ExporterDrivers that implement the exportClassMetadata() function to return false</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1554</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/235&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/235&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Allow ExporterDrivers that implement the exportClassMetadata() function to return FALSE when no content is available/needs to be written to a file by the AbstractExporter, preventing empty files to be generated foreach processed ClassMetadataInfo instance.&lt;/p&gt;

&lt;p&gt;I&apos;m currently generating Data Transfer Object class for my Entities, but not all Entities require it. Based on an Annotation I determine which DTO&apos;s will be generated and return FALSE otherwise. Currently this &apos;negative&apos; return is not respected and a lot of empty files are created.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13291">DDC-1554</key>
            <summary>GH-235: Allow ExporterDrivers that implement the exportClassMetadata() function to return false</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Dec 2011 11:42:07 +0000</created>
                <updated>Tue, 3 Jan 2012 21:52:59 +0000</updated>
                    <resolved>Wed, 28 Dec 2011 08:03:14 +0000</resolved>
                                            <fixVersion>2.2-BETA2</fixVersion>
                <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1548] One to one entity badly populated</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1548</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;One to one entity over populated&lt;/p&gt;</description>
                <environment>ubuntu php 5.3.8</environment>
            <key id="13283">DDC-1548</key>
            <summary>One to one entity badly populated</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="goetas">Asmir Mustafic</reporter>
                        <labels>
                    </labels>
                <created>Mon, 19 Dec 2011 09:09:58 +0000</created>
                <updated>Mon, 19 Dec 2011 18:33:46 +0000</updated>
                    <resolved>Mon, 19 Dec 2011 15:55:15 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.1.5</fixVersion>
                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17042" author="goetas" created="Mon, 19 Dec 2011 09:14:31 +0000"  >&lt;p&gt;I have created a test. &lt;/p&gt;

&lt;p&gt;the bug may be in \Doctrine\ORM\Internal\Hydration\AbstractHydrator at line 246.&lt;/p&gt;

&lt;p&gt;i think...&lt;/p&gt;

&lt;p&gt;remove &lt;br/&gt;
if ( ! isset($rowData&lt;span class=&quot;error&quot;&gt;&amp;#91;$dqlAlias&amp;#93;&lt;/span&gt;[$cache&lt;span class=&quot;error&quot;&gt;&amp;#91;$key&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;fieldName&amp;#39;&amp;#93;&lt;/span&gt;]) || $value !== null) {&lt;/p&gt;

&lt;p&gt;and replace with :&lt;/p&gt;

&lt;p&gt;if ( ! isset($rowData&lt;span class=&quot;error&quot;&gt;&amp;#91;$dqlAlias&amp;#93;&lt;/span&gt;[$cache&lt;span class=&quot;error&quot;&gt;&amp;#91;$key&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;fieldName&amp;#39;&amp;#93;&lt;/span&gt;]) &amp;amp;&amp;amp; $value !== null) {&lt;/p&gt;

&lt;p&gt;this will fix the bug&lt;/p&gt;</comment>
                    <comment id="17048" author="guilhermeblanco" created="Mon, 19 Dec 2011 15:55:15 +0000"  >&lt;p&gt;Fixed since this commit: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/68663fac4b5619643b8a140d6bbe7031e4fa2ad5&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/68663fac4b5619643b8a140d6bbe7031e4fa2ad5&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks a lot for the report and patch! =D&lt;/p&gt;</comment>
                    <comment id="17055" author="beberlei" created="Mon, 19 Dec 2011 18:33:46 +0000"  >&lt;p&gt;Update fix version, this was merged into 2.1.5&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11132" name="1548.php" size="1491" author="goetas" created="Mon, 19 Dec 2011 09:11:49 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1547] GH-228: Fixed testsuite</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1547</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/228&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/228&lt;/a&gt;&lt;/p&gt;
</description>
                <environment></environment>
            <key id="13282">DDC-1547</key>
            <summary>GH-228: Fixed testsuite</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 19 Dec 2011 08:57:04 +0000</created>
                <updated>Tue, 3 Jan 2012 21:53:17 +0000</updated>
                    <resolved>Wed, 28 Dec 2011 07:53:01 +0000</resolved>
                                            <fixVersion>2.2-BETA2</fixVersion>
                <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1546] another incorrect mapping not detected by orm:validate-schema</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1546</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Several lines like this one:&lt;/p&gt;

&lt;p&gt;	&amp;lt;field name=&quot;upgrades&quot; type=&quot;int&quot; column=&quot;Upgrades&quot;/&amp;gt;&lt;/p&gt;

&lt;p&gt;Were not flagged by orm:validate-schema as incorrect. Updating a related entity revealed the problem (&quot;int&quot; not being a proper type) at runtime.&lt;/p&gt;


&lt;p&gt;Bug: orm:validate-schema should throw an error on incorrect column type.&lt;/p&gt;</description>
                <environment>Linux Debian Squeeze, MySQL</environment>
            <key id="13281">DDC-1546</key>
            <summary>another incorrect mapping not detected by orm:validate-schema</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="tom">Tom Vogt</reporter>
                        <labels>
                    </labels>
                <created>Sun, 18 Dec 2011 23:16:23 +0000</created>
                <updated>Mon, 19 Dec 2011 09:11:48 +0000</updated>
                    <resolved>Mon, 19 Dec 2011 09:11:48 +0000</resolved>
                            <version>2.1.1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17039" author="beberlei" created="Mon, 19 Dec 2011 08:45:07 +0000"  >&lt;p&gt;Keep it coming, very valuable &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="17041" author="beberlei" created="Mon, 19 Dec 2011 09:11:48 +0000"  >&lt;p&gt;Fixed, but referenced with wrong ticket in master right now.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1545] Update on loaded association not detected upon flush()</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1545</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;If an association is joined during fetching and then updated in-memory, the update is not detected during flushing. I made the following test cases:&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Association is joined:&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;change NULL &#8594; entity: &lt;b&gt;does not work&lt;/b&gt;&lt;/li&gt;
	&lt;li&gt;change entity &#8594; NULL: works&lt;/li&gt;
	&lt;li&gt;change entity1 &#8594;  entity2: &lt;b&gt;does not work&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;b&gt;Assocation is not joined:&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;change NULL &#8594; entity: works&lt;/li&gt;
	&lt;li&gt;change entity &#8594; NULL: works&lt;/li&gt;
	&lt;li&gt;change entity1 &#8594;  entity2: works&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
            <key id="13279">DDC-1545</key>
            <summary>Update on loaded association not detected upon flush()</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="bschussek">Bernhard Schussek</reporter>
                        <labels>
                    </labels>
                <created>Sun, 18 Dec 2011 11:13:02 +0000</created>
                <updated>Mon, 19 Dec 2011 18:33:30 +0000</updated>
                    <resolved>Mon, 19 Dec 2011 06:40:49 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.1.5</fixVersion>
                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17023" author="bschussek" created="Sun, 18 Dec 2011 11:20:05 +0000"  >&lt;p&gt;See here for the test case: &lt;a href=&quot;https://github.com/bschussek/doctrine-orm/tree/DDC-1545&quot; class=&quot;external-link&quot;&gt;https://github.com/bschussek/doctrine-orm/tree/DDC-1545&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17036" author="guilhermeblanco" created="Mon, 19 Dec 2011 05:23:06 +0000"  >&lt;p&gt;Increasing priority&lt;/p&gt;</comment>
                    <comment id="17037" author="guilhermeblanco" created="Mon, 19 Dec 2011 06:40:49 +0000"  >&lt;p&gt;Issue fixed since this commit:&lt;/p&gt;

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

&lt;p&gt;Thanks a lot for the bug reporting. It was the second time someone reported me this issue and I could not reproduce! =)&lt;/p&gt;</comment>
                    <comment id="17043" author="beberlei" created="Mon, 19 Dec 2011 10:44:04 +0000"  >&lt;p&gt;This issue is referenced in Github Pull-Request GH-229&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/229&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/229&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17044" author="beberlei" created="Mon, 19 Dec 2011 11:23:04 +0000"  >&lt;p&gt;Related Pull Request was closed: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/229&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/229&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17051" author="beberlei" created="Mon, 19 Dec 2011 17:09:48 +0000"  >&lt;p&gt;Fixed properly now. Will be merged into 2.1.x&lt;/p&gt;</comment>
                    <comment id="17054" author="beberlei" created="Mon, 19 Dec 2011 18:33:30 +0000"  >&lt;p&gt;Update fix version, this was merged into 2.1.5&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1544] Interfaces as target entity + event to resolve them to an implementation</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1544</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Idea is:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;UserInterface&quot;&lt;/span&gt;)
 */
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Would fire &quot;onResolveTargetEntity&quot; which is supposed to return details for resolving the interface to an actual implementation.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13278">DDC-1544</key>
            <summary>Interfaces as target entity + event to resolve them to an implementation</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</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:30:39 +0000</created>
                <updated>Sat, 17 Dec 2011 22:05:25 +0000</updated>
                    <resolved>Sat, 17 Dec 2011 22:05:26 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17013" author="beberlei" created="Sat, 17 Dec 2011 22:02:05 +0000"  >&lt;p&gt;This issue is referenced in Github Pull-Request GH-222&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/222&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/222&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17014" author="beberlei" created="Sat, 17 Dec 2011 22:04:02 +0000"  >&lt;p&gt;Related Pull Request was closed: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/222&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/222&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17015" author="beberlei" created="Sat, 17 Dec 2011 22:05:03 +0000"  >&lt;p&gt;This issue is referenced in Github Pull-Request GH-223&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/223&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/223&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17016" author="beberlei" created="Sat, 17 Dec 2011 22:05:04 +0000"  >&lt;p&gt;Related Pull Request was closed: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/223&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/223&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1541] ClassMetadataBuilder has some name discrepancy in calls to AssociationBuilder methods</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1541</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;ClassMetadataBuilder class has some methods defined that call methods on AssociationBuilder class by different names, specifically the (set) part .  e.g.&lt;/p&gt;

&lt;p&gt;ClassMetadataBuilder method addManyToOne, calls setInversedBy, but is defined in AssociationBuilder as inversedBy. This trows a call to undefined method.&lt;/p&gt;


&lt;p&gt;Which one is it ?&lt;/p&gt;</description>
                <environment></environment>
            <key id="13275">DDC-1541</key>
            <summary>ClassMetadataBuilder has some name discrepancy in calls to AssociationBuilder 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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="verges">Juan Manuel Verges</reporter>
                        <labels>
                    </labels>
                <created>Fri, 16 Dec 2011 19:03:49 +0000</created>
                <updated>Sat, 17 Dec 2011 11:40:05 +0000</updated>
                    <resolved>Sat, 17 Dec 2011 11:40:05 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17010" author="beberlei" created="Sat, 17 Dec 2011 11:40:04 +0000"  >&lt;p&gt;Fixed.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1539] QueryException occurs when parentheses exist on the left-hand of comparison</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1539</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When I executed the following DQL, I get an 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; 
&amp;gt; php scripts/doctrine.php orm:run-dql &lt;span class=&quot;code-quote&quot;&gt;&quot;select o from OrderDetail o where (o.price + o.tax) * o.count &amp;gt; 10000&quot;&lt;/span&gt;

  [Doctrine\ORM\Query\QueryException]
  [Syntax Error] line 0, col 69: Error: Expected =, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, &amp;gt;, &amp;gt;=, !=, got &apos;)&apos;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When I swap the left-hand expression and right-hand one, no error occurs.&lt;/p&gt;
&lt;div class=&quot;code panel&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;gt; php scripts/doctrine.php orm:run-dql &lt;span class=&quot;code-quote&quot;&gt;&quot;select o from OrderDetail o where 10000 &amp;lt; (o.price + o.tax) * o.count&quot;&lt;/span&gt;

array
  empty
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13268">DDC-1539</key>
            <summary>QueryException occurs when parentheses exist on the left-hand of comparison</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="miau">Koji Ando</reporter>
                        <labels>
                    </labels>
                <created>Wed, 14 Dec 2011 17:51:21 +0000</created>
                <updated>Tue, 20 Dec 2011 16:37:04 +0000</updated>
                    <resolved>Tue, 20 Dec 2011 16:36:56 +0000</resolved>
                            <version>2.1.4</version>
                                <fixVersion>2.2</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17064" author="beberlei" created="Tue, 20 Dec 2011 13:55:05 +0000"  >&lt;p&gt;This issue is referenced in Github Pull-Request GH-233&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/233&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/233&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17065" author="guilhermeblanco" created="Tue, 20 Dec 2011 16:36:56 +0000"  >&lt;p&gt;Fixed in &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/4bc014c6961be2e24b131d06d25c885fdf07bc3b&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/4bc014c6961be2e24b131d06d25c885fdf07bc3b&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17066" author="beberlei" created="Tue, 20 Dec 2011 16:37:04 +0000"  >&lt;p&gt;Related Pull Request was closed: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/233&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/233&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1537] GH-214: Fixed typo in the XmlDriver</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1537</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/214&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/214&lt;/a&gt;&lt;/p&gt;
</description>
                <environment></environment>
            <key id="13265">DDC-1537</key>
            <summary>GH-214: Fixed typo in the XmlDriver</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Dec 2011 20:41:15 +0000</created>
                <updated>Wed, 14 Dec 2011 04:40:00 +0000</updated>
                    <resolved>Wed, 14 Dec 2011 04:40:00 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16982" author="guilhermeblanco" created="Wed, 14 Dec 2011 04:40:00 +0000"  >&lt;p&gt;Merged&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1536] GH-213: QueryBuilder::getQuery</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1536</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/213&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/213&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hi there,&lt;br/&gt;
I&apos;m wondering myself if the QueryBuilder::getQuery is a good method name.&lt;br/&gt;
Actually, a getMethodObject makes me think that I can use many times the getMethodObject and work with the same object.&lt;br/&gt;
e.g :&lt;/p&gt;

&lt;p&gt;```php&lt;br/&gt;
$qb-&amp;gt;getQuery()-&amp;gt;useResultCache (true);&lt;br/&gt;
$qb-&amp;gt;getQuery()-&amp;gt;execute();&lt;br/&gt;
```&lt;br/&gt;
In my code, the problem is that getQuery return a new instance of Query each time that I call getQuery.&lt;br/&gt;
Furthermore, the getQuery method invoke a createQuery method.&lt;/p&gt;

&lt;p&gt;So, maybe the QueryBuiler::getQuery can store a reference to the created Query instance, and if the QueryBuilder::getQuery is call many times without any change return the stored instance.&lt;br/&gt;
If the QueryBuilder::getQuery have to generate a new Query, throw an exception or something like that.&lt;/p&gt;

&lt;p&gt;Because of a change to QueryBuilder::createQuery is a major change, I don&apos;t think that It could be the solution, but it&apos;s a reflexion around this.&lt;/p&gt;

&lt;p&gt;What do you think about that ?&lt;/p&gt;</description>
                <environment></environment>
            <key id="13262">DDC-1536</key>
            <summary>GH-213: QueryBuilder::getQuery</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="2">Won&apos;t Fix</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Dec 2011 20:41:11 +0000</created>
                <updated>Wed, 14 Dec 2011 04:40:46 +0000</updated>
                    <resolved>Wed, 14 Dec 2011 04:40:46 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16983" author="guilhermeblanco" created="Wed, 14 Dec 2011 04:40:46 +0000"  >&lt;p&gt;This includes a BC break.&lt;br/&gt;
Marking as won&apos;t fix.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1531] Documentation references no-longer available constant Lexer::T_ABS</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1531</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Line 645 of &lt;a href=&quot;https://github.com/doctrine/orm-documentation/blob/master/en/reference/dql-doctrine-query-language.rst&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/orm-documentation/blob/master/en/reference/dql-doctrine-query-language.rst&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Best i can tell this has been re-named to Lexar::T_IDENTIFIER by looking at other functions in the distribution&lt;/p&gt;</description>
                <environment></environment>
            <key id="13256">DDC-1531</key>
            <summary>Documentation references no-longer available constant Lexer::T_ABS</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="ebernhardson">Erik Bernhardson</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Dec 2011 05:26:45 +0000</created>
                <updated>Wed, 14 Dec 2011 04:04:42 +0000</updated>
                    <resolved>Wed, 14 Dec 2011 04:04:42 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.2</fixVersion>
                                <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16981" author="guilhermeblanco" created="Wed, 14 Dec 2011 04:04:42 +0000"  >&lt;p&gt;Fixed in &lt;a href=&quot;https://github.com/doctrine/orm-documentation/commit/373090f2232a59b7c4cb35212a1c1d5843bc8be7&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/orm-documentation/commit/373090f2232a59b7c4cb35212a1c1d5843bc8be7&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1526] Unecessary queries with LEFT JOIN</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1526</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;After upgrading to 2.1.4 (from 2.1.2), the following dql started creating way more queries than necessary :&lt;br/&gt;
SELECT m, p, s, c, o&lt;br/&gt;
FROM FERMainBundle:Menu m&lt;br/&gt;
LEFT JOIN m.page p&lt;br/&gt;
LEFT JOIN m.section s&lt;br/&gt;
LEFT JOIN m.children c&lt;br/&gt;
LEFT JOIN s.position o&lt;br/&gt;
ORDER BY m.lft&lt;/p&gt;

&lt;p&gt;Details to the code here:&lt;br/&gt;
&lt;a href=&quot;http://pastie.textmate.org/private/z9gtgqe1odwenxcmudywqa&quot; class=&quot;external-link&quot;&gt;http://pastie.textmate.org/private/z9gtgqe1odwenxcmudywqa&lt;/a&gt;&lt;br/&gt;
The model looks like that:&lt;br/&gt;
&lt;a href=&quot;http://pastie.textmate.org/private/przxzfimsfyua02cxqcv9a&quot; class=&quot;external-link&quot;&gt;http://pastie.textmate.org/private/przxzfimsfyua02cxqcv9a&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://pastie.textmate.org/private/ob1jqiekv89e4xj9bq06q&quot; class=&quot;external-link&quot;&gt;http://pastie.textmate.org/private/ob1jqiekv89e4xj9bq06q&lt;/a&gt;&lt;br/&gt;
First query is executed, it should in fact retrieve everything there is about the menu, but then it runs the second query for every menu element I have, generating a lot of queries that didn&apos;t occur before.&lt;/p&gt;</description>
                <environment>PHP 5.3.6</environment>
            <key id="13250">DDC-1526</key>
            <summary>Unecessary queries with LEFT JOIN</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="nenuial">Pascal Burkhard</reporter>
                        <labels>
                    </labels>
                <created>Fri, 9 Dec 2011 19:22:23 +0000</created>
                <updated>Tue, 23 Oct 2012 11:41:45 +0000</updated>
                    <resolved>Sat, 28 Jan 2012 11:28:38 +0000</resolved>
                            <version>2.1.4</version>
                                <fixVersion>2.1.6</fixVersion>
                <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16997" author="beberlei" created="Thu, 15 Dec 2011 20:04:07 +0000"  >&lt;p&gt;Can you profile where exactly the extra queries are executed using xdebug_start_trace? Directly during hydration or later in your code?&lt;/p&gt;</comment>
                    <comment id="17053" author="nenuial" created="Mon, 19 Dec 2011 18:22:40 +0000"  >&lt;p&gt;xdebug trace start just before I query the database&lt;/p&gt;</comment>
                    <comment id="17062" author="beberlei" created="Tue, 20 Dec 2011 07:54:28 +0000"  >&lt;p&gt;Hi Pascal, sorry but this is not enough. I need this query until all the other entities (or at least one) are n+1 joined.&lt;/p&gt;</comment>
                    <comment id="17063" author="nenuial" created="Tue, 20 Dec 2011 11:30:21 +0000"  >&lt;p&gt;Here the complete trace, started just before the first query. I&apos;m sorry but I can&apos;t make heads or tails with that... I hope it can help you pinpoint the problem.&lt;/p&gt;

&lt;p&gt;Please also note that I have update Doctrine ORM to 2.1.5 and there was a change in the number of &quot;superfluous&quot; queries done. I am now only left with additional queries to get the relations to &quot;parent&quot;, cf the model ( &lt;a href=&quot;http://pastie.textmate.org/private/przxzfimsfyua02cxqcv9a&quot; class=&quot;external-link&quot;&gt;http://pastie.textmate.org/private/przxzfimsfyua02cxqcv9a&lt;/a&gt; ).&lt;/p&gt;</comment>
                    <comment id="17132" author="beberlei" created="Wed, 28 Dec 2011 19:41:49 +0000"  >&lt;p&gt;Is the trace from before upgrade to 2.1.5 or after?&lt;/p&gt;</comment>
                    <comment id="17133" author="nenuial" created="Wed, 28 Dec 2011 19:44:45 +0000"  >&lt;p&gt;The &quot;complete&quot; trace, i.e. the one that is 5.94 mb big is from after the upgrade to 2.1.5.&lt;/p&gt;</comment>
                    <comment id="17143" author="beberlei" created="Thu, 29 Dec 2011 15:32:02 +0000"  >&lt;p&gt;Can you disable the nested set extension? the other ticket uses it too and i want to rule out that its the extensions fault. &lt;/p&gt;</comment>
                    <comment id="17149" author="nenuial" created="Thu, 29 Dec 2011 22:14:24 +0000"  >&lt;p&gt;Alright. I deactivated the Tree extension, but there are no changes in the number of queries.&lt;/p&gt;</comment>
                    <comment id="17348" author="beberlei" created="Sat, 28 Jan 2012 11:19:12 +0000"  >&lt;p&gt;I found the issue.&lt;/p&gt;</comment>
                    <comment id="17349" author="beberlei" created="Sat, 28 Jan 2012 11:28:38 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="13320">DDC-1573</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                    <attachment id="11134" name="trace.txt" size="6229522" author="nenuial" created="Tue, 20 Dec 2011 11:30:21 +0000" />
                    <attachment id="11133" name="trace.txt" size="40737" author="nenuial" created="Mon, 19 Dec 2011 18:22:40 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1524] NamedQueries annotation doesn&apos;t work with just one NamedQuery</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1524</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;NamedQueries annotation doesn&apos;t work with just one NamedQuery &lt;/p&gt;

&lt;p&gt;the problem is locale in the class Doctrine\ORM\Mapping\Driver\AnnotationDriver line 179.&lt;/p&gt;

&lt;p&gt;Is needed validate if  var $namedQueriesAnnot-&amp;gt;value is an array before try perform foreach statement.&lt;/p&gt;

&lt;p&gt;Please I&apos;m sorry for my bad English.&lt;/p&gt;

&lt;p&gt;Thank you&lt;/p&gt;</description>
                <environment></environment>
            <key id="13248">DDC-1524</key>
            <summary>NamedQueries annotation doesn&apos;t work with just one NamedQuery</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="thiagojfg">Thiago Luiz Alves</reporter>
                        <labels>
                    </labels>
                <created>Fri, 9 Dec 2011 15:35:31 +0000</created>
                <updated>Sat, 17 Dec 2011 11:35:51 +0000</updated>
                    <resolved>Sat, 17 Dec 2011 11:35:51 +0000</resolved>
                            <version>2.1.3</version>
                                <fixVersion>2.2</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17002" author="beberlei" created="Thu, 15 Dec 2011 22:04:03 +0000"  >&lt;p&gt;Why dont you define the named queries as array? just @NamedQuery(&lt;/p&gt;
{...}
&lt;p&gt;) ?&lt;/p&gt;

&lt;p&gt;Also please consider attaching a diff of your patch, not the whole changed class.&lt;/p&gt;</comment>
                    <comment id="17009" author="beberlei" created="Sat, 17 Dec 2011 11:35:51 +0000"  >&lt;p&gt;Added better validations.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11126" name="AnnotationDriver.php" size="23319" author="thiagojfg" created="Fri, 9 Dec 2011 15:35:31 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1523] Coalesce() does not work with functions</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1523</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I wanted to use COALESCE in DQL with a function (e.g. CURRENT_TIMESTAMP()). If I run this DQL, I receive a syntax error exception like this one:&lt;/p&gt;

&lt;p&gt;montbook:marlow mprebio$ php scripts/doctrine.php orm:run-dql &quot;select COALESCE(CURRENT_TIMESTAMP()) from Project\Entity\User user&quot;&lt;/p&gt;

&lt;p&gt;  &lt;span class=&quot;error&quot;&gt;&amp;#91;Doctrine\ORM\Query\QueryException&amp;#93;&lt;/span&gt;                                                                    &lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;Syntax Error&amp;#93;&lt;/span&gt; line 0, col 33: Error: Expected Doctrine\ORM\Query\Lexer::T_CLOSE_PARENTHESIS, got &apos;(&apos;&lt;/p&gt;

&lt;p&gt;I&apos;ve traced this error to Doctrine\ORM\Parser::ScalarExpression() which tries to interpret the current_timestamp function as a SimpleArithmeticExpression or as a StateFieldPathExpression (first if). As far as I understand this part of the parser, the function call should lead to the if part with $this-&amp;gt;_isFunction(). Therefore I added a &quot;and !$this-&amp;gt;_isFunction()&quot; to the first if clause. After this change everything works as expected: The above query returns the current timestamp (many times because of the from since DQL needs a from part).&lt;/p&gt;

&lt;p&gt;Reordering the ifs should work too.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13247">DDC-1523</key>
            <summary>Coalesce() does not work with functions</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="bountin">Martin Prebio</reporter>
                        <labels>
                    </labels>
                <created>Fri, 9 Dec 2011 14:59:26 +0000</created>
                <updated>Sat, 10 Dec 2011 03:32:54 +0000</updated>
                    <resolved>Sat, 10 Dec 2011 03:32:54 +0000</resolved>
                            <version>2.1.4</version>
                                <fixVersion>2.2</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16957" author="bountin" created="Fri, 9 Dec 2011 15:04:02 +0000"  >&lt;p&gt;Also the documentation at &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.1/en/&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.1/en/&lt;/a&gt; only mentions COALESCE in the EBNF but not in the real documentation part. At first I thought that Doctrine doesn&apos;t support coalesce at all.&lt;/p&gt;</comment>
                    <comment id="16959" author="guilhermeblanco" created="Sat, 10 Dec 2011 03:32:54 +0000"  >&lt;p&gt;COALESCE does not exist on 2.1.&lt;br/&gt;
COALESCE is a 2.2-DEV, so use latest master.&lt;/p&gt;

&lt;p&gt;Marking as invalid, since we won&apos;t change 2.1 to support this.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1517] find/getReference break on invalid or missing identifier fields</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1517</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="13235">DDC-1517</key>
            <summary>find/getReference break on invalid or missing identifier fields</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 1 Dec 2011 20:18:05 +0000</created>
                <updated>Thu, 1 Dec 2011 20:42:58 +0000</updated>
                    <resolved>Thu, 1 Dec 2011 20:42:58 +0000</resolved>
                            <version>2.1.4</version>
                                <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1508] ClassMetadataBuilder only accepts ClassMetadata not *Info</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1508</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="13213">DDC-1508</key>
            <summary>ClassMetadataBuilder only accepts ClassMetadata not *Info</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 23 Nov 2011 13:51:33 +0000</created>
                <updated>Fri, 9 Dec 2011 05:05:04 +0000</updated>
                    <resolved>Fri, 9 Dec 2011 05:05:04 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16955" author="guilhermeblanco" created="Fri, 9 Dec 2011 05:05:04 +0000"  >&lt;p&gt;Fixed since &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/0febf0611439e05abbb1bf4b4e9668f7ad125c67&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/0febf0611439e05abbb1bf4b4e9668f7ad125c67&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1503] Add support for executing custom SQL functions on custom types</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1503</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have created a custom type called point but need a way to have a function called on columns of this type when fetching / updating / inserting entities. &lt;/p&gt;

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

&lt;p&gt;Consider I have an entity which has a column called the_geom&lt;/p&gt;

&lt;p&gt;This is associated with my custom type point&lt;/p&gt;

&lt;p&gt;A basic select statement for this entity is as follows:&lt;/p&gt;

&lt;p&gt;SELECT id, name, the_geom FROM points where id = 1&lt;/p&gt;

&lt;p&gt;The problem is the_geom is encoded and on the PHP side I want it in human readable form. I would like a way to specify custom functions on SELECT / INSERT / UPDATE for columns of this custom type.&lt;/p&gt;

&lt;p&gt;When selecting my entity I would like to execute the function ST_AsText(the_geom)&lt;/p&gt;

&lt;p&gt;SELECT id, ST_AsText(the_geom) FROM points where id = 1&lt;/p&gt;

&lt;p&gt;The same goes for updates and inserts. I would like to surround the column SQL with other custom functions, to encode my human readable text back to the encoded value for the DB.&lt;/p&gt;

&lt;p&gt;Possibly this could be integrated into Doctrine\DBAL\Types\Type ?&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;// Modify the column SQL &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; insert
&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getSqlInsertColumn(....)
&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;&lt;span class=&quot;code-comment&quot;&gt;// Modify the column SQL &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; update
&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getSqlUpdateColumn(....)
&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;&lt;span class=&quot;code-comment&quot;&gt;// Modify the column SQL &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; select
&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getSqlSelectColumn(....)
&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;&lt;span class=&quot;code-comment&quot;&gt;// A possible example of getSqlSelectColumn(...)
&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getSqlSelectColumn($doctrineSql)
{
    &lt;span class=&quot;code-comment&quot;&gt;// $doctrineSql == &lt;span class=&quot;code-quote&quot;&gt;&quot;p0_.the_geom&quot;&lt;/span&gt;
&lt;/span&gt;    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &apos;ST_AsText(&apos; . $doctrineSql . &apos;)&apos;;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="11436">DDC-1503</key>
            <summary>Add support for executing custom SQL functions on custom types</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="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="dylan">Dylan Arnold</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 Jun 2010 06:41:03 +0000</created>
                <updated>Fri, 9 Mar 2012 16:27:00 +0000</updated>
                    <resolved>Mon, 21 Nov 2011 20:45:32 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>6</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="13099" author="beberlei" created="Fri, 4 Jun 2010 03:19:23 +0000"  >&lt;p&gt;You can only fetch entities using the normalized value of any field, that means you have to find a common transformation that is saved in your entities and then converted on the fly.&lt;/p&gt;

&lt;p&gt;There is a default converting method from database to PHP and back you could use, however this is only in one direction. You could define a class for the Point and convert from and to this Call in your Type. This way you could encapsualte all the converting logic in an object and your entities only use the object.&lt;/p&gt;

&lt;p&gt;You can extend DQL to have additional queries, however when you select additional fields in DQL and apply a function to them, they are retrieved as scalar and not inside your entity. How to do this is detailed in the  manual and the cookbook.&lt;/p&gt;</comment>
                    <comment id="13100" author="beberlei" created="Fri, 4 Jun 2010 03:19:49 +0000"  >&lt;p&gt;Closed, there are already extension points that help with this matter-&lt;/p&gt;</comment>
                    <comment id="13102" author="dylan" created="Fri, 4 Jun 2010 04:35:53 +0000"  >&lt;p&gt;Hi Benjamin.&lt;/p&gt;

&lt;p&gt;Thanks for your response. &lt;/p&gt;

&lt;p&gt;I don&apos;t fully understand what you mean. As far as I can tell this is a specific use case that is not supported by doctrine.&lt;/p&gt;

&lt;p&gt;What I have tried is creating an entity that contains a field named $point. This is of my custom type PointType which extends Doctrine\Dbal\Types\Type&lt;/p&gt;

&lt;p&gt;In this method I intended to create my own Geometry\Point object by parsing a human readable value returned from the database and seamlessly converting to and from this value in convertToDatabaseValue($value, AbstractPlatform $platform) and convertToPHPValue($value, AbstractPlatform $platform)&lt;/p&gt;

&lt;p&gt;The problem is that the column is in binary format and I need the database to decode it for me.&lt;/p&gt;

&lt;p&gt;I also understand about extending DQL to use custom functions. If I went down this route, every time I fetch my entities, I would have to do an extra step to parse the scalar. Suddenly my domain logic is not encapsulated within my entity and I have a feeling this could end up being messy.&lt;/p&gt;

&lt;p&gt;There is also another possibility as far as I can tell, using a NativeQuery, however this would mean that every time I fetch an entity I would have to do field mapping, and any time I didn&apos;t map the field to a function my entity would fail to decode the point and break, this route would also mean a lot of extra coding and care.&lt;/p&gt;

&lt;p&gt;I am happy to accept that this use case may not be useful to a large portion of doctrine users and therefore may not be a justified addition to doctrine. I do however believe that this is a feature that would be nice to have, and others will miss it in the future, particularly in postgis integration.&lt;/p&gt;

&lt;p&gt;Doctrine already has custom DQL and custom types. As a new user my opinion is that there is definitely some room for some advanced functionality in this area. However, you guys are the core devs, you understand the project and its internals so if this is a feature that should be left out then so be it. (I may just have to look into my own hack).&lt;/p&gt;

&lt;p&gt;Kind regards&lt;/p&gt;</comment>
                    <comment id="13571" author="beberlei" created="Mon, 12 Jul 2010 12:24:11 +0000"  >&lt;p&gt;Re-opened, although this might possibly be a better ORM than DBAL extension. We have to re-evaluate this for 2.1&lt;/p&gt;</comment>
                    <comment id="14419" author="beberlei" created="Mon, 20 Sep 2010 07:44:36 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DBAL-53&quot; title=&quot;Missing convertToDatabase-calls when loading and persisting entities&quot;&gt;&lt;del&gt;DBAL-53&lt;/del&gt;&lt;/a&gt; highlightes a possible problem, how to handle foreign keys in this regard?&lt;/p&gt;</comment>
                    <comment id="15012" author="beberlei" created="Fri, 24 Dec 2010 05:53:43 +0000"  >&lt;p&gt;Idea: For each type, wrap the column in a possible conversion snippet:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;class Type
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function convertToDatabaseValueSQL($sqlExpr, $platform)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $sqlExpr;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function convertToPHPValueSQL($sqlExpr, $platform)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $sqlExpr;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;class IPAddress &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Type
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function convertToDatabaseValueSQL($sqlExpr, $platform)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-quote&quot;&gt;&quot;INET_ATON($sqlExpr)&quot;&lt;/span&gt;;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function convertToPHPValueSQL($sqlExpr, $platform)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-quote&quot;&gt;&quot;INET_PTON($sqlExpr)&quot;&lt;/span&gt;;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Conversion inside the ORM would take place at the following locations:&lt;/p&gt;

&lt;p&gt;1. When generating SELECT SQL inside the persister, use the conversion in the SELECT clause.&lt;br/&gt;
2. When generating SELECT SQL from a DQL, use conversion in the SELECT clause.&lt;br/&gt;
3. When updating an entity inside the persister use this in the SET clause and WHERE clause for the ID.&lt;br/&gt;
4. When inserting an entity inside the persister use this in the VALUES clause.&lt;/p&gt;

&lt;p&gt;Open questions:&lt;/p&gt;

&lt;p&gt;1. Should conversion also be done for occurances in any other clauses other than SELECT?&lt;br/&gt;
2. Can we bear the performance impact of this on SQL generation.&lt;/p&gt;</comment>
                    <comment id="15013" author="beberlei" created="Fri, 24 Dec 2010 06:00:28 +0000"  >&lt;p&gt;Acttually thinking about it. It has to be everywhere when 3 is necessary (and DELETE WHERE also needs this) then of course the values should be converted for SELECT clauses WHERE also.&lt;/p&gt;

&lt;p&gt;One Exception might be JOIN clauses WHERE its better to have:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;a.foo = b.foo
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;vs&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;FUNC(a.foo) = FUNC(b.foo)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="15485" author="beberlei" created="Thu, 10 Mar 2011 03:37:29 +0000"  >&lt;p&gt;I think we can optimize the performance of this considerably in the ORM by adding a field option &quot;requiresSQLConversion&quot; that is only set if a boolean method &quot;requiresSQLConversion()&quot; on the type returns true. This method gets a default implementation in abstract type 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;public&lt;/span&gt; function requiresSQLConversion()
{
  &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Every complex type would need to overwrite this method.&lt;/p&gt;

&lt;p&gt;Then inside ORM we would only need to check if (isset($field&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;requiresSQLConversion&amp;#39;&amp;#93;&lt;/span&gt;)) to determine if we have to modify the SQL or not. Also caching structure would only grow by this option if the variable is actually true.&lt;/p&gt;</comment>
                    <comment id="15801" author="lstrojny" created="Mon, 2 May 2011 21:40:24 +0000"  >&lt;p&gt;As &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DBAL-53&quot; title=&quot;Missing convertToDatabase-calls when loading and persisting entities&quot;&gt;&lt;del&gt;DBAL-53&lt;/del&gt;&lt;/a&gt; has been closed as a duplicate of this one, I&apos;m attaching our patches to make type conversion work&lt;/p&gt;</comment>
                    <comment id="15860" author="beberlei" created="Sun, 15 May 2011 17:55:20 +0000"  >&lt;p&gt;Thanks Lars, this is something else what i would implement though.&lt;/p&gt;

&lt;p&gt;This ticket gets high priority for 2.2, i will implement and check in directly after 2.1 will be released end of next month.&lt;/p&gt;</comment>
                    <comment id="16582" author="benjamin" created="Fri, 14 Oct 2011 17:39:34 +0000"  >&lt;p&gt;Added a missing type hint in DBAL\Types\Type.php&lt;/p&gt;

&lt;p&gt;Will this feature be implemented soon? convertToDatabaseValueSQL() and convertToPHPValueSQL() are not used anywhere yet...&lt;/p&gt;</comment>
                    <comment id="16903" author="beberlei" created="Mon, 21 Nov 2011 20:45:32 +0000"  >&lt;p&gt;Implemented.&lt;/p&gt;</comment>
                    <comment id="17543" author="benjamin" created="Fri, 9 Mar 2012 16:27:00 +0000"  >&lt;p&gt;What about the missing type hint on convertToPHPValueSQL() ?&lt;/p&gt;

&lt;p&gt;Is there a reason for the inconsistency in these method declarations:&lt;/p&gt;

&lt;p&gt;public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform)&lt;br/&gt;
public function convertToPHPValueSQL($sqlExpr, $platform)&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="11926">DBAL-53</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                    <attachment id="10980" name="022-doctrine-basic-entity-persister.diff" size="4752" author="lstrojny" created="Mon, 2 May 2011 21:39:19 +0000" />
                    <attachment id="10981" name="024-doctrine-many-to-many-persister.diff" size="2952" author="lstrojny" created="Mon, 2 May 2011 21:39:19 +0000" />
                    <attachment id="10982" name="025-doctrine-unit-of-work.diff" size="2408" author="lstrojny" created="Mon, 2 May 2011 21:39:19 +0000" />
                    <attachment id="10983" name="029-doctrine-query.diff" size="1154" author="lstrojny" created="Mon, 2 May 2011 21:40:24 +0000" />
                    <attachment id="11072" name="doctrine-type.diff" size="423" author="benjamin" created="Fri, 14 Oct 2011 17:39:34 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1502] SQLite should eat prefixed tables (since they dont exist)</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1502</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;People use schema or many databases, however SQLite does not support the foo.bar syntax, so there is no way to run the tests in sqlite memory against these setups.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13208">DDC-1502</key>
            <summary>SQLite should eat prefixed tables (since they dont 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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 21 Nov 2011 20:32:52 +0000</created>
                <updated>Mon, 21 Nov 2011 21:08:06 +0000</updated>
                    <resolved>Mon, 21 Nov 2011 21:08:06 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16904" author="beberlei" created="Mon, 21 Nov 2011 21:08:06 +0000"  >&lt;p&gt;Implemented&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1492] Fatall error: Cannot use object as array in ORM\Internal\Hydration\ObjectHydrator.php on line 314</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1492</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;My entities&lt;/p&gt;

&lt;p&gt;event &lt;br/&gt;
eveht.event_area_id=event_area.id (1:1)&lt;br/&gt;
event_area.event_id=event.id (1:1)&lt;br/&gt;
event_area.area.id=area.id (one area has many event_area&apos;s)&lt;br/&gt;
area.parent_id=area_id (hierarchial)&lt;br/&gt;
event.author_id=user.id (one user has many events)&lt;/p&gt;

&lt;p&gt;area - STI: District/City/Region/Country/etc.&lt;/p&gt;

&lt;div class=&quot;code panel&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
	r, ra, a, ap, au, DATE(r.eventTime) AS event_date
FROM OloloEventsBundle:Event r
	LEFT JOIN r.eventArea ra
		LEFT JOIN ra.area a
			LEFT JOIN a.parent ap
	INNER JOIN r.author au WHERE r.eventTime &amp;lt;= :r_eventtime AND ra.area IN(:ra_area)
GROUP BY r
ORDER BY event_date DESC
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This DQL caused an error &quot;Cannot use object of type District as array in ORM\Internal\Hydration\ObjectHydrator.php on line 314&quot;. When I&apos;m removing `ap` friom fetching - it works. Mapping are correct - there are many other places where it works correctly.&lt;/p&gt;</description>
                <environment>Symfony2, Doctrine 2.1.1 (also bug present on 2.1.3-dev - latest revison of 2.1.x branch)</environment>
            <key id="13184">DDC-1492</key>
            <summary>Fatall error: Cannot use object as array in ORM\Internal\Hydration\ObjectHydrator.php on line 314</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/blocker.png">Blocker</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="koc">Konstantin</reporter>
                        <labels>
                    </labels>
                <created>Sun, 13 Nov 2011 21:51:04 +0000</created>
                <updated>Tue, 15 Nov 2011 03:10:16 +0000</updated>
                    <resolved>Tue, 15 Nov 2011 03:10:16 +0000</resolved>
                            <version>2.1.1</version>
                                <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16813" author="beberlei" created="Sun, 13 Nov 2011 22:23:08 +0000"  >&lt;p&gt;On 2.1.1 line 314 is a &quot;}&quot;. Can you restate the line and add a stack trace if possible (xdebug or phpunit can help there).&lt;/p&gt;</comment>
                    <comment id="16814" author="koc" created="Sun, 13 Nov 2011 22:33:33 +0000"  >&lt;p&gt;Sorry, line was changed cause I&apos;ve updated to 2.1.3-dev.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;( ! ) Fatal error: Cannot use object of type Ololo\Bundle\TerritorialBundle\Entity\District as array in Z:\home\dev\Ololo\code\vendors\Doctrine\Orm\lib\Doctrine\ORM\Internal\Hydration\ObjectHydrator.php on line 308
Call Stack
#	Time	Memory	Function	Location
1	0.0006	333520	{main}( )	..\index_dev.php:0
2	0.0254	1435584	Symfony\Component\HttpKernel\Kernel-&amp;gt;handle( )	..\index_dev.php:20
3	0.2454	3634168	Symfony\Bundle\FrameworkBundle\HttpKernel-&amp;gt;handle( )	..\Kernel.php:171
4	0.2454	3634576	Symfony\Component\HttpKernel\HttpKernel-&amp;gt;handle( )	..\HttpKernel.php:44
5	0.2454	3634576	Symfony\Component\HttpKernel\HttpKernel-&amp;gt;handleRaw( )	..\HttpKernel.php:71
6	0.3589	5534264	call_user_func_array ( )	..\HttpKernel.php:117
7	0.3590	5534448	Ololo\Bundle\DistrictsBundle\Controller\DistrictController-&amp;gt;EventsPastAction( )	..\HttpKernel.php:0
8	1.1606	13782464	Ololo\Bundle\EventsBundle\Entity\EventRepository-&amp;gt;getPastEventsByAreasIds( )	..\DistrictController.php:145
9	1.1607	13783520	Ololo\Bundle\EventsBundle\Entity\EventRepository-&amp;gt;getEventsSliceBySpecification( )	..\EventRepository.php:385
10	1.2010	14224216	Doctrine\ORM\AbstractQuery-&amp;gt;getResult( )	..\EventRepository.php:477
11	1.2010	14224368	Doctrine\ORM\AbstractQuery-&amp;gt;execute( )	..\AbstractQuery.php:392
12	3.3409	14781264	Doctrine\ORM\Internal\Hydration\AbstractHydrator-&amp;gt;hydrateAll( )	..\AbstractQuery.php:594
13	3.3412	14785824	Doctrine\ORM\Internal\Hydration\ObjectHydrator-&amp;gt;_hydrateAll( )	..\AbstractHydrator.php:99
14	3.3413	14798576	Doctrine\ORM\Internal\Hydration\ObjectHydrator-&amp;gt;_hydrateRow( )	..\ObjectHydrator.php:140
&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;                    $parentObject = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_resultPointers[$parentAlias][key($first)]; &lt;span class=&quot;code-comment&quot;&gt;// trouble here, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_resultPointers[$parentAlias] is object of District&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="16818" author="guilhermeblanco" created="Mon, 14 Nov 2011 04:15:21 +0000"  >&lt;p&gt;Hi.&lt;/p&gt;

&lt;p&gt;If you change this line:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$parentObject = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_resultPointers[$parentAlias][key($first)];
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To 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;$parentObject = $first[key($first)];
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Does it work for you?&lt;/p&gt;</comment>
                    <comment id="16819" author="koc" created="Mon, 14 Nov 2011 08:53:21 +0000"  >&lt;p&gt;yes, with this line of code this query works.&lt;/p&gt;</comment>
                    <comment id="16831" author="guilhermeblanco" created="Tue, 15 Nov 2011 03:10:16 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/77e076f1fdbe24fdb2f5a1fb1842c0b9cb7d95a4&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/77e076f1fdbe24fdb2f5a1fb1842c0b9cb7d95a4&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This issue was fixed in master.&lt;br/&gt;
I requested Benjamin to merge this with 2.1 branch.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1491] Bug in SchemaValidator diffing join columns</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1491</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="13181">DDC-1491</key>
            <summary>Bug in SchemaValidator diffing join columns</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 13 Nov 2011 14:40:44 +0000</created>
                <updated>Sun, 13 Nov 2011 14:48:02 +0000</updated>
                    <resolved>Sun, 13 Nov 2011 14:48:02 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16800" author="beberlei" created="Sun, 13 Nov 2011 14:48:02 +0000"  >&lt;p&gt;Fixed in 2.2-dev as its only relevant in an error message displaying&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1490] Generated Ids with Sequence/Auto Increment Generators not always casted to int</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1490</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The Id Generators don&apos;t necessarily cast ids to integer values when generating them.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13180">DDC-1490</key>
            <summary>Generated Ids with Sequence/Auto Increment Generators not always casted to int</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 13 Nov 2011 14:35:41 +0000</created>
                <updated>Sun, 13 Nov 2011 14:48:28 +0000</updated>
                    <resolved>Sun, 13 Nov 2011 14:48:28 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16801" author="beberlei" created="Sun, 13 Nov 2011 14:48:28 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1482] GH-160: Allow to unset one-to-one relation with generated class</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1482</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/160&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/160&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Added &amp;lt;variableDefault&amp;gt; on generated class. &lt;br/&gt;
This generate methods like:&lt;br/&gt;
```function setGroup(Group $group = null){&lt;br/&gt;
}&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;that allow to remove &quot;Group&quot; association if the relation is one-to-one.&lt;/p&gt;

&lt;p&gt;Plus some indentation issue&lt;/p&gt;</description>
                <environment></environment>
            <key id="13161">DDC-1482</key>
            <summary>GH-160: Allow to unset one-to-one relation with generated class</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</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:49:07 +0000</created>
                <updated>Thu, 7 Jun 2012 13:54:18 +0000</updated>
                    <resolved>Sun, 13 Nov 2011 15:56:57 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16804" author="beberlei" created="Sun, 13 Nov 2011 15:56:57 +0000"  >&lt;p&gt;Merged&lt;/p&gt;</comment>
                    <comment id="18048" author="beberlei" created="Thu, 7 Jun 2012 08:50:50 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-160&amp;#93;&lt;/span&gt; was opened&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/dbal/pull/160&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/160&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18050" author="beberlei" created="Thu, 7 Jun 2012 13:54:18 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-160&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/dbal/pull/160&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/160&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1481] GH-158: Collapsed cascade elements, if cascade-all.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1481</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/158&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/158&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Collapsed cascade elements, if cascade-all.&lt;br/&gt;
(better readability for generated xml)&lt;/p&gt;</description>
                <environment></environment>
            <key id="13160">DDC-1481</key>
            <summary>GH-158: Collapsed cascade elements, if cascade-all.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</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:47:58 +0000</created>
                <updated>Wed, 6 Jun 2012 14:39:15 +0000</updated>
                    <resolved>Fri, 18 Nov 2011 14:50:09 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16864" author="beberlei" created="Fri, 18 Nov 2011 14:50:09 +0000"  >&lt;p&gt;implemented&lt;/p&gt;</comment>
                    <comment id="18045" author="beberlei" created="Wed, 6 Jun 2012 14:39:15 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-158&amp;#93;&lt;/span&gt; was opened&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/dbal/pull/158&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/158&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1479] GH-169: preFlush event and lifecycle callback</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1479</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/169&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/169&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For now, we have `@PrePersist`, `@PreUpdate` and `@PreRemove` callbacks. But it&apos;s not enough, cuz in some cases we need to run some entity method just before *&lt;b&gt;every&lt;/b&gt;* `EntityManager#flush()` call (examples - translatable behavior and file uploading routines).&lt;/p&gt;

&lt;p&gt;I&apos;ve added and tested new `@PreFlush` event, which occurs during the start of the `EntityManager#flush()`, before any changeset gets calculated. This gives users ability to hook into flush process and prepare their entities to save even if they were not changed.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13158">DDC-1479</key>
            <summary>GH-169: preFlush event and lifecycle callback</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</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:43:48 +0000</created>
                <updated>Tue, 10 Jul 2012 03:41:48 +0000</updated>
                    <resolved>Sun, 13 Nov 2011 15:52:36 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16803" author="beberlei" created="Sun, 13 Nov 2011 15:52:36 +0000"  >&lt;p&gt;Merged into master&lt;/p&gt;</comment>
                    <comment id="18271" author="beberlei" created="Mon, 9 Jul 2012 22:53:08 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-169&amp;#93;&lt;/span&gt; was opened&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/dbal/pull/169&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/169&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18272" author="beberlei" created="Tue, 10 Jul 2012 03:41:48 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-169&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/dbal/pull/169&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/169&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1478] GH-175: added EntityRepository::getClassName()</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1478</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/175&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/175&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;added EntityRepository::getClassName() to fullfill the ObjectRepository interface&lt;/p&gt;

&lt;p&gt;see &lt;a href=&quot;https://github.com/doctrine/common/pull/70&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/pull/70&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13157">DDC-1478</key>
            <summary>GH-175: added EntityRepository::getClassName()</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</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:43:47 +0000</created>
                <updated>Sun, 13 Nov 2011 15:58:15 +0000</updated>
                    <resolved>Sun, 13 Nov 2011 15:58:15 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16805" author="beberlei" created="Sun, 13 Nov 2011 15:58:15 +0000"  >&lt;p&gt;Merged&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1476] Yaml Driver doesn&apos;t default field types to string</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1476</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Doctrine documentation states that a field default value is a string.&lt;br/&gt;
The annotation driver behaves so but the Yaml driver doesn&apos;t.&lt;/p&gt;

&lt;p&gt;The Yaml driver requires that a field is set a type explicitly. &lt;/p&gt;

&lt;p&gt;Why is this different among drivers and what is the actual default behaviour?&lt;/p&gt;</description>
                <environment>All</environment>
            <key id="13155">DDC-1476</key>
            <summary>Yaml Driver doesn&apos;t default field types to string</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="antitoxic">Anton Stoychev</reporter>
                        <labels>
                    </labels>
                <created>Tue, 8 Nov 2011 11:32:04 +0000</created>
                <updated>Mon, 14 Nov 2011 18:31:39 +0000</updated>
                    <resolved>Mon, 14 Nov 2011 18:31:39 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16821" author="beberlei" created="Mon, 14 Nov 2011 18:31:39 +0000"  >&lt;p&gt;Merged&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1472] WHERE &lt;&lt;function&gt;&gt; IN ... doesn&apos;t work</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1472</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have a query which is supposed to compare a result of a user defined function with a set of possible results&lt;br/&gt;
SELECT ... WHERE YEAR(w.date) IN (.......)&lt;/p&gt;

&lt;p&gt;But I get the error:&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;Syntax Error&amp;#93;&lt;/span&gt; line 0, col 49: Error: Expected Doctrine\ORM\Query\Lexer::T_IN, got &apos;(&apos; &lt;/p&gt;

&lt;p&gt;If I only compare the result of the function with a single value everything works as aspected:&lt;br/&gt;
SELECT ... WHERE YEAR(w.date) = 2011&lt;br/&gt;
.. works!&lt;/p&gt;

&lt;p&gt;I also testet it with other functions like DATE_DIFF, etc. but always get the same error.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13151">DDC-1472</key>
            <summary>WHERE &lt;&lt;function&gt;&gt; IN ... doesn&apos;t work</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="cevou">Christoph Kr&#228;mer</reporter>
                        <labels>
                    </labels>
                <created>Sun, 6 Nov 2011 13:40:55 +0000</created>
                <updated>Sun, 4 Dec 2011 07:43:12 +0000</updated>
                    <resolved>Sun, 4 Dec 2011 07:43:12 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16946" author="guilhermeblanco" created="Sun, 4 Dec 2011 07:43:12 +0000"  >&lt;p&gt;Fixed in master since this commit: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/0380d5ae580dcbefd63051028fc1ab78599fda6c&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/0380d5ae580dcbefd63051028fc1ab78599fda6c&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1468] Exception verbose: Id in a mapped-superclass</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1468</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Some exception could/should be more precise (I&apos;ve lost a lot of time figuring out why I was having an error)&lt;/p&gt;

&lt;p&gt;When you have an id field inside a mapped-superclass, you get the following exception:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;ErrorException&amp;#93;&lt;/span&gt;                                                                                                                                                                              &lt;br/&gt;
  Notice: Undefined index: IdealTech\OnlineSystem\GeoBundle\Entity\AbsAddress in /Users/fmazerolle/Sites/it/os/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php line 121&lt;/p&gt;

&lt;p&gt;The exception should be more verbose and tell the real cause of the error.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13147">DDC-1468</key>
            <summary>Exception verbose: Id in a mapped-superclass</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="fmaz008">Francois Mazerolle</reporter>
                        <labels>
                    </labels>
                <created>Fri, 4 Nov 2011 13:36:17 +0000</created>
                <updated>Mon, 19 Dec 2011 03:21:22 +0000</updated>
                    <resolved>Mon, 19 Dec 2011 03:21:22 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16992" author="beberlei" created="Thu, 15 Dec 2011 19:15:04 +0000"  >&lt;p&gt;This issue is referenced in Github Pull-Request GH-219&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/219&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/219&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17034" author="beberlei" created="Mon, 19 Dec 2011 03:21:08 +0000"  >&lt;p&gt;Related Pull Request was closed: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/219&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/219&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17035" author="guilhermeblanco" created="Mon, 19 Dec 2011 03:21:22 +0000"  >&lt;p&gt;Fixed in &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/f6d9344d892e5e959b4474437258b02777b41eb1&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/f6d9344d892e5e959b4474437258b02777b41eb1&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1463] Inner join eagerly loaded entities if possible</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1463</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="13139">DDC-1463</key>
            <summary>Inner join eagerly loaded entities if possible</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="asm89">Alexander</reporter>
                        <labels>
                    </labels>
                <created>Mon, 31 Oct 2011 21:14:57 +0000</created>
                <updated>Mon, 31 Oct 2011 21:25:09 +0000</updated>
                    <resolved>Mon, 31 Oct 2011 21:25:09 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16753" author="beberlei" created="Mon, 31 Oct 2011 21:25:09 +0000"  >&lt;p&gt;Merged&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1461] Possible Regression with OneToOne relation</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1461</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have the following relations:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
namespace Model;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity(repositoryClass=&lt;span class=&quot;code-quote&quot;&gt;&quot;Model\Repository\UserRepository&quot;&lt;/span&gt;)
 * @ORM\ChangeTrackingPolicy(&lt;span class=&quot;code-quote&quot;&gt;&quot;DEFERRED_EXPLICIT&quot;&lt;/span&gt;)
 * @ORM\HasLifecycleCallbacks
 * @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;users&quot;&lt;/span&gt;)
 */
class User
{
    /**
     * @ORM\OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Model\TwitterAccount&quot;&lt;/span&gt;, orphanRemoval=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;EAGER&quot;&lt;/span&gt;, cascade = {&lt;span class=&quot;code-quote&quot;&gt;&quot;persist&quot;&lt;/span&gt;}, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;user&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; TwitterAccount
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $twitterAccount;
}

/**
 * @ORM\Entity(repositoryClass = &lt;span class=&quot;code-quote&quot;&gt;&quot;Model\Repository\TwitterAccountRepository&quot;&lt;/span&gt;)
 * @ORM\Table(name = &lt;span class=&quot;code-quote&quot;&gt;&quot;twitter_accounts&quot;&lt;/span&gt;)
 * @ORM\ChangeTrackingPolicy(&lt;span class=&quot;code-quote&quot;&gt;&quot;DEFERRED_EXPLICIT&quot;&lt;/span&gt;)
 */
class TwitterAccount
{
    /**
     * @ORM\Id
     * @ORM\GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;AUTO&quot;&lt;/span&gt;)
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;

    /**
     * @ORM\OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Model\User&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;EAGER&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $user;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;now when I add a new account, the user-side is not updated with the id of the account, but the account is still saved to the database.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$twitterAccount = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; TwitterAccount();
$user-&amp;gt;setTwitterAccount($twitterAccount);
$em-&amp;gt;persist($user);
$em-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The twitterAccount_id of the users table is empty, but the new account is added to the &quot;twitter_accounts&quot; table with the correct user_id.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13135">DDC-1461</key>
            <summary>Possible Regression with OneToOne relation</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="johannes">Johannes Schmitt</reporter>
                        <labels>
                    </labels>
                <created>Mon, 31 Oct 2011 11:35:28 +0000</created>
                <updated>Sun, 13 Nov 2011 22:15:35 +0000</updated>
                    <resolved>Sun, 13 Nov 2011 22:15:35 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16742" author="beberlei" created="Mon, 31 Oct 2011 15:55:53 +0000"  >&lt;p&gt;Do you know when this started to happen ?&lt;/p&gt;</comment>
                    <comment id="16743" author="johannes" created="Mon, 31 Oct 2011 16:27:34 +0000"  >&lt;p&gt;I have reverted some commits of the ORM, but it doesn&apos;t seem to have happened recently, or it is a combination of different changes in one of the repositories.&lt;/p&gt;

&lt;p&gt;What&apos;s weird is that the error does not occur when the user is new, but only if it already exists. It seems like somehow the UOW does not detect that it has changed.&lt;/p&gt;</comment>
                    <comment id="16810" author="beberlei" created="Sun, 13 Nov 2011 21:57:24 +0000"  >&lt;p&gt;This is deferred explicit related it seems.&lt;/p&gt;</comment>
                    <comment id="16811" author="beberlei" created="Sun, 13 Nov 2011 21:59:44 +0000"  >&lt;p&gt;Verified&lt;/p&gt;</comment>
                    <comment id="16812" author="beberlei" created="Sun, 13 Nov 2011 22:15:35 +0000"  >&lt;p&gt;Hm no, it works for me.&lt;/p&gt;

&lt;p&gt;See &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/e8eda4aeae3a24c52a0b69d01946b93c5a9cba27&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/e8eda4aeae3a24c52a0b69d01946b93c5a9cba27&lt;/a&gt; and reopen if you can make it fail.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
            <subtask id="13211">DDC-1506</subtask>
        </subtasks>
        </item>

<item>
            <title>[DDC-1458] Issue with tracking entity changes</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1458</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Flushing at point #2 has no effect (outputs int(1)), flushing at point #1 works as expected (outputs int(5)).&lt;br/&gt;
this issue comes only when i trying to set boolean value on managed assotiated entity&lt;/p&gt;

&lt;p&gt;upd. same issue with datetime properties&lt;/p&gt;

&lt;div class=&quot;code panel&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
 */
class TestEntity
{
    /**
     * @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\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; $value;
    /**
     * @ORM\OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;TestAdditionalEntity&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;entity&quot;&lt;/span&gt;, orphanRemoval=&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;&quot;&lt;/span&gt;, cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;persist&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;remove&quot;&lt;/span&gt;})
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $additional;
}

/**
 * @ORM\Entity
 */
class TestAdditionalEntity
{
    /**
     * @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\OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;TestEntity&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;additional&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $entity;
    /**
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-object&quot;&gt;boolean&lt;/span&gt;&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $bool;
    
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __construct()
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;bool = &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;
    }
}

$test = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \TestEntity();
$test-&amp;gt;setValue(1);
$test-&amp;gt;setAdditional(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \TestAdditionalEntity());

$em-&amp;gt;persist($test);
$em-&amp;gt;flush();
$em-&amp;gt;clear();

$test = $em-&amp;gt;getRepository(&apos;Bundle:TestEntity&apos;)-&amp;gt;find(1);
$test-&amp;gt;setValue(5);

&lt;span class=&quot;code-comment&quot;&gt;// point #1
&lt;/span&gt;$test-&amp;gt;getAdditional()-&amp;gt;setBool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;);
&lt;span class=&quot;code-comment&quot;&gt;// point #2
&lt;/span&gt;
$em-&amp;gt;flush();

var_dump($test-&amp;gt;getValue());
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>linux/ubuntu, nginx, php-cgi, symfony framework</environment>
            <key id="13130">DDC-1458</key>
            <summary>Issue with tracking entity changes</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="asm89">Alexander</assignee>
                                <reporter username="n3b">Maxim</reporter>
                        <labels>
                    </labels>
                <created>Fri, 28 Oct 2011 23:56:56 +0000</created>
                <updated>Fri, 11 Nov 2011 07:20:15 +0000</updated>
                    <resolved>Thu, 10 Nov 2011 15:21:24 +0000</resolved>
                            <version>2.1</version>
                <version>2.1.2</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16777" author="asm89" created="Tue, 8 Nov 2011 21:20:28 +0000"  >&lt;p&gt;Looking into this.&lt;/p&gt;</comment>
                    <comment id="16787" author="beberlei" created="Wed, 9 Nov 2011 20:41:46 +0000"  >&lt;p&gt;formatting&lt;/p&gt;</comment>
                    <comment id="16789" author="asm89" created="Thu, 10 Nov 2011 15:21:24 +0000"  >&lt;p&gt;Fixed in master:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/187&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/187&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="16790" author="beberlei" created="Fri, 11 Nov 2011 07:20:14 +0000"  >&lt;p&gt;Merged into 2.1.x&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1457] Wrong return annotation for UnitOfWork::getEntityPersister() method</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1457</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It is &lt;/p&gt;

&lt;div class=&quot;code panel&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;return&lt;/span&gt; Doctrine\ORM\Persisters\AbstractEntityPersister
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;should be (I suppose)&lt;/p&gt;

&lt;div class=&quot;code panel&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;return&lt;/span&gt; \Doctrine\ORM\Persisters\BasicEntityPersister
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;@&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; Persisters\BasicEntityPersister
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13129">DDC-1457</key>
            <summary>Wrong return annotation for UnitOfWork::getEntityPersister() method</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="gedrox">Aigars Gedroics</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Oct 2011 15:09:23 +0000</created>
                <updated>Sun, 4 Dec 2011 07:15:33 +0000</updated>
                    <resolved>Sun, 4 Dec 2011 07:15:33 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.2</fixVersion>
                                <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16943" author="guilhermeblanco" created="Sun, 4 Dec 2011 07:15:33 +0000"  >&lt;p&gt;Fixed in trunk&lt;/p&gt;

&lt;p&gt;Commit ref: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/a26990c3e8693134a2789c4c7c57d6f053f01fcf&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/a26990c3e8693134a2789c4c7c57d6f053f01fcf&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1456] Sequence doesn&apos;t work correctly when sequence is defined second in a composite key</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1456</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When using a sequence in Oracle as part of a composite key and the sequence is defined second, Doctrine retrieves from the sequence correctly but incorrectly assigns to the first key (which in this case is not the correct column)&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;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;/Entity/ItemModel.php&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * @Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;submission_id&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
 * @Id
 */
&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $submissionId;

/**
 * @Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;model_id&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
 * @Id
 * @GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;AUTO&quot;&lt;/span&gt;)
 * @SequenceGenerator(sequenceName=&lt;span class=&quot;code-quote&quot;&gt;&quot;model_id_seq&quot;&lt;/span&gt;, initialValue=1, allocationSize=1)
 */
&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $modelId;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Doctrine correctly retrieves the sequence, however it then attempts to set the first identifier field (in this case submission_id) instead of the sequence key.&lt;/p&gt;

&lt;p&gt;The problem appears in &lt;tt&gt;/Doctrine/ORM/UnitOfWork.php&lt;/tt&gt; line 613. &lt;br/&gt;
&lt;tt&gt;$class-&amp;gt;indentifier&lt;/tt&gt; is hard coded to item 0.&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;entityIdentifiers[$oid] = array($class-&amp;gt;identifier[0] =&amp;gt; $idValue);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You can workaround this issue by defining the sequence first in the entity.&lt;/p&gt;</description>
                <environment>Oracle</environment>
            <key id="13128">DDC-1456</key>
            <summary>Sequence doesn&apos;t work correctly when sequence is defined second in a composite key</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="zorfling">Chris Colborne</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Oct 2011 05:00:23 +0000</created>
                <updated>Sat, 17 Dec 2011 23:33:31 +0000</updated>
                    <resolved>Sat, 17 Dec 2011 23:33:31 +0000</resolved>
                            <version>2.1.2</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17021" author="beberlei" created="Sat, 17 Dec 2011 23:33:31 +0000"  >&lt;p&gt;This is not allowed currently, there is a PR for custom id generators, but so long i am closing this as invalid.&lt;/p&gt;

&lt;p&gt;Also i added an error exception which makes this kind of setup fail.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1455] Selecting association id (FK) without join</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1455</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It might be a missing feature or I might be doing something wrong. I need to select an association (FK) without the need of a join.&lt;/p&gt;

&lt;p&gt;I&apos;m trying something like this:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;select i.client.id , count(i) as total 
from \Invoice i 
GROUP BY i.client
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;But I get this error:&lt;br/&gt;
Error: Expected Doctrine\ORM\Query\Lexer::T_FROM, got &apos;.&apos;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13127">DDC-1455</key>
            <summary>Selecting association id (FK) without join</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="dimirc">Wladimir Coka</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Oct 2011 03:20:05 +0000</created>
                <updated>Mon, 7 Nov 2011 13:11:21 +0000</updated>
                    <resolved>Mon, 7 Nov 2011 13:11:21 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16700" author="beberlei" created="Wed, 26 Oct 2011 07:22:06 +0000"  >&lt;p&gt;Try&lt;/p&gt;

&lt;div class=&quot;code panel&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 i.client, count(i) AS total
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="16773" author="guilhermeblanco" created="Mon, 7 Nov 2011 13:11:21 +0000"  >&lt;p&gt;This is already supported in 2.2-DEV through IDENTITY() DQL function.&lt;/p&gt;

&lt;div class=&quot;code panel&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 IDENTITY(i.client), count(i) as total 
  FROM \Invoice i 
 GROUP BY i.client
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1452] ObjectHydrator bug: hydration of entity with self (cyclic) relation through ref entity</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1452</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;ObjectHydrator has bug in hydrate entities with relation to entity of this same class throught reference entity. Example Model:&lt;/p&gt;

&lt;p&gt;EntityA&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;id&lt;/li&gt;
	&lt;li&gt;title (string)&lt;/li&gt;
	&lt;li&gt;entitiesB (annotation: @ORM\OneToMany(targetEntity=&quot;EntityB&quot;, mappedBy=&quot;entityAFrom&quot;))&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;EntityB&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;id&lt;/li&gt;
	&lt;li&gt;entityAFrom (annotation: @ORM\ManyToOne(targetEntity=&quot;EntityA&quot;, inversedBy=&quot;entitiesB&quot;))&lt;/li&gt;
	&lt;li&gt;entityATo (annotation: @ORM\ManyToOne(targetEntity=&quot;EntityA&quot;))&lt;/li&gt;
	&lt;li&gt;type (string)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Scenario:&lt;/p&gt;

&lt;p&gt;Execution of dql query &apos;SELECT a, b, ba FROM EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba&apos;  with max results set to &quot;1&quot; and data in database:&lt;/p&gt;

&lt;p&gt;EntityATable:&lt;br/&gt;
id | title&lt;br/&gt;
1 | a&lt;br/&gt;
2 | b&lt;/p&gt;

&lt;p&gt;EntityBTable:&lt;br/&gt;
id | entityAFromId | entityAToId | type&lt;br/&gt;
1 | 1 | 2 | type&lt;/p&gt;

&lt;p&gt;Resume:&lt;/p&gt;

&lt;p&gt;I expected collection of EntityA object (size=1 becouse I set max results to 1) with hydrated entitiesB collection (size=1 becouse in db is only 1 record) and hydrated entityTo object. entitiesB property of entityTo object should be empty PersistCollection (ready to lazy load) but is null...&lt;/p&gt;

&lt;p&gt;I can provide TestCase for this issue.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13124">DDC-1452</key>
            <summary>ObjectHydrator bug: hydration of entity with self (cyclic) relation through ref entity</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="psliwa">Piotr &#346;liwa</reporter>
                        <labels>
                    </labels>
                <created>Mon, 24 Oct 2011 20:15:37 +0000</created>
                <updated>Tue, 15 Nov 2011 17:48:23 +0000</updated>
                    <resolved>Mon, 14 Nov 2011 22:37:45 +0000</resolved>
                            <version>2.1</version>
                <version>2.1.1</version>
                <version>2.1.2</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16714" author="beberlei" created="Fri, 28 Oct 2011 22:24:26 +0000"  >&lt;p&gt;Attached a working testcase.&lt;/p&gt;

&lt;p&gt;Please put it into tests/Doctrine/Tests/ORM/Functional/Ticket and run:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;phpunit --group DDC-1452
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Please make that test fail from your perspective, i think it reproduces your test-case exactly.&lt;/p&gt;</comment>
                    <comment id="16717" author="psliwa" created="Sat, 29 Oct 2011 00:26:06 +0000"  >&lt;p&gt;Ok, I have fixed testcase to situation that I was talking about. &lt;/p&gt;

&lt;p&gt;I have hardly debuged this issue, problem is in ObjectHydrator::_getEntity() method. This method delegates to UnitOfWork::createEntity() and passes $hints array. In $hints array, data about fetching associations is stored. In situation when one entity is joined throught two different associations (as in this testcase, first time DDC1452EntityA is used in from clause, second time in join clause) hydrator &quot;minds&quot; that objects from second association have have loaded association that is connecting entities of the same type. In testcase this is &quot;entitiesB&quot; association of &quot;ba&quot; aliased entity. That occurs, becouse $hints&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;fetched&amp;#39;&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;Namespace\DDC1452EntityA&amp;#39;&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;entitiesB&amp;#39;&amp;#93;&lt;/span&gt; has already been set on true while hydrating DDC1452EntityA objects from &quot;FROM&quot; clause. If in testcase had not been set limit for results, then this test would have to pass, becouse second object of DDC1452EntityA ($a2) would have to be load propertly as entity from &quot;FROM&quot; clause.&lt;/p&gt;</comment>
                    <comment id="16719" author="beberlei" created="Sat, 29 Oct 2011 07:18:14 +0000"  >&lt;p&gt;The explaination makes sense. I will dig into it.&lt;/p&gt;</comment>
                    <comment id="16828" author="beberlei" created="Mon, 14 Nov 2011 22:37:45 +0000"  >&lt;p&gt;This is fixed, but only in master. The code change necessary was pretty serious so i dont want to merge it into the stable branch without more people testing it.&lt;/p&gt;</comment>
                    <comment id="16839" author="psliwa" created="Tue, 15 Nov 2011 17:48:23 +0000"  >&lt;p&gt;Great job, thanks!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11092" name="DDC1452Test.php" size="2265" author="psliwa" created="Sat, 29 Oct 2011 00:26:06 +0000" />
                    <attachment id="11091" name="DDC1452Test.php" size="1851" author="beberlei" created="Fri, 28 Oct 2011 22:24:26 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1449] Create postFlush event</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1449</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Create postFlush event&lt;/p&gt;</description>
                <environment></environment>
            <key id="13119">DDC-1449</key>
            <summary>Create postFlush event</summary>
                <type id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/subtask_alternate.png">Sub-task</type>
                    <parent id="13096">DDC-1431</parent>
                        <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 23 Oct 2011 08:11:46 +0000</created>
                <updated>Sun, 23 Oct 2011 10:07:40 +0000</updated>
                    <resolved>Sun, 23 Oct 2011 10:07:40 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16690" author="beberlei" created="Sun, 23 Oct 2011 08:12:14 +0000"  >&lt;p&gt;See &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/168&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/168&lt;/a&gt; - merged&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1448] Add a base entity to allow users to skip writing boilerplate code</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1448</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;For forward compatibility with &lt;a href=&quot;https://gist.github.com/1034079&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/1034079&lt;/a&gt; we want to add a &quot;BaseEntity&quot; into the core that handles boilerplate code through implementing &quot;__call&quot; and using the metadata to generate getter/setter/adder/is methods on the fly.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13116">DDC-1448</key>
            <summary>Add a base entity to allow users to skip writing boilerplate code</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</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 16:55:40 +0000</created>
                <updated>Sat, 19 Nov 2011 11:52:14 +0000</updated>
                    <resolved>Sat, 19 Nov 2011 11:52:14 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16724" author="asm89" created="Sun, 30 Oct 2011 13:15:48 +0000"  >&lt;p&gt;Had some discussion about this on IRC:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;the BaseEntity shouldn&apos;t do __callStatic since there are already repositories that do stuff like this&lt;/li&gt;
	&lt;li&gt;for php 5.3 it would be shipped as a class that can be extended&lt;/li&gt;
	&lt;li&gt;maybe some task that generates the trait from the class or the other way around&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    <comment id="16888" author="beberlei" created="Sat, 19 Nov 2011 11:52:14 +0000"  >&lt;p&gt;Implemented in Doctrine\Common\Persistence\PersistentObject.&lt;/p&gt;

&lt;p&gt;This can be generically used by all ObjectManagers.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1447] &lt;orphan-removal /&gt; BC?</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1447</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="13115">DDC-1447</key>
            <summary>&lt;orphan-removal /&gt; BC?</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</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 16:13:52 +0000</created>
                <updated>Tue, 15 Nov 2011 21:40:47 +0000</updated>
                    <resolved>Tue, 15 Nov 2011 21:40:47 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16845" author="beberlei" created="Tue, 15 Nov 2011 21:40:47 +0000"  >&lt;p&gt;This is not a bc, &amp;lt;orphan-removal /&amp;gt; was invalid all along, &amp;lt;n-to-m orphan-removal=&quot;true/false&quot; /&amp;gt; is defined in the XSD mapping.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1446] Evaluate to configure default &quot;persist cascade&quot; for all enties.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1446</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13111">DDC-1446</key>
            <summary>Evaluate to configure default &quot;persist cascade&quot; for all enties.</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="2">Won&apos;t Fix</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 22 Oct 2011 08:53:06 +0000</created>
                <updated>Mon, 14 Nov 2011 03:28:03 +0000</updated>
                    <resolved>Mon, 14 Nov 2011 03:28:03 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16815" author="guilhermeblanco" created="Mon, 14 Nov 2011 03:28:03 +0000"  >&lt;p&gt;As we already discussed on IRC, this automation would open a can of worms. It cannot be implemented.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1442] SimpleObject hydratation mode with inheritance</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1442</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;SimpleObject hydratation mode with inheritance, it appear that it&apos;s not working.&lt;/p&gt;

&lt;p&gt;The problem start in SimpleObjectHydrator.php line 129 when calling UnitOfWork-&amp;gt;createEntity(NULL, Array, Array).&lt;/p&gt;</description>
                <environment></environment>
            <key id="13107">DDC-1442</key>
            <summary>SimpleObject hydratation mode with inheritance</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="armetiz">Thomas Tourlourat - Armetiz</reporter>
                        <labels>
                    </labels>
                <created>Thu, 20 Oct 2011 13:44:36 +0000</created>
                <updated>Fri, 18 Nov 2011 19:48:05 +0000</updated>
                    <resolved>Fri, 18 Nov 2011 19:48:05 +0000</resolved>
                            <version>2.1.2</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16671" author="beberlei" created="Thu, 20 Oct 2011 14:43:56 +0000"  >&lt;p&gt;in what context are you using simpleobjecthydrator?&lt;/p&gt;</comment>
                    <comment id="16672" author="armetiz" created="Thu, 20 Oct 2011 14:48:26 +0000"  >&lt;p&gt;It was just for testing this feature.&lt;/p&gt;

&lt;p&gt;I have build this queryBuilder :&lt;/p&gt;

&lt;div class=&quot;code panel&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	= $entityManager-&amp;gt;createQueryBuilder();
$queryBuilder-&amp;gt;select (&lt;span class=&quot;code-quote&quot;&gt;&quot;user&quot;&lt;/span&gt;);
$queryBuilder-&amp;gt;from (&lt;span class=&quot;code-quote&quot;&gt;&quot;Entity\User&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;user&quot;&lt;/span&gt;);
$queryBuilder-&amp;gt;where (&lt;span class=&quot;code-quote&quot;&gt;&quot;user.idUser = 916&quot;&lt;/span&gt;);
$queryBuilder-&amp;gt;getQuery()-&amp;gt;execute (array(), \Doctrine\ORM\AbstractQuery::HYDRATE_SIMPLEOBJECT);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Entity\User extends an other Entity.&lt;/p&gt;</comment>
                    <comment id="16704" author="beberlei" created="Thu, 27 Oct 2011 22:36:43 +0000"  >&lt;p&gt;Can you maybe show how the User and Other entity are mapped? It seems your discriminator map could contain a problem, i couldnt reproduce it with our Joined Table Inheritance test entities so far.&lt;/p&gt;</comment>
                    <comment id="16779" author="asm89" created="Tue, 8 Nov 2011 22:05:49 +0000"  >&lt;p&gt;Lowered the priority of this issue until we receive more feedback.&lt;/p&gt;</comment>
                    <comment id="16879" author="beberlei" created="Fri, 18 Nov 2011 19:48:05 +0000"  >&lt;p&gt;This was fixed recently by throwing an error message telling the user that his discriminator mapping is wrong.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1439] Saving many to many association with composed keys.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1439</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have a problem with saving many to many realtion. My entities are.&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;calss Entity1 {
		
	/**
	 * @Id @column
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $key1;

	/**
	 * @Id @column
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $key2;
	
	/**
	 * @ManyToMany (targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Entity2&quot;&lt;/span&gt;)
	 * @JoinTable (name=&lt;span class=&quot;code-quote&quot;&gt;&quot;Entity1Entity2&quot;&lt;/span&gt;,
	 *      joinColumns={@JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;key1&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;key1&quot;&lt;/span&gt;)},
	 *      inverseJoinColumns={@JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;key3&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;key3&quot;&lt;/span&gt;)}
	 *      )
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $entity2;
}

class Entity2 {
	
	/**
	 * @Id @column
         * @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; $key3
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;So in the middle table that i keep the keys from the other 2 i need to save only key1 and key3. And key2 need to be ignored.&lt;br/&gt;
But when i try to save instead of saving the proper values it try to save the value for key2 instead of the value of key1 in the middle table.&lt;br/&gt;
After some debuging i found that in Doctrine\ORM\Persisters\ManyToManyPersister in the private function _collectJoinTableColumnParameters lies the problem.&lt;br/&gt;
Instead of taking the key by the name you are doing array_pop. And you are making a check for composite keys but you presume that bouth of the keys will be&lt;br/&gt;
in the middle table, but that is not the case for me. &lt;br/&gt;
The quick fix that i did was to remove the current check for isComposite and get the keys like we are in the isComposite case always.&lt;/p&gt;

&lt;p&gt;Tanks in advance for the great work.&lt;/p&gt;

&lt;p&gt;Have a nice day!&lt;/p&gt;</description>
                <environment></environment>
            <key id="13104">DDC-1439</key>
            <summary>Saving many to many association with composed keys.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="vigor_bg">victor Velkov</reporter>
                        <labels>
                    </labels>
                <created>Thu, 20 Oct 2011 07:57:08 +0000</created>
                <updated>Mon, 31 Oct 2011 20:12:21 +0000</updated>
                    <resolved>Mon, 31 Oct 2011 19:58:00 +0000</resolved>
                            <version>2.1.2</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16708" author="beberlei" created="Fri, 28 Oct 2011 06:09:53 +0000"  >&lt;p&gt;This kind of mapping is not supported right now, the CLI tool &quot;orm:validate-schema&quot; should throw a compile time error on it as well. &lt;/p&gt;

&lt;p&gt;I am not sure if just changing that line is enough for this to work, or if there are other obstacles as well.&lt;/p&gt;</comment>
                    <comment id="16710" author="vigor_bg" created="Fri, 28 Oct 2011 06:57:53 +0000"  >&lt;p&gt;well that is the code so you can see what exactly i have removed&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
     * Collects the parameters &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; inserting/deleting on the join table in the order
     * of the join table columns as specified in ManyToManyMapping#joinTableColumns.
     *
     * @param $coll
     * @param $element
     * @&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; array
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; function _collectJoinTableColumnParameters(PersistentCollection $coll, $element)
    {
        $params = array();
        $mapping = $coll-&amp;gt;getMapping();
        $isComposite = count($mapping[&apos;joinTableColumns&apos;]) &amp;gt; 2;

        $identifier1 = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_uow-&amp;gt;getEntityIdentifier($coll-&amp;gt;getOwner());
        $identifier2 = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_uow-&amp;gt;getEntityIdentifier($element);

       &lt;span class=&quot;code-comment&quot;&gt;// &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($isComposite) {
&lt;/span&gt;            $class1 = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getClassMetadata(get_class($coll-&amp;gt;getOwner()));
            $class2 = $coll-&amp;gt;getTypeClass();
        &lt;span class=&quot;code-comment&quot;&gt;//}
&lt;/span&gt;
        foreach ($mapping[&apos;joinTableColumns&apos;] as $joinTableColumn) {
            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($mapping[&apos;relationToSourceKeyColumns&apos;][$joinTableColumn])) {
                &lt;span class=&quot;code-comment&quot;&gt;//&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($isComposite) {
&lt;/span&gt;                    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($class1-&amp;gt;containsForeignIdentifier) {
                        $params[] = $identifier1[$class1-&amp;gt;getFieldForColumn($mapping[&apos;relationToSourceKeyColumns&apos;][$joinTableColumn])];
                    } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
                        $params[] = $identifier1[$class1-&amp;gt;fieldNames[$mapping[&apos;relationToSourceKeyColumns&apos;][$joinTableColumn]]];
                    }
&lt;span class=&quot;code-comment&quot;&gt;//                } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;//                    $params[] = array_pop($identifier1);
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;//                }
&lt;/span&gt;            } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
                &lt;span class=&quot;code-comment&quot;&gt;//&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($isComposite) {
&lt;/span&gt;                    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($class2-&amp;gt;containsForeignIdentifier) {
                        $params[] = $identifier2[$class2-&amp;gt;getFieldForColumn($mapping[&apos;relationToTargetKeyColumns&apos;][$joinTableColumn])];
                    } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
                        $params[] = $identifier2[$class2-&amp;gt;fieldNames[$mapping[&apos;relationToTargetKeyColumns&apos;][$joinTableColumn]]];
                    }
&lt;span class=&quot;code-comment&quot;&gt;//                } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;//                    $params[] = array_pop($identifier2);
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;//                }
&lt;/span&gt;            }
        }

        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $params;
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="16711" author="beberlei" created="Fri, 28 Oct 2011 08:32:54 +0000"  >&lt;p&gt;i did find that already and also think its a good change to do sometihng along this lines (there is a better solution), however i dont kn&#246;ow if that is even enough to get your use-case working across the whole ORM. We have zero test-cases for this kind of mapping, so i cannot guarantee you this works at all. This is why the orm:validate-schema gives you an error for this aswell (since some commits ago, this was missing earlier).&lt;/p&gt;</comment>
                    <comment id="16746" author="beberlei" created="Mon, 31 Oct 2011 19:58:00 +0000"  >&lt;p&gt;I checked the code again, this mapping is invalid. You have to define all id columns as join columns or otherwise the core will explode somewhere.&lt;/p&gt;

&lt;p&gt;Since i cannot know and guarantee where it works and where it doesnt the SchemaValidator throws an exception about this problem. I added tests to master and 2.1.x that this mapping error is indeed given as an error.&lt;/p&gt;</comment>
                    <comment id="16748" author="beberlei" created="Mon, 31 Oct 2011 20:12:21 +0000"  >&lt;p&gt;sorry, i coudlnt fix it in 2.1.x, just in 2.2&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1437] Strange behavior  with proxied classes,expected to get entity, but returned identifier.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1437</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have the following xml mapping:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-xml&quot;&gt; 
User:
  &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;entity name=&lt;span class=&quot;code-quote&quot;&gt;&quot;User&quot;&lt;/span&gt; table=&lt;span class=&quot;code-quote&quot;&gt;&quot;user&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;id name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt; type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt; column=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;generator strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;SEQUENCE&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/id&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;field name=&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt; type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt; column=&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/entity&amp;gt;&lt;/span&gt;

SuperUser:
  &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;entity name=&lt;span class=&quot;code-quote&quot;&gt;&quot;SuperUser&quot;&lt;/span&gt; table=&lt;span class=&quot;code-quote&quot;&gt;&quot;superuser&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;id name=&lt;span class=&quot;code-quote&quot;&gt;&quot;user&quot;&lt;/span&gt; type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt; column=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_id&quot;&lt;/span&gt; association-key=&lt;span class=&quot;code-quote&quot;&gt;&quot;true&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;one-to-one field=&lt;span class=&quot;code-quote&quot;&gt;&quot;user&quot;&lt;/span&gt; target-entity=&lt;span class=&quot;code-quote&quot;&gt;&quot;User&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;join-columns&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;join-column name=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_id&quot;&lt;/span&gt; referenced-column-name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/join-columns&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/one-to-one&amp;gt;&lt;/span&gt;

  &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/entity&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;From this mapping i have generated the php classes.&lt;/p&gt;

&lt;p&gt;In my application, when the &lt;tt&gt;SuperUser&lt;/tt&gt; class is proxied, &lt;tt&gt;SuperUser::getUser()&lt;/tt&gt; method looks 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; 
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getUser(){

        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;__isInitialized__ === &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;) {
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_identifier[&lt;span class=&quot;code-quote&quot;&gt;&quot;user&quot;&lt;/span&gt;];
        }
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;__load();
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; parent::getUser();
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;p&gt;When i call &lt;tt&gt;$usperuser-&amp;gt;getUser()&lt;/tt&gt; the expected return value is the User class instance; but the current implementation returns only user id (contained in &lt;tt&gt;$this-&amp;gt;_identifier&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;user&amp;quot;&amp;#93;&lt;/span&gt;&lt;/tt&gt;).&lt;/p&gt;


&lt;p&gt;In this behavior is also involved  private function &lt;tt&gt;ProxyFactory::isShortIdentifierGetter($method, $class)&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Some solutions proposed by me, can be: &lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;remove this behavior&lt;/li&gt;
	&lt;li&gt;during proxy generation, add in this case a method called getUserId, and this method can return user id (but in this case, the behavior continues to be strange because is available only for proxied classes).&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;(sorry for my english)&lt;/p&gt;




</description>
                <environment></environment>
            <key id="13102">DDC-1437</key>
            <summary>Strange behavior  with proxied classes,expected to get entity, but returned identifier.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="goetas">Asmir Mustafic</reporter>
                        <labels>
                    </labels>
                <created>Wed, 19 Oct 2011 09:20:10 +0000</created>
                <updated>Wed, 19 Oct 2011 09:59:16 +0000</updated>
                    <resolved>Wed, 19 Oct 2011 09:59:16 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16665" author="beberlei" created="Wed, 19 Oct 2011 09:54:17 +0000"  >&lt;p&gt;very recent bug in master, i will fix it.&lt;/p&gt;</comment>
                    <comment id="16666" author="beberlei" created="Wed, 19 Oct 2011 09:59:16 +0000"  >&lt;p&gt;fixed in master&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1430] GROUP BY $alias in Oracle</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1430</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When creating a query with the &lt;em&gt;QueryBuilder&lt;/em&gt;, the groupBy with only the alias doesn&apos;t work as expected.&lt;/p&gt;

&lt;p&gt;It creates the group by with the ID only, but Oracle need all the fields to work.&lt;/p&gt;

&lt;p&gt;The &lt;b&gt;ORA-00979: not a GROUP BY expression&lt;/b&gt; error is returned.&lt;/p&gt;

&lt;p&gt;From my &lt;em&gt;SlotRepository&lt;/em&gt; I do:&lt;/p&gt;


&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$query = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;createQueryBuilder(&apos;s&apos;)
    -&amp;gt;select(&apos;s, COUNT(a.id) AS agendas_count&apos;)
    -&amp;gt;leftJoin(&apos;s.agenda_slots&apos;, &apos;l&apos;)
    -&amp;gt;leftJoin(&apos;l.agenda&apos;, &apos;a&apos;)
    -&amp;gt;groupBy(&apos;s&apos;)
;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The SQL generated is:&lt;/p&gt;

&lt;div class=&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; s0_.id AS id0, s0_.hour_start AS hour_start1, s0_.hour_end AS hour_end2, s0_.active AS active3, COUNT(a1_.id) AS sclr4 &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; slot s0_ LEFT JOIN agenda_slot a2_ ON s0_.id = a2_.slot_id LEFT JOIN agenda a1_ ON a2_.agenda_id = a1_.id &lt;span class=&quot;code-keyword&quot;&gt;GROUP&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;BY&lt;/span&gt; s0_.id
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The SQL expected is:&lt;/p&gt;

&lt;div class=&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; s0_.id AS id0, s0_.hour_start AS hour_start1, s0_.hour_end AS hour_end2, s0_.active AS active3, COUNT(a1_.id) AS sclr4 &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; slot s0_ LEFT JOIN agenda_slot a2_ ON s0_.id = a2_.slot_id LEFT JOIN agenda a1_ ON a2_.agenda_id = a1_.id &lt;span class=&quot;code-keyword&quot;&gt;GROUP&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;BY&lt;/span&gt; s0_.id, s0_.hour_start, s0_.hour_end, s0_.active
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As workaround I include all fields manually.&lt;/p&gt;

&lt;p&gt;Thank you,&lt;br/&gt;
Juan Manuel&lt;/p&gt;</description>
                <environment>Linux 64bits + Oracle 11g</environment>
            <key id="13095">DDC-1430</key>
            <summary>GROUP BY $alias in Oracle</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="joksnet">Juan M</reporter>
                        <labels>
                    </labels>
                <created>Tue, 18 Oct 2011 09:35:28 +0000</created>
                <updated>Fri, 18 Nov 2011 14:46:48 +0000</updated>
                    <resolved>Fri, 18 Nov 2011 14:46:48 +0000</resolved>
                            <version>2.1.2</version>
                                <fixVersion>2.2</fixVersion>
                                <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16836" author="joksnet" created="Tue, 15 Nov 2011 15:22:52 +0000"  >&lt;p&gt;Fabio: If you have any questions or you can&apos;t reproduce the problem, let me know.&lt;/p&gt;</comment>
                    <comment id="16837" author="fabio.bat.silva" created="Tue, 15 Nov 2011 15:28:47 +0000"  >&lt;p&gt;Thanks Juan,&lt;/p&gt;

&lt;p&gt;I think I understand your problem,&lt;br/&gt;
I created one PR with a possible solution in github&lt;/p&gt;</comment>
                    <comment id="16840" author="beberlei" created="Tue, 15 Nov 2011 20:09:23 +0000"  >&lt;p&gt;To add to this, although i merged the PR i am not sure if this is enough.&lt;/p&gt;

&lt;div class=&quot;code panel&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 FROM User u GROUP BY u
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I think there will be a problem if User has foreign keys, because they appear in the SELECT clause, but not in the GROUP BY.&lt;/p&gt;</comment>
                    <comment id="16842" author="fabio.bat.silva" created="Tue, 15 Nov 2011 20:49:51 +0000"  >&lt;p&gt;Are you right Benjamin,&lt;/p&gt;

&lt;p&gt;I&apos;m testing with the following dql :&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u GROUP BY u
SELECT c0_.id AS id0, c0_.status AS status1, c0_.username AS username2, c0_.name AS name3, c0_.email_id AS email_id4 FROM cms_users c0_ GROUP BY c0_.id, c0_.status, c0_.username, c0_.name


SELECT e FROM Doctrine\Tests\Models\CMS\CmsEmployee e GROUP BY e
SELECT c0_.id AS id0, c0_.name AS name1, c0_.spouse_id AS spouse_id2 FROM cms_employees c0_ GROUP BY c0_.id, c0_.name
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;What you thing about iterate Association Mappings to get foreign keys?&lt;/p&gt;

</comment>
                    <comment id="16843" author="beberlei" created="Tue, 15 Nov 2011 21:16:34 +0000"  >&lt;p&gt;yes the code has to behave exactly like the select clause generation. Maybe even use that code (if thats possible).&lt;/p&gt;</comment>
                    <comment id="16863" author="beberlei" created="Fri, 18 Nov 2011 14:46:48 +0000"  >&lt;p&gt;fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1427] Fix for columns</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1427</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Fix for generating sql with columns that are exactly MAX IDENTIFIER SIZE long.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13092">DDC-1427</key>
            <summary>Fix for columns</summary>
                <type id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/subtask_alternate.png">Sub-task</type>
                    <parent id="13028">DDC-1384</parent>
                        <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="asm89">Alexander</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 17 Oct 2011 20:59:55 +0000</created>
                <updated>Tue, 8 Nov 2011 10:03:56 +0000</updated>
                    <resolved>Tue, 8 Nov 2011 10:03:56 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16775" author="asm89" created="Tue, 8 Nov 2011 10:03:56 +0000"  >&lt;p&gt;Fixed over here:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/167&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/167&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1424] Make order in DQL SELECT clause matter for hydration</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1424</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The order of the DQL Select clause should matter for the result hydration:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT u.id, u, u.name FROM User u =&amp;gt; result keys: id, 1, name
SELECT u.id, u.id FROM User u =&amp;gt; result keys: id, or numerical hydration 0, 1
SELECT u.id, u AS user FROM User u =&amp;gt; result keys: id, user
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13089">DDC-1424</key>
            <summary>Make order in DQL SELECT clause matter for hydration</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 16 Oct 2011 15:56:50 +0000</created>
                <updated>Mon, 14 Nov 2011 03:35:44 +0000</updated>
                    <resolved>Mon, 14 Nov 2011 03:35:44 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16816" author="guilhermeblanco" created="Mon, 14 Nov 2011 03:35:44 +0000"  >&lt;p&gt;Implemented!!!&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/81cc6d9da83d217ea62bd467053fd9885d1083cd&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/81cc6d9da83d217ea62bd467053fd9885d1083cd&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                                <inwardlinks description="is referenced by">
                            <issuelink>
            <issuekey id="12526">DDC-1096</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1422] Do not load entities when an identifier is retrieved from a proxy</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1422</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="13087">DDC-1422</key>
            <summary>Do not load entities when an identifier is retrieved from a proxy</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="asm89">Alexander</reporter>
                        <labels>
                    </labels>
                <created>Sat, 15 Oct 2011 18:20:15 +0000</created>
                <updated>Sat, 15 Oct 2011 18:23:47 +0000</updated>
                    <resolved>Sat, 15 Oct 2011 18:23:47 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16610" author="guilhermeblanco" created="Sat, 15 Oct 2011 18:23:47 +0000"  >&lt;p&gt;Fixed as of &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/ba38f3e1e9d725224998af9fce42186b5ccb9641&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/ba38f3e1e9d725224998af9fce42186b5ccb9641&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1418] Integrate Simplified XML/YML Drivers from Symfony</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1418</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="13083">DDC-1418</key>
            <summary>Integrate Simplified XML/YML Drivers from Symfony</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 Oct 2011 21:11:44 +0000</created>
                <updated>Thu, 13 Oct 2011 21:40:27 +0000</updated>
                    <resolved>Thu, 13 Oct 2011 21:40:27 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16577" author="beberlei" created="Thu, 13 Oct 2011 21:40:27 +0000"  >&lt;p&gt;Merged this stuff from Symfony, thanks!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1417] entity generator does not support nullable relationship</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1417</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;With a nullable relationship, e.g.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;  manyToOne:
    bar:
      targetEntity: Bar
      joinColumns:
        bar_id:
          referencedColumnName: id
          nullable: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;the setter generated for the relationship&lt;/p&gt;


 &lt;div class=&quot;code panel&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 setBar(\Acme\FooBarBundle\Entity\Bar $bar)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;bar = $bar;
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;can not take null as an argument.&lt;/p&gt;

&lt;p&gt;It should generate&lt;/p&gt;
&lt;div class=&quot;code panel&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 setBar(\Acme\FooBarBundle\Entity\Bar $bar = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;bar = $bar;
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13082">DDC-1417</key>
            <summary>entity generator does not support nullable relationship</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="cfar">Marcel Dejean</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 Oct 2011 18:31:46 +0000</created>
                <updated>Fri, 18 Nov 2011 19:45:55 +0000</updated>
                    <resolved>Fri, 18 Nov 2011 19:45:55 +0000</resolved>
                            <version>2.1.2</version>
                                <fixVersion>2.2</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16878" author="beberlei" created="Fri, 18 Nov 2011 19:45:55 +0000"  >&lt;p&gt;This was fixed in a recent PR.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1416] bug in simple test with sub query</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1416</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;For exemple : &lt;/p&gt;

&lt;p&gt;$query = $em-&amp;gt;createQuery(&quot;SELECT * FROM address WHERE :aValue IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)&quot;);&lt;br/&gt;
$query-&amp;gt;getQuery()-&amp;gt;getSQL();&lt;/p&gt;

&lt;p&gt;Doctrine throw that error : Doctrine\ORM\Query\QueryException: &lt;span class=&quot;error&quot;&gt;&amp;#91;Semantical Error&amp;#93;&lt;/span&gt; line 0, col xxx near &apos;:aValue&apos;: Error: &apos;:aValue&apos; is not defined.&lt;/p&gt;

&lt;p&gt;But in SQL this type of request is posible.&lt;/p&gt;</description>
                <environment>Linux/Ubuntu 10.10 PHP 5.3.3-1ubuntu9.5</environment>
            <key id="13081">DDC-1416</key>
            <summary>bug in simple test with sub 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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="waldo2188">waldo</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 Oct 2011 13:24:23 +0000</created>
                <updated>Sun, 4 Dec 2011 07:42:53 +0000</updated>
                    <resolved>Sun, 4 Dec 2011 07:42:53 +0000</resolved>
                            <version>2.1.2</version>
                                <fixVersion>2.2</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16945" author="guilhermeblanco" created="Sun, 4 Dec 2011 07:42:53 +0000"  >&lt;p&gt;Fixed in trunk: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/0380d5ae580dcbefd63051028fc1ab78599fda6c&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/0380d5ae580dcbefd63051028fc1ab78599fda6c&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1411] onCascade property gets wrong value when entities are generated</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1411</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;m using this cmd to generate entities &quot;/path/to/php path/to/doctrine orm:generate-entities --generate-annotations=&quot;1&quot; ~/some/path&quot;.&lt;/p&gt;

&lt;p&gt;The CASCADE option for ONDELETE columns is being wrongly generated, the right would be: onDelete=&quot;CASCADE&quot; but it is being generated as onDelete=true&lt;/p&gt;</description>
                <environment>Unix/Apache/PHP 5.3/MySQL</environment>
            <key id="13076">DDC-1411</key>
            <summary>onCascade property gets wrong value when entities are generated</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="vinicius.bo">Vin&#237;cius Borriello</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Oct 2011 18:29:38 +0000</created>
                <updated>Sat, 15 Oct 2011 15:54:02 +0000</updated>
                    <resolved>Sat, 15 Oct 2011 15:54:02 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.1.3</fixVersion>
                <fixVersion>2.2</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16594" author="beberlei" created="Sat, 15 Oct 2011 15:54:02 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1404] Named Queries not inherited in JOINED Inheritance</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1404</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When using the JOINED Inheritance (@ORM\InheritanceType(&quot;JOINED&quot;)) any Named Queries defined in the parent entity are not recognized by the repositories of the children.&lt;/p&gt;

&lt;p&gt;So if we have ParentEntity as the parent and ChildEntity a class that extends ParentEntity in table inheritance also. Accessing the ChildEntityRepository and asking for a named query defined via annotation in ParentEntity results in &quot;query does not exist&quot;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13060">DDC-1404</key>
            <summary>Named Queries not inherited in JOINED Inheritance</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="rdohms">Rafael Dohms</reporter>
                        <labels>
                    </labels>
                <created>Thu, 6 Oct 2011 18:46:10 +0000</created>
                <updated>Mon, 14 Nov 2011 18:32:43 +0000</updated>
                    <resolved>Mon, 14 Nov 2011 18:32:43 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16822" author="beberlei" created="Mon, 14 Nov 2011 18:32:43 +0000"  >&lt;p&gt;Merged&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1396] [APC Cache] &quot;clear-cache&quot; commands do not work with cli </title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1396</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Commands for clear-cache:result, clear-cache:query, clear-cache:metadata do not work with cli and APC Cache&lt;/p&gt;

&lt;p&gt;Revert some correction not tested by guilhermeblanco by adding&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($cacheDriver &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; \Doctrine\Common\Cache\ApcCache)
{
    &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \LogicException(&lt;span class=&quot;code-quote&quot;&gt;&quot;Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI.&quot;&lt;/span&gt;);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>in php.ini&lt;br/&gt;
apc.enable_cli = 1</environment>
            <key id="13048">DDC-1396</key>
            <summary>[APC Cache] &quot;clear-cache&quot; commands do not work with cli </summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="jforet">J&#233;r&#244;me For&#234;t</reporter>
                        <labels>
                    </labels>
                <created>Tue, 27 Sep 2011 15:41:57 +0000</created>
                <updated>Mon, 3 Oct 2011 04:24:31 +0000</updated>
                    <resolved>Mon, 3 Oct 2011 04:24:31 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16543" author="guilhermeblanco" created="Mon, 3 Oct 2011 04:24:31 +0000"  >&lt;p&gt;Fixed in &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/8efae0b232210b27200f2709e7fcb24c7f02c5de&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/8efae0b232210b27200f2709e7fcb24c7f02c5de&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for the report. =)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1395] [Doctrine cache clear-result] - wrong function is used</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1395</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;b&gt;lib\Doctrine\ORM\Tools\Console\Command\ClearCache\ResultCommand.php&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Fixing&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
$cacheDriver = $em-&amp;gt;getConfiguration()-&amp;gt;getQueryCacheImpl();
by
$cacheDriver = $em-&amp;gt;getConfiguration()-&amp;gt;getResultCacheImpl();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Fixing&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
output-&amp;gt;write(&apos;Clearing ALL Query cache entries&apos; . PHP_EOL);
by
output-&amp;gt;write(&apos;Clearing ALL Result cache entries&apos; . PHP_EOL);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; </description>
                <environment></environment>
            <key id="13046">DDC-1395</key>
            <summary>[Doctrine cache clear-result] - wrong function is used</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="jforet">J&#233;r&#244;me For&#234;t</reporter>
                        <labels>
                    </labels>
                <created>Tue, 27 Sep 2011 15:28:04 +0000</created>
                <updated>Mon, 3 Oct 2011 04:20:52 +0000</updated>
                    <resolved>Mon, 3 Oct 2011 04:20:52 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16542" author="guilhermeblanco" created="Mon, 3 Oct 2011 04:20:52 +0000"  >&lt;p&gt;Fixed in &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/cd2805137056688fc0848f7fa76b479d681a3cb6&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/cd2805137056688fc0848f7fa76b479d681a3cb6&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1385] INDEX BY doesn&apos;t work for selects with scalars only</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1385</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;By scalars-only-selects I mean 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 c.id, c.name FROM GLocalityBundle:Country c  INDEX by c.id 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The result won&apos;t be indexed by &lt;em&gt;c.id&lt;/em&gt;, as opposites to 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 c FROM GLocalityBundle:Country c  INDEX by c.id 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Assuming that  GLocalityBundle:Country has several hunders of fields, and you need only two of them, this is very disappointing &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;/p&gt;

&lt;p&gt;After diving in the code, due to rigorous separation of entities on objects and scalars, it looks practically impossible even to implement this feature &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;
What is this? Bad design?&lt;/p&gt;</description>
                <environment></environment>
            <key id="13029">DDC-1385</key>
            <summary>INDEX BY doesn&apos;t work for selects with scalars only</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="strygin">Dmitry Strygin</reporter>
                        <labels>
                    </labels>
                <created>Wed, 21 Sep 2011 11:36:51 +0000</created>
                <updated>Sun, 1 Apr 2012 13:30:53 +0000</updated>
                    <resolved>Tue, 8 Nov 2011 10:12:55 +0000</resolved>
                            <version>2.0</version>
                <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="16515" author="beberlei" created="Sun, 25 Sep 2011 16:17:29 +0000"  >&lt;p&gt;I agree it seems very complex to implement for the Object and ArrayHydrator, however it should be very easy for the getScalarResult() hydrator.&lt;/p&gt;

&lt;p&gt;Even more I think there is a general bug with INDEX BY and scalars in Object and ArrayHydrator that has to be evaluated.&lt;/p&gt;</comment>
                    <comment id="16754" author="beberlei" created="Mon, 31 Oct 2011 21:35:21 +0000"  >&lt;p&gt;This PR will fix this issue &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/151&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/151&lt;/a&gt;, it is scheduled for 2.2&lt;/p&gt;</comment>
                    <comment id="16776" author="beberlei" created="Tue, 8 Nov 2011 10:12:55 +0000"  >&lt;p&gt;This is fixed in master&lt;/p&gt;</comment>
                    <comment id="17716" author="deatheriam" created="Sun, 1 Apr 2012 13:29:51 +0000"  >&lt;p&gt;This behavior has not changed in the latest 2.2.1. getArrayResult returns an indexed result. getScalarResult returns zero based result. Do I need to create a separate ticket for that issue?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1384] ORA-00972: identifier is too long</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1384</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi, &lt;/p&gt;

&lt;p&gt;When the query is executed the follow problem occur: &lt;br/&gt;
ORA-00972:identifier is too long &lt;br/&gt;
The problem occur because a column name has 30 characters and the &lt;br/&gt;
Doctrine creates an alias with &amp;lt;column_name&amp;gt;+&amp;lt;position_in_select&amp;gt; &lt;br/&gt;
becoming 31 characters, in Oracle the max allowed characters in the name &lt;br/&gt;
is 30. &lt;br/&gt;
Is there any configuration that disable this mechanism? &lt;br/&gt;
How can I solve this issue? &lt;br/&gt;
Thanks! &lt;br/&gt;
Regards, &lt;/p&gt;

&lt;p&gt;Matheus Souza. &lt;/p&gt;</description>
                <environment></environment>
            <key id="13028">DDC-1384</key>
            <summary>ORA-00972: identifier is too long</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="matheus.souza">Matheus Luis Ramos de Souza</reporter>
                        <labels>
                    </labels>
                <created>Mon, 19 Sep 2011 12:21:04 +0000</created>
                <updated>Sun, 30 Oct 2011 15:48:38 +0000</updated>
                    <resolved>Sun, 30 Oct 2011 15:48:38 +0000</resolved>
                            <version>2.0.3</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16520" author="beberlei" created="Sun, 25 Sep 2011 17:24:20 +0000"  >&lt;p&gt;This is tricky. No way for you to reduce the column length to &amp;lt; 30 chars? The problem with a fix for this would be that we would need to execute a bunch of functions for every database vendor and every column alias used in every SQL statement: quite some overhead &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;/p&gt;</comment>
                    <comment id="16529" author="matheus.souza" created="Mon, 26 Sep 2011 12:19:58 +0000"  >&lt;p&gt;I get it. &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 the implementation, but is there a possibilty to create a property that disable the &quot;suffix field position&quot; in alias, staying just &amp;lt;column_name&amp;gt;? &lt;/p&gt;

&lt;p&gt;Tks!&lt;/p&gt;</comment>
                    <comment id="16592" author="beberlei" created="Sat, 15 Oct 2011 15:05:51 +0000"  >&lt;p&gt;The following workaround will get you around this problem until i find a better solution.&lt;/p&gt;

&lt;p&gt;1. Create a MyOraclePlatform extends \Doctrine\DBAL\Platforms\OraclePlatform&lt;br/&gt;
2. Override the &quot;getSQLResultCasing($string)&quot; to do:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$val = parent::getSQLResultCasing($string);
&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; substr($val, -30);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This substrings every result alias to 30 chars.&lt;/p&gt;</comment>
                    <comment id="16647" author="matheus.souza" created="Mon, 17 Oct 2011 11:29:13 +0000"  >&lt;p&gt;But how does the Doctrine will know about my implementation?&lt;br/&gt;
I will have to change the Driver too?&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;</comment>
                    <comment id="16648" author="beberlei" created="Mon, 17 Oct 2011 11:54:03 +0000"  >&lt;p&gt;no, you can pass the &quot;platform&quot; into the DriverManager::create method as &quot;platform&quot; parameter for the $params AFAIK, relevant code is Doctrine\DBAL\Connection::__construct if you want to check it out.&lt;/p&gt;</comment>
                    <comment id="16650" author="matheus.souza" created="Mon, 17 Oct 2011 16:49:23 +0000"  >&lt;p&gt;In some cases it works, but it doesn&apos;t work when the SqlWalker is invoked, I think that the problem is in walkSelectClause($selectClause) method in the else clause for this verification:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($class-&amp;gt;isInheritanceTypeSingleTable() || $class-&amp;gt;isInheritanceTypeJoined()) {
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($class-&amp;gt;isInheritanceTypeSingleTable() || $class-&amp;gt;isInheritanceTypeJoined()) {
...
} &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
                &lt;span class=&quot;code-comment&quot;&gt;// Add foreign key columns to SQL, &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; necessary
&lt;/span&gt;                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($addMetaColumns) {
                    $sqlTableAlias = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getSqlTableAlias($class-&amp;gt;table[&apos;name&apos;], $dqlAlias);
                    foreach ($class-&amp;gt;associationMappings as $assoc) {
                        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($assoc[&apos;isOwningSide&apos;] &amp;amp;&amp;amp; $assoc[&apos;type&apos;] &amp;amp; ClassMetadata::TO_ONE) {
                            foreach ($assoc[&apos;targetToSourceKeyColumns&apos;] as $srcColumn) {
                                $columnAlias = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getSqlColumnAlias($srcColumn);
                                $sql .= &apos;, &apos; . $sqlTableAlias . &apos;.&apos; . $srcColumn . &apos; AS &apos; . $columnAlias;
                                $columnAlias = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_platform-&amp;gt;getSQLResultCasing($columnAlias);
                                $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_rsm-&amp;gt;addMetaResult($dqlAlias, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_platform-&amp;gt;getSQLResultCasing($columnAlias), $srcColumn);
                            }
                        }
                    }
                }
            }
        }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;the problem is in the follow lines, because the getSQLResultCasing has no effect in $sql variable that is returned:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$columnAlias = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getSqlColumnAlias($srcColumn);
$sql .= &apos;, &apos; . $sqlTableAlias . &apos;.&apos; . $srcColumn . &apos; AS &apos; . $columnAlias;
$columnAlias = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_platform-&amp;gt;getSQLResultCasing($columnAlias);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The correct would be this way, wouldn&apos;t be?&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$columnAlias = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getSqlColumnAlias($srcColumn);
$columnAlias = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_platform-&amp;gt;getSQLResultCasing($columnAlias);
$sql .= &apos;, &apos; . $sqlTableAlias . &apos;.&apos; . $srcColumn . &apos; AS &apos; . $columnAlias;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
	&lt;li&gt;In the version of Doctrine that I&apos;m using, there is no DriverManager::create method, I&apos;m using&lt;br/&gt;
DriverManager::getConnection(array $params,Configuration $config = null,EventManager $eventManager = null) instead.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Tks!!&lt;/p&gt;</comment>
                    <comment id="16651" author="beberlei" created="Mon, 17 Oct 2011 19:49:48 +0000"  >&lt;p&gt;Narf, sorry that this doesn&apos;t work.&lt;/p&gt;

&lt;p&gt;This is rather unreliable if this fails here, can we trust it in other places? I think i have to work on this by hard, its just very problematic to test this, it may be easy to miss a location.&lt;/p&gt;</comment>
                    <comment id="16652" author="beberlei" created="Mon, 17 Oct 2011 20:38:21 +0000"  >&lt;p&gt;we found a simple way to fix this, expect a patch for this soon!&lt;/p&gt;</comment>
                    <comment id="16702" author="asm89" created="Wed, 26 Oct 2011 13:49:31 +0000"  >&lt;p&gt;The issue should be fixed with the code over here:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/167&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/167&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I haven&apos;t been able to test it on a real Oracle DB yet. Maybe you guys can give it a go?&lt;/p&gt;</comment>
                    <comment id="16727" author="beberlei" created="Sun, 30 Oct 2011 15:48:38 +0000"  >&lt;p&gt;Fixed, however will not be merged into 2.1.x because the patch is really large&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
            <subtask id="13092">DDC-1427</subtask>
            <subtask id="13093">DDC-1428</subtask>
        </subtasks>
        </item>

<item>
            <title>[DDC-1383] Inheritance superclass object is created after merging entity referencing to discriminated entity</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1383</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Problem is that after merging the object with a reference to some other entity with inheritance (is one of the superclass&apos;s discriminator map), the referenced object has wrong instance (it is Proxy object). It is instance of the superclass not the extended class.&lt;/p&gt;

&lt;p&gt;In my test case I have joined inheritance model with only two entities to make things simple as possible.&lt;/p&gt;

&lt;p&gt;First is the base entity (I have even marked it as abstract):&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * @Entity
 * @InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;JOINED&quot;&lt;/span&gt;)
 * @DiscriminatorColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;discr&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
 * @DiscriminatorMap({1 = &lt;span class=&quot;code-quote&quot;&gt;&quot;Entity&quot;&lt;/span&gt;})
 */
&lt;span class=&quot;code-keyword&quot;&gt;abstract&lt;/span&gt; class AbstractEntity
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and one entity which extends from the first 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;/**
 * @Entity
 */
class Entity &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; AbstractEntity {
	/**
	 * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;AbstractEntity&quot;&lt;/span&gt;)
	 * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; AbstractEntity
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $reference;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In this scheme I&apos;ve got 2 objects, first referencing to the second. They both are inserted in the database with no problems.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$child = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Entity();
$parent = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Entity();
$child-&amp;gt;setReference($parent);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After the flush I try merging the child entity into the entity manager, the parent entity reference is not instance of Entity\Entity anymore.&lt;/p&gt;

&lt;p&gt;You can see full test case in the archive attached.&lt;/p&gt;</description>
                <environment>Ubuntu 11.04, MySQL 5.1.54-1ubuntu4, PHP 5.3.5-1ubuntu7.2</environment>
            <key id="13027">DDC-1383</key>
            <summary>Inheritance superclass object is created after merging entity referencing to discriminated 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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="gedrox">Aigars Gedroics</reporter>
                        <labels>
                    </labels>
                <created>Mon, 19 Sep 2011 10:11:13 +0000</created>
                <updated>Sat, 15 Oct 2011 17:16:24 +0000</updated>
                    <resolved>Sat, 15 Oct 2011 17:16:24 +0000</resolved>
                            <version>2.1.1</version>
                                <fixVersion>2.1.3</fixVersion>
                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16527" author="gedrox" created="Mon, 26 Sep 2011 11:09:37 +0000"  >&lt;p&gt;Attached standardized test case.&lt;/p&gt;</comment>
                    <comment id="16606" author="beberlei" created="Sat, 15 Oct 2011 17:16:24 +0000"  >&lt;p&gt;Fixed.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11067" name="DDC1383Test.php" size="2058" author="gedrox" created="Mon, 26 Sep 2011 11:09:37 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1368] incorrect mapping not detected by orm:validate-schema</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1368</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The following incorrect mapping was not detected by orm:validate-schema, instead running it resulted in:&lt;/p&gt;

&lt;p&gt;$ doctrine orm:validate-schema&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;Mapping&amp;#93;&lt;/span&gt;  OK - The mapping files are correct.&lt;/p&gt;


&lt;p&gt;&amp;lt;doctrine-mapping&amp;gt;&lt;br/&gt;
...&lt;br/&gt;
	&amp;lt;one-to-many field=&quot;duchies&quot; target-entity=&quot;Duchy&quot; mapped-by=&quot;realm&quot;&amp;gt;&lt;br/&gt;
		&amp;lt;order-by&amp;gt;&lt;br/&gt;
			&amp;lt;order-by-field name=&quot;name&quot; direction=&quot;ASC&quot; /&amp;gt;&lt;br/&gt;
		&amp;lt;/order-by&amp;gt;&lt;br/&gt;
	&amp;lt;/one-to-many&amp;gt;&lt;br/&gt;
...&lt;br/&gt;
&amp;lt;/doctrine-mapping&amp;gt;&lt;/p&gt;

&lt;p&gt;and the inverse side:&lt;/p&gt;

&lt;p&gt;&amp;lt;doctrine-mapping&amp;gt;&lt;br/&gt;
	&amp;lt;one-to-one field=&quot;realm&quot; target-entity=&quot;Realm&quot; inversed-by=&quot;duchies&quot;&amp;gt;&lt;br/&gt;
		&amp;lt;join-column name=&quot;Realm&quot; referenced-column-name=&quot;ID&quot; /&amp;gt;&lt;br/&gt;
	&amp;lt;/one-to-one&amp;gt;&lt;br/&gt;
&amp;lt;/doctrine-mapping&amp;gt;&lt;/p&gt;

&lt;p&gt;obviously, the inverse side should be many-to-one and not one-to-one. Interesting bugs in the code resulted. Obviously a coder mistake, but orm:validate-schema should have detected that the association has incompatible mappings.&lt;/p&gt;
</description>
                <environment>Linux, Debian Lenny, PHP 5.3.8</environment>
            <key id="13005">DDC-1368</key>
            <summary>incorrect mapping not detected by orm:validate-schema</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="tom">Tom Vogt</reporter>
                        <labels>
                    </labels>
                <created>Thu, 8 Sep 2011 15:31:19 +0000</created>
                <updated>Sat, 17 Dec 2011 22:28:18 +0000</updated>
                    <resolved>Sat, 17 Dec 2011 22:28:18 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>Mapping Drivers</component>
                <component>ORM</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17018" author="beberlei" created="Sat, 17 Dec 2011 22:28:18 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1365] Use getQuotedTableName() consistently in all SQL</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1365</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Its missing in some of the persisters/sql walker code.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12999">DDC-1365</key>
            <summary>Use getQuotedTableName() consistently in all 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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 6 Sep 2011 20:39:39 +0000</created>
                <updated>Sun, 25 Sep 2011 13:13:04 +0000</updated>
                    <resolved>Wed, 7 Sep 2011 04:44:53 +0000</resolved>
                            <version>2.1.1</version>
                                <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16444" author="guilhermeblanco" created="Wed, 7 Sep 2011 04:44:53 +0000"  >&lt;p&gt;Committed in &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/e3d133af045815167bdbb0e47a496cc49c86fc23&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/e3d133af045815167bdbb0e47a496cc49c86fc23&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please merge in 2.1.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1360] Reserved words escaping fails when using multiple reserved words</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1360</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Everything works fine when I use the &lt;tt&gt;@Table&lt;/tt&gt; annotation like this: &lt;tt&gt;@Table(name=&quot;`user`&quot;)&lt;/tt&gt;. But when the &lt;tt&gt;user&lt;/tt&gt; table is in the &lt;tt&gt;user&lt;/tt&gt; schema and I try to use the annotion in this way: &lt;tt&gt;@Table(name=&quot;`user`.`user`&quot;)&lt;/tt&gt; &#8212; everything falls apart.&lt;/p&gt;

&lt;p&gt;A quick look into the code showed that it checks if the table name starts with &lt;tt&gt;`&lt;/tt&gt;, and if it does, it sets the &lt;tt&gt;quoted&lt;/tt&gt; parameter to &lt;tt&gt;true&lt;/tt&gt; and removes the &lt;tt&gt;`&lt;/tt&gt; characters on the both sides. So, if I quote the both words like &lt;tt&gt;@Table(name=&quot;`user`.`user`&quot;)&lt;/tt&gt;, the table name becomes &lt;tt&gt;&quot;user`.`user&quot;&lt;/tt&gt; and it, of course, fails. If I quote it just like &lt;tt&gt;@Table(name=&quot;`user.user`&quot;)&lt;/tt&gt;, the table name becomes &lt;tt&gt;&quot;user.user&quot;&lt;/tt&gt;, which fails too.&lt;/p&gt;

&lt;p&gt;If Doctrine allows to escape the reserved words, it should take into account this kind of usage as well.&lt;/p&gt;</description>
                <environment>Linux, PostgreSQL</environment>
            <key id="12994">DDC-1360</key>
            <summary>Reserved words escaping fails when using multiple reserved words</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/blocker.png">Blocker</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="elnur">Elnur Abdurrakhimov</reporter>
                        <labels>
                    </labels>
                <created>Sat, 3 Sep 2011 07:51:45 +0000</created>
                <updated>Tue, 3 Jan 2012 21:51:56 +0000</updated>
                    <resolved>Sat, 31 Dec 2011 10:22:59 +0000</resolved>
                            <version>2.1.1</version>
                                <fixVersion>2.2-BETA2</fixVersion>
                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16434" author="guilhermeblanco" created="Mon, 5 Sep 2011 05:38:30 +0000"  >&lt;p&gt;By now, it&apos;s currently impossible to do cross database joins in an easy way.&lt;br/&gt;
We have planned it through the schema support in @Table.&lt;/p&gt;

&lt;p&gt;I&apos;ll be working on this support for 2.2, but until there, my only recommendation is to not use a keyword as a table name.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                    <comment id="16436" author="elnur" created="Mon, 5 Sep 2011 08:10:36 +0000"  >&lt;p&gt;It&apos;s not cross database; it&apos;s just &lt;tt&gt;schema.table&lt;/tt&gt; in PostgreSQL. It works when not using reserved words, but fails with them.&lt;/p&gt;</comment>
                    <comment id="16716" author="beberlei" created="Fri, 28 Oct 2011 22:37:56 +0000"  >&lt;p&gt;How much of this ticket does your commit from some weeks ago cover guilherme?&lt;/p&gt;</comment>
                    <comment id="16849" author="beberlei" created="Wed, 16 Nov 2011 22:49:12 +0000"  >&lt;p&gt;Fixed for 2.2&lt;/p&gt;</comment>
                    <comment id="17082" author="elnur" created="Wed, 21 Dec 2011 18:16:56 +0000"  >&lt;p&gt;It still doesn&apos;t work. Tried on &lt;tt&gt;master&lt;/tt&gt;.&lt;/p&gt;</comment>
                    <comment id="17083" author="beberlei" created="Wed, 21 Dec 2011 23:00:16 +0000"  >&lt;p&gt;what kind of error do you get?&lt;/p&gt;</comment>
                    <comment id="17130" author="beberlei" created="Wed, 28 Dec 2011 18:31:09 +0000"  >&lt;p&gt;could reproduce the problem with table names and sequence names.&lt;/p&gt;</comment>
                    <comment id="17131" author="beberlei" created="Wed, 28 Dec 2011 19:31:02 +0000"  >&lt;p&gt;Fixed.&lt;/p&gt;</comment>
                    <comment id="17150" author="elnur" created="Thu, 29 Dec 2011 22:46:47 +0000"  >&lt;p&gt;I&apos;ve just got fresh clones of &lt;tt&gt;doctrine-doctrine2&lt;/tt&gt;, &lt;tt&gt;doctrine-dbal&lt;/tt&gt; and &lt;tt&gt;doctrine-common&lt;/tt&gt; &#8212; all on their &lt;tt&gt;master&lt;/tt&gt; branches.&lt;/p&gt;

&lt;p&gt;My entity has this annotation:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;@ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;`user`.`user`&quot;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I&apos;m getting the following exception:&lt;/p&gt;
&lt;div class=&quot;code panel&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[42P01]: Undefined table: 7 ERROR: relation &lt;span class=&quot;code-quote&quot;&gt;&quot;user.user&quot;&lt;/span&gt; 
does not exist LINE 1: ... is_private9,
u0_.created_at AS created_at10 FROM &quot;user.user... 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So, it&apos;s translating &lt;tt&gt;`user`.`user`&lt;/tt&gt; to &lt;tt&gt;&quot;user.user&quot;&lt;/tt&gt;, while it should be &lt;tt&gt;&quot;user&quot;.&quot;user&quot;&lt;/tt&gt;.&lt;/p&gt;</comment>
                    <comment id="17151" author="elnur" created="Thu, 29 Dec 2011 22:58:24 +0000"  >&lt;p&gt;What changed is that earlier &lt;tt&gt;`user`.`user`&lt;/tt&gt; was translated to &lt;tt&gt;&quot;user`.`user&quot;&lt;/tt&gt;, while now it&apos;s translated to &lt;tt&gt;&quot;user.user&quot;&lt;/tt&gt;, but should be to &lt;tt&gt;&quot;user&quot;.&quot;user&quot;&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;I saw the commit related to this ticket (&lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/959a68694e5827a74ad5b8c8216996ffff6196ba&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/959a68694e5827a74ad5b8c8216996ffff6196ba&lt;/a&gt;) and I want to note that I&apos;m getting this error &lt;em&gt;not&lt;/em&gt; when creating a table, but when &lt;em&gt;querying&lt;/em&gt; it. I don&apos;t use Doctrine for creating tables anyway &#8212; I do it via plain SQL.&lt;/p&gt;</comment>
                    <comment id="17157" author="beberlei" created="Sat, 31 Dec 2011 10:22:59 +0000"  >&lt;p&gt;I keep trying until i fixed this, now with a commit into DBAL: &lt;a href=&quot;https://github.com/doctrine/dbal/commit/4cb8a99b65fb08e01fbc02cf9c0e07255e3f8463&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/commit/4cb8a99b65fb08e01fbc02cf9c0e07255e3f8463&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Will be included in Beta 2&lt;/p&gt;</comment>
                    <comment id="17161" author="elnur" created="Sat, 31 Dec 2011 13:03:06 +0000"  >&lt;p&gt;Now &lt;tt&gt;`user`.user&lt;/tt&gt;, &lt;tt&gt;`user`.`user`&lt;/tt&gt; and &lt;tt&gt;`user.user`&lt;/tt&gt; get escaped properly, ending up as &lt;tt&gt;&quot;user&quot;.&quot;user&quot;&lt;/tt&gt;. Interestingly enough, even only the beginning tick like in &lt;tt&gt;`user.user&lt;/tt&gt; ends up as &lt;tt&gt;&quot;user&quot;.&quot;user&quot;&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;user.`user`&lt;/tt&gt;, though, results in &lt;tt&gt;user.`user`&lt;/tt&gt; &#8212; that is, nothing gets escaped. I don&apos;t think this is a big deal, because if I can escape both schema and table name parts, then I won&apos;t run into problems. I&apos;m pointing this out in case it was intended to affect the escaping too.&lt;/p&gt;

&lt;p&gt;Good job, thanks.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1358] Native Query hydration ignores empty entity doublons</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1358</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;My case is the follwing :&lt;/p&gt;

&lt;p&gt;In a range of dates, I want to know if an entity has been defined for each day. So the raw SQL result would looks 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-sql&quot;&gt;DATE              ID NAME
--------- ---------- -------------
19-SEP-11          4 [Entity Name]
20-SEP-11          1 [Entity Name]
21-SEP-11          2 [Entity Name]
22-SEP-11          3 [Entity Name]
23-SEP-11       NULL NULL
24-SEP-11       NULL NULL
25-SEP-11       NULL NULL
26-SEP-11       NULL NULL
27-SEP-11          7 [Entity Name]
28-SEP-11          6 [Entity Name]
29-SEP-11          5 [Entity Name]

11 rows selected.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The range calculation forced me to use Native Query, but I stumbled upon a strange behavior : the Result array showed less records than the raw SQL would provide. After some dirty debugging, I found out that during hydration, an array of previously hydrated object keys was stored &lt;tt&gt;ObjectHydrator-&amp;gt;_identifierMap&lt;/tt&gt;. The key of null elements (the gap in the SQL result above) is  stored too.  The problem is that when there is multiple empty elements, hydration only keeps one, and forget the others, thus reducing the overall size of the output result.&lt;/p&gt;

&lt;p&gt;I&apos;ve already come up with a quick n&apos;dirty fix wich suits my current needs, but it would be better if this issue was addressed at a more global level.&lt;/p&gt;

&lt;p&gt;Here&apos;s the one-liner fix :&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;Doctrine/ORM/Internal/Hydration/ObjectHydrator.php line 397 was :&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ( ! isset($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_identifierMap[$dqlAlias][$id[$dqlAlias]]) ) {
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;Doctrine/ORM/Internal/Hydration/ObjectHydrator.php line 397 now :&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ( ! isset($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_identifierMap[$dqlAlias][$id[$dqlAlias]]) || str_replace( &apos;|&apos;, &apos;&apos;, $id[$dqlAlias]) == &apos;&apos;) {
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
</description>
                <environment>Debian 6, Symfony 2, Doctrine 2</environment>
            <key id="12992">DDC-1358</key>
            <summary>Native Query hydration ignores empty entity doublons</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="hypolite">Benjamin Lorteau</reporter>
                        <labels>
                    </labels>
                <created>Fri, 2 Sep 2011 17:37:20 +0000</created>
                <updated>Sun, 16 Oct 2011 09:18:17 +0000</updated>
                    <resolved>Sun, 16 Oct 2011 09:18:17 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.1.3</fixVersion>
                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16422" author="beberlei" created="Sun, 4 Sep 2011 12:52:02 +0000"  >&lt;p&gt;Doesnt he still hydrate an empty object for this row then? Why are you even using the object hydrator? I rather tend to go and throw an exception if for a query using the ObjectHydrator $id&lt;span class=&quot;error&quot;&gt;&amp;#91;$dqlAlias&amp;#93;&lt;/span&gt; is empty, because frankly this is just not supported.&lt;/p&gt;</comment>
                    <comment id="16424" author="hypolite" created="Sun, 4 Sep 2011 14:50:30 +0000"  >&lt;p&gt;He does hydrate one empty object for the first line with empty ID, but he does not hydrate further empty object.&lt;/p&gt;

&lt;p&gt;Thus, instead of having an array with the following objects :&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
Entity(id=4)
Entity(id=1)
Entity(id=2)
Entity(id=3)
Entity(id=)
Entity(id=)
Entity(id=)
Entity(id=)
Entity(id=7)
Entity(id=6)
Entity(id=5)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;I got :&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
Entity(id=4)
Entity(id=1)
Entity(id=2)
Entity(id=3)
Entity(id=)
Entity(id=7)
Entity(id=6)
Entity(id=5)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; </comment>
                    <comment id="16427" author="beberlei" created="Sun, 4 Sep 2011 21:28:45 +0000"  >&lt;p&gt;Yes, but can you show me your DQL statement?&lt;/p&gt;</comment>
                    <comment id="16437" author="hypolite" created="Mon, 5 Sep 2011 08:49:50 +0000"  >&lt;p&gt;I&apos;m using Native Query, so I guess it&apos;s not DQL, but here&apos;s the query (Oracle 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 *
FROM (
    SELECT to_date(:date_start,\&apos;dd-mm-yyyy\&apos;) + rownum -1 as period_date
    FROM all_objects
    WHERE rownum &amp;lt;= to_date(:date_end,\&apos;dd-mm-yyyy\&apos;) - to_date(:date_start,\&apos;dd-mm-yyyy\&apos;)+1
)
LEFT JOIN entity ON period_date = entity_date&apos;,
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="16600" author="beberlei" created="Sat, 15 Oct 2011 16:32:52 +0000"  >&lt;p&gt;For the Array- and ObjectHydrator the ID is a required result.&lt;/p&gt;

&lt;p&gt;I am not sure how to proceed with this, i think the right behavior is to return null as the object when no id is found. What do you think?&lt;/p&gt;

&lt;p&gt;Is the Date a scalar value of the result?&lt;/p&gt;</comment>
                    <comment id="16611" author="hypolite" created="Sat, 15 Oct 2011 22:37:57 +0000"  >&lt;p&gt;The expected results would be, in order of preference :&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Entity without id set (like in my example above)&lt;/li&gt;
	&lt;li&gt;null value&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;And yes, the Date was an additional scalar value for which I needed the Native Query &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="16619" author="beberlei" created="Sun, 16 Oct 2011 06:57:01 +0000"  >&lt;p&gt;Your example lacks details but, for case one. Did the queries return values for the non-id columns of this entity?&lt;/p&gt;</comment>
                    <comment id="16623" author="hypolite" created="Sun, 16 Oct 2011 07:32:37 +0000"  >&lt;p&gt;Sorry for the concision, I didn&apos;t wanted to flood my comment with unrelated data.&lt;/p&gt;

&lt;p&gt;The fact is the queries returned values for the non-id columns when the ID was set, and null values when not. I will update my comment.&lt;/p&gt;</comment>
                    <comment id="16630" author="beberlei" created="Sun, 16 Oct 2011 09:18:17 +0000"  >&lt;p&gt;I will go with adding NULL values there. This is more consistent, since null represents a non-existent entity.&lt;/p&gt;

&lt;p&gt;Fixed and merged back into 2.1.x&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1351] Github-PR-111 by Gregwar: [Tools] Added entityRepository support in yaml exporter</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1351</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 Gregwar:&lt;/p&gt;

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

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

&lt;p&gt;Adds support for custom entity repository class in the yaml exporter&lt;/p&gt;</description>
                <environment></environment>
            <key id="12982">DDC-1351</key>
            <summary>Github-PR-111 by Gregwar: [Tools] Added entityRepository support in yaml exporter</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 30 Aug 2011 18:08:57 +0000</created>
                <updated>Tue, 30 Aug 2011 18:43:36 +0000</updated>
                    <resolved>Tue, 30 Aug 2011 18:43:36 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1344] Command Tool does not display the directory name when &quot;destination directory&quot; error occurs</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1344</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When any generate command fails because of the destination directory error, directory name shown on the displayed message is always empty. &lt;/p&gt;

&lt;p&gt;This is because realpath() function returns false when directory does not exist. &lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Taken  from the file GenerateRepositoriesCommand.php

        &lt;span class=&quot;code-comment&quot;&gt;// &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; destination directory
&lt;/span&gt;        $destPath = realpath($input-&amp;gt;getArgument(&apos;dest-path&apos;));

        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ( ! file_exists($destPath)) {
            &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \InvalidArgumentException(
                sprintf(&lt;span class=&quot;code-quote&quot;&gt;&quot;Entities destination directory &apos;&amp;lt;info&amp;gt;%s&amp;lt;/info&amp;gt;&apos; does not exist.&quot;&lt;/span&gt;, $destPath)
            );
        }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="12964">DDC-1344</key>
            <summary>Command Tool does not display the directory name when &quot;destination directory&quot; error occurs</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="bsrykt">Ba&#351;ar Aykut</reporter>
                        <labels>
                    </labels>
                <created>Wed, 24 Aug 2011 07:33:08 +0000</created>
                <updated>Sat, 27 Aug 2011 11:36:43 +0000</updated>
                    <resolved>Sat, 27 Aug 2011 11:36:43 +0000</resolved>
                            <version>2.0.7</version>
                <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16382" author="beberlei" created="Sat, 27 Aug 2011 11:36:43 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1343] Github-PR-105 by domnikl: DDC-1278 - EntityManager::clear($entity) support</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1343</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;domnikl created a pull request on Github: &lt;/p&gt;

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

&lt;p&gt;added cascade detach operation only for entites with the same name when $entityName on clear() was specified. I am still unsure where to put my tests for that.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12942">DDC-1343</key>
            <summary>Github-PR-105 by domnikl: DDC-1278 - EntityManager::clear($entity) support</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 21 Aug 2011 14:39:36 +0000</created>
                <updated>Mon, 17 Oct 2011 13:37:04 +0000</updated>
                    <resolved>Mon, 17 Oct 2011 13:37:04 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16649" author="guilhermeblanco" created="Mon, 17 Oct 2011 13:37:04 +0000"  >&lt;p&gt;Fixed in this commit &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/22a04fd6de3ffa44cc3cd817d65cf112b1df7b53&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/22a04fd6de3ffa44cc3cd817d65cf112b1df7b53&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1339] New DQL function: IDENTITY(SingleValuedAssociationPathExpression)</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1339</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Suppose the association: User N:1 Group and user wants to be able to retrieve &quot;users.group_id&quot; without joining the Group entity.&lt;br/&gt;
This lead us to create a new DQL function:&lt;/p&gt;

&lt;div class=&quot;code panel&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 IDENTITY(u.Group) AS group_id FROM User u WHERE u.id = ?0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="12936">DDC-1339</key>
            <summary>New DQL function: IDENTITY(SingleValuedAssociationPathExpression)</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Aug 2011 15:00:31 +0000</created>
                <updated>Thu, 8 Sep 2011 05:06:20 +0000</updated>
                    <resolved>Thu, 8 Sep 2011 05:06:20 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16453" author="guilhermeblanco" created="Thu, 8 Sep 2011 05:06:20 +0000"  >&lt;p&gt;Implemented &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/a7f3af8328b031a6f006eef1062554bf9f57e1df&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/a7f3af8328b031a6f006eef1062554bf9f57e1df&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1338] @Entity(repositoryClass) could support short namespace support</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1338</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Like association mapping, we could take advantage of short namespacing of entity repository class.&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;namespace Foo\Bar\Red;

/**
 * Used to be &lt;span class=&quot;code-quote&quot;&gt;&quot;Foo\Bar\Red\WooRepository&quot;&lt;/span&gt;
 * @Entity(repositoryClass=&lt;span class=&quot;code-quote&quot;&gt;&quot;WooRepository&quot;&lt;/span&gt;)
 */
class Woo { ... } 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="12934">DDC-1338</key>
            <summary>@Entity(repositoryClass) could support short namespace support</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Aug 2011 05:43:27 +0000</created>
                <updated>Fri, 19 Aug 2011 05:43:45 +0000</updated>
                    <resolved>Fri, 19 Aug 2011 05:43:45 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16359" author="guilhermeblanco" created="Fri, 19 Aug 2011 05:43:45 +0000"  >&lt;p&gt;Fixed by &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/736443f6c23c772bf10cf2839c3812f43b251929&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/736443f6c23c772bf10cf2839c3812f43b251929&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1331] Add IN(...) support to INSTANCE OF</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1331</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="12920">DDC-1331</key>
            <summary>Add IN(...) support to INSTANCE OF</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 14 Aug 2011 16:40:34 +0000</created>
                <updated>Mon, 15 Aug 2011 04:51:22 +0000</updated>
                    <resolved>Mon, 15 Aug 2011 04:51:22 +0000</resolved>
                            <version>2.0.6</version>
                <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16332" author="guilhermeblanco" created="Mon, 15 Aug 2011 04:51:22 +0000"  >&lt;p&gt;Implemented in latest 2.2-DEV by commit: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/f148912a28601d9c6234d59661f0e4ad1ae0c138&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/f148912a28601d9c6234d59661f0e4ad1ae0c138&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1330] Doctrine CLI and additional things like Migrations</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1330</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;m currently trying out Migrations. However, it seems to me that it is not possible to easily add migrations to a system-wide installed Doctrine2 ORM.&lt;/p&gt;

&lt;p&gt;This bug is probably 50% documentation issue and 50% code issue.&lt;/p&gt;

&lt;p&gt;What I&apos;m basically trying to do is to add the migrations project.&lt;/p&gt;

&lt;div class=&quot;panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;Problem One: The $cli object&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;panelContent&quot;&gt;
&lt;p&gt;The documentation for both migrations and ORM state about the $cli object. However, it is never explained how the $cli object is instanciated.&lt;/p&gt;

&lt;p&gt;It isn&apos;t obvious that $cli is either defined by the doctrine command (=doctrine.php which comes with the sandbox and is eventually installed system-wide) or actually needs to be defined by the developer himself. It might be obvious when you read the complete manual first (like a book, which actually nobody does - at least not anybody I know), but this isn&apos;t helpful because the manuals are all reference manuals.&lt;/p&gt;

&lt;p&gt;So the manuals need to be changed so that it actually explains where $cli comes from.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.1/en/reference/tools.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.1/en/reference/tools.html&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://www.doctrine-project.org/projects/migrations/2.0/docs/reference/introduction/en#introduction&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/projects/migrations/2.0/docs/reference/introduction/en#introduction&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;div class=&quot;panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;Problem Two: Defining a custom doctrine.php file&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;panelContent&quot;&gt;
&lt;p&gt;As there&apos;s no code - at least not which I could have found easily - to add CLI commands to system&apos;s doctrine.php without modifying it, developers are forced to duplicate the code of doctrine.php and add their own CLI commands.&lt;/p&gt;

&lt;p&gt;The problem could be easily avoided by allowing the users to define something like $additionalCommands in their cli-config.php which could then appended via $cli-&amp;gt;addCommands() in the master doctrine.php file.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="12919">DDC-1330</key>
            <summary>Doctrine CLI and additional things like Migrations</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="felicitus">Timo A. Hummel</reporter>
                        <labels>
                    </labels>
                <created>Sun, 14 Aug 2011 06:55:48 +0000</created>
                <updated>Sat, 17 Dec 2011 22:57:23 +0000</updated>
                    <resolved>Sat, 17 Dec 2011 22:57:23 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>Documentation</component>
                <component>Tools</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17020" author="beberlei" created="Sat, 17 Dec 2011 22:57:23 +0000"  >&lt;p&gt;Added a part on setiing up the CLi into the ORM docs.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1325] Adding @Target to annotations</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1325</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Now that the annotation parser has support for the @Target annotation, we should also add it to the annotations of the ORM.&lt;/p&gt;

&lt;p&gt;I have looked through the mapping file, but I&apos;m not familiar with all the annotations, so someone else is probably better suited to add them.&lt;/p&gt;

&lt;p&gt;Usage is as follows:&lt;/p&gt;

&lt;p&gt;@Target(&quot;CLASS&quot;) for a single target&lt;br/&gt;
@Target(&lt;/p&gt;
{&quot;CLASS&quot;, &quot;METHOD&quot;, &quot;PROPERTY&quot;, &quot;ANNOTATION&quot;}
&lt;p&gt;) for multiple targets (annotation if it can be used as a nested annotation)&lt;/p&gt;</description>
                <environment></environment>
            <key id="12909">DDC-1325</key>
            <summary>Adding @Target to annotations</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="johannes">Johannes Schmitt</reporter>
                        <labels>
                    </labels>
                <created>Wed, 10 Aug 2011 06:51:31 +0000</created>
                <updated>Sun, 14 Aug 2011 17:22:47 +0000</updated>
                    <resolved>Sun, 14 Aug 2011 17:22:47 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16330" author="beberlei" created="Sun, 14 Aug 2011 17:22:47 +0000"  >&lt;p&gt;Resolved&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1295] Sandbox Sample Code which shall go into cli-config.php and index.php for EntityManager working with yaml is wrong</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1295</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.1/en/tutorials/getting-started-xml-edition.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.1/en/tutorials/getting-started-xml-edition.html&lt;/a&gt;&lt;br/&gt;
in Section: Obtaining the EntityManager&lt;br/&gt;
the Code:&lt;/p&gt;

&lt;p&gt;//$driverImpl = new Doctrine\ORM\Mapping\Driver\XmlDriver(_&lt;em&gt;DIR&lt;/em&gt;_.&quot;/config/mappings/xml&quot;);&lt;br/&gt;
$driverImpl = new Doctrine\ORM\Mapping\Driver\XmlDriver(_&lt;em&gt;DIR&lt;/em&gt;_.&quot;/config/mappings/yml&quot;);&lt;br/&gt;
//$driverImpl = $config-&amp;gt;newDefaultAnnotationDriver(_&lt;em&gt;DIR&lt;/em&gt;_.&quot;/entities&quot;);&lt;/p&gt;

&lt;p&gt;produces:&lt;/p&gt;

&lt;p&gt;PHP Fatal error:  Class &apos;Sandbox\Doctrine\ORM\Mapping\Driver\XmlDriver&apos; not found in ..&lt;/p&gt;

&lt;p&gt;Should be corrected to:&lt;br/&gt;
$driverImpl = new \Doctrine\ORM\Mapping\Driver\XmlDriver(_&lt;em&gt;DIR&lt;/em&gt;_.&quot;/config/mappings/yml&quot;);&lt;/p&gt;

&lt;p&gt;produces:&lt;/p&gt;

&lt;p&gt;PHP Fatal error:  Uncaught exception &apos;Doctrine\ORM\Mapping\MappingException&apos; with message &apos;No mapping file found named &apos;Entities.User.dcm.xml&apos; ..&lt;/p&gt;

&lt;p&gt;Should be corrected to:&lt;br/&gt;
$driverImpl = new \Doctrine\ORM\Mapping\Driver\YamlDriver(_&lt;em&gt;DIR&lt;/em&gt;_.&quot;/config/mappings/yml&quot;);&lt;/p&gt;

&lt;p&gt;and finally, following the xml yaml Entities folder structure in the sandbox, should be corrected to:&lt;/p&gt;

&lt;p&gt;$driverImpl = new \Doctrine\ORM\Mapping\Driver\YamlDriver(_&lt;em&gt;DIR&lt;/em&gt;_.&quot;/yaml&quot;);&lt;/p&gt;


&lt;p&gt;With this configuration I was able to create Entities from yaml through these commands:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;doctrine orm:generate-entities ./&lt;/li&gt;
	&lt;li&gt;doctrine orm:schema-tool:create&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment>LINUX doctrine2.git</environment>
            <key id="12855">DDC-1295</key>
            <summary>Sandbox Sample Code which shall go into cli-config.php and index.php for EntityManager working with yaml is wrong</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="szsoftware">Sven Zahrend</reporter>
                        <labels>
                    </labels>
                <created>Mon, 25 Jul 2011 17:20:40 +0000</created>
                <updated>Fri, 9 Dec 2011 04:34:21 +0000</updated>
                    <resolved>Fri, 9 Dec 2011 04:34:21 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16950" author="guilhermeblanco" created="Fri, 9 Dec 2011 04:34:21 +0000"  >&lt;p&gt;This issue was already solved in 2.2....&lt;br/&gt;
The tutorial code changed due to the new support introduced in 2.2, so I&apos;m marking as fixed and assigning to this middle point version.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1293] Update DQL function signature in documentation</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1293</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.1/en/reference/dql-doctrine-query-language.html#dql-functions&quot; class=&quot;external-link&quot;&gt;documentation concerning the new DQL Date functions&lt;/a&gt; is outdated, as the &apos;unit&apos; of the interval is not described. &lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; 
DATE_ADD(date, days) - Add the number of days to a given date.
DATE_SUB(date, days) - Substract the number of days from a given date.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Should be &lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; 
DATE_ADD(date, interval, unitOfInterval)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;for example:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; 
DATE_ADD(CURRENT_DATE(), 1, &apos;DAY&apos;);
DATE_SUB(CURRENT_DATE(), 4, &apos;MONTH&apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;UPDATE: it appears parameters are not injected properly when using the DATE functions:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; 
$qb-&amp;gt;where(&quot;x._lastMutationDateTime &amp;lt; DATE_ADD(CURRENT_DATE(),?1,&apos;day&apos;)&quot;);
$qb-&amp;gt;setParameter(1, 5);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Results in:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;//DQL
SELECT x FROM Entity p WHERE x._lastMutationTimestamp &amp;lt; DATE_ADD(CURRENT_DATE(),?1,&apos;day&apos;)
//SQL:
SELECT x0_.id AS id0, x0_.last_mutation_timestamp AS last_mutation_timestamp1
WHERE x0_.last_mutation_timestamp &amp;lt; DATE_ADD(CURRENT_DATE, INTERVAL 0 DAY)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="12853">DDC-1293</key>
            <summary>Update DQL function signature in documentation</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="holtkamp">Menno Holtkamp</reporter>
                        <labels>
                    </labels>
                <created>Mon, 25 Jul 2011 14:09:54 +0000</created>
                <updated>Fri, 9 Dec 2011 04:36:30 +0000</updated>
                    <resolved>Fri, 9 Dec 2011 04:36:30 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16379" author="beberlei" created="Sat, 27 Aug 2011 11:03:27 +0000"  >&lt;p&gt;Marked as bug&lt;/p&gt;</comment>
                    <comment id="16951" author="guilhermeblanco" created="Fri, 9 Dec 2011 04:36:30 +0000"  >&lt;p&gt;This issue was already fixed, maybe docs should be regenerated.&lt;br/&gt;
Marking as fixed for now.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1290] Version fields do not accept smallint and bigint</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1290</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In ClassMetadataInfo there is a method called setVersionMapping.&lt;/p&gt;

&lt;p&gt;It sets default values for the version fields, but only for integer and datetime.&lt;br/&gt;
As I expected that smallint and bigint would be handled the same way, I would consider the fact they are missing as a bug.&lt;/p&gt;

&lt;p&gt;So instead of&lt;/p&gt;

&lt;p&gt;if ($mapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;type&amp;#39;&amp;#93;&lt;/span&gt; == &apos;integer&apos;) {&lt;/p&gt;

&lt;p&gt;it should probably be&lt;/p&gt;

&lt;p&gt;if (in_array($mapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;type&amp;#39;&amp;#93;&lt;/span&gt;, array(&apos;integer&apos;, &apos;smallint&apos;, &apos;bigint&apos;))) {&lt;/p&gt;
</description>
                <environment></environment>
            <key id="12847">DDC-1290</key>
            <summary>Version fields do not accept smallint and bigint</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="guite">Axel Guckelsberger</reporter>
                        <labels>
                    </labels>
                <created>Sun, 24 Jul 2011 09:39:24 +0000</created>
                <updated>Tue, 26 Jul 2011 20:24:42 +0000</updated>
                    <resolved>Tue, 26 Jul 2011 20:24:42 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16210" author="beberlei" created="Tue, 26 Jul 2011 20:24:42 +0000"  >&lt;p&gt;I call it improvement and its fixed in master, will be in 2.2&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1288] Column Name</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1288</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hello, I am starting development with symfony Doctrine ORM, and I&apos;m one big question: the company where I work, there is a table in a database whose field (column) must be called &quot;call-limit&quot;, (I repeat, have to have this name), but I can not for the Doctrine does not allow ... Is there any way to treat this? I&apos;ve tried using the alias, but to no avail ... If someone can help me ... Hug.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12845">DDC-1288</key>
            <summary>Column Name</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="websalo">salomao santos</reporter>
                        <labels>
                    </labels>
                <created>Fri, 22 Jul 2011 16:53:17 +0000</created>
                <updated>Tue, 16 Aug 2011 05:22:31 +0000</updated>
                    <resolved>Tue, 16 Aug 2011 05:22:31 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16341" author="guilhermeblanco" created="Tue, 16 Aug 2011 05:22:31 +0000"  >&lt;p&gt;Just map your @Column providing the db field name.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * @Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;my-desired-name&quot;&lt;/span&gt;)
 */
&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $otherName;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The only question you should check then is if your RDBMS supports the dashes as a valid column name.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1286] Change typo in ORMException</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1286</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Doctrine\ORM\ORMException, like 42:&lt;br/&gt;
           &quot;however this entity has no ientity itself. You have to call EntityManager#persist() on the related entity &quot; .&lt;/p&gt;

&lt;p&gt;should be:&lt;br/&gt;
           &quot;however this entity has no identity itself. You have to call EntityManager#persist() on the related entity &quot; .&lt;/p&gt;</description>
                <environment></environment>
            <key id="12843">DDC-1286</key>
            <summary>Change typo in ORMException</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="serge.smertin">Serge Smertin</reporter>
                        <labels>
                    </labels>
                <created>Fri, 22 Jul 2011 12:32:16 +0000</created>
                <updated>Sun, 14 Aug 2011 03:07:00 +0000</updated>
                    <resolved>Sun, 14 Aug 2011 03:07:00 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16321" author="guilhermeblanco" created="Sun, 14 Aug 2011 03:07:00 +0000"  >&lt;p&gt;This issue is already solved in latest 2.2-DEV.&lt;/p&gt;

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

<item>
            <title>[DDC-1284] Inheritance fails in JOIN query</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1284</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi!&lt;br/&gt;
Sorry for my english, I&apos;m working on that.&lt;br/&gt;
I&apos;ve this code:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;entity&quot;&lt;/span&gt;) 
 * @InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;JOINED&quot;&lt;/span&gt;)
 * @DiscriminatorColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;entityTypeId&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;smallint&quot;&lt;/span&gt;)
 * @DiscriminatorMap({0 = &lt;span class=&quot;code-quote&quot;&gt;&quot;Bank&quot;&lt;/span&gt;,  1 = &lt;span class=&quot;code-quote&quot;&gt;&quot;Dealer&quot;&lt;/span&gt;, 2 = &lt;span class=&quot;code-quote&quot;&gt;&quot;Debtor&quot;&lt;/span&gt;, 3 = &lt;span class=&quot;code-quote&quot;&gt;&quot;Repo&quot;&lt;/span&gt;, 4 = &lt;span class=&quot;code-quote&quot;&gt;&quot;Appraiser&quot;&lt;/span&gt;, 5 = &lt;span class=&quot;code-quote&quot;&gt;&quot;Transport&quot;&lt;/span&gt;})
 */
class Entities
{
     /**
     * @Id @GeneratedValue
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; integer
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;

   /**
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, length=40)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; text
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name;

    ............................................................
    ............................................................
}

------------------------------------------------------------------------------------------------------------------------------------
/** 
 * @Entity(repositoryClass=&lt;span class=&quot;code-quote&quot;&gt;&quot;Model\Entity\Repository\DebtorRepository&quot;&lt;/span&gt;)
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;debtor&quot;&lt;/span&gt;) 
 */ 
class Debtor &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Entities{
    
}

------------------------------------------------------------------------------------------------------------------------------------
 
/**
 * @Entity(repositoryClass=&lt;span class=&quot;code-quote&quot;&gt;&quot;Model\Entity\Repository\PlacementRepository&quot;&lt;/span&gt;)
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;placement&quot;&lt;/span&gt;)
 */
class Placement
{
      
    /**
     * @Id
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;smallint&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; integer
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;


       /**
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Debtor&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;placements&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;debtorId&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; $debtor;
 
........................................
.......................................
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

&lt;blockquote&gt;
&lt;p&gt;&quot;SELECT t1 FROM Model\Entity\Placement t1 INNER JOIN t1.debtor d WITH d.name = &apos;test&apos; &quot;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;fails and show the message&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&quot;SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;42S22&amp;#93;&lt;/span&gt;: Column not found: 1054 Unknown column &apos;e2_.name&apos; in &apos;on clause&apos;&quot;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I hope somebody know how fix this, I can&apos;t fixing this.&lt;/p&gt;
</description>
                <environment>Ubuntu 10.10</environment>
            <key id="12841">DDC-1284</key>
            <summary>Inheritance fails in JOIN 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="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="7">Can&apos;t Fix</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="thetourist">Carlos Ayala</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Jul 2011 20:40:13 +0000</created>
                <updated>Sun, 14 Aug 2011 03:18:40 +0000</updated>
                    <resolved>Sun, 14 Aug 2011 03:18:40 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16206" author="beberlei" created="Tue, 26 Jul 2011 18:39:09 +0000"  >&lt;p&gt;Can you call $query-&amp;gt;getSQL() and show me the generated SQL statement? or grab it from a log file&lt;/p&gt;</comment>
                    <comment id="16322" author="guilhermeblanco" created="Sun, 14 Aug 2011 03:18:40 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;This issue is impossible to be fixed by Doctrine side.&lt;br/&gt;
The inheritance requires Doctrine to make additional JOINs to also include the inherited Entities, but it&apos;s not possible at that stage to determine which JOIN-ON clause your WITH would be part of, it generates a broken SQL.&lt;/p&gt;

&lt;p&gt;That&apos;s your situation. Since in your individual situation you&apos;re doing INNER JOINs, you are pretty much able to fix this by doing a WHERE clause. From Doctrine perspective, this issue is not fixable.&lt;/p&gt;


&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1278] EntityManager::clear($entity) support</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1278</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It was originally planned that EntityManager::clear() would also support an optional argument - $entity -, which would remove only the reference to an existent entity (maybe also consider a new cascade to allow graph clearing) from UoW.&lt;br/&gt;
Currently, it&apos;s win or wall. You can&apos;t clear a specific portion of Entities.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12831">DDC-1278</key>
            <summary>EntityManager::clear($entity) 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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Thu, 14 Jul 2011 18:48:39 +0000</created>
                <updated>Sun, 16 Oct 2011 20:49:18 +0000</updated>
                    <resolved>Sun, 16 Oct 2011 20:46:54 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16314" author="domnikl" created="Sat, 13 Aug 2011 12:15:13 +0000"  >&lt;p&gt;I implemented this (&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/104&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/104&lt;/a&gt;) but forgot to consider also cascade detach. What do you think about adding an additional parameter $entityName to both cascadeDetach() and doDetach()?&lt;/p&gt;</comment>
                    <comment id="16641" author="beberlei" created="Sun, 16 Oct 2011 20:46:54 +0000"  >&lt;p&gt;Merged into 2.2-master&lt;/p&gt;</comment>
                    <comment id="16642" author="asm89" created="Sun, 16 Oct 2011 20:49:18 +0000"  >&lt;p&gt;By merging the new PR: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/105&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/105&lt;/a&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1277] BasicEntityPersister::expandParameters() will check associations</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1277</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When executing a &lt;tt&gt;EntityRepository::findBy()&lt;/tt&gt; or &lt;tt&gt;EntityRepository::findOnyBy()&lt;/tt&gt; with criteria that contain a field/value pair where the field is an association-name and the value is an array, some (for me) unexpected behavior occurs.&lt;/p&gt;

&lt;p&gt;First an example to make my statement a bit more clear:&lt;br/&gt;
I have an entity &lt;tt&gt;User&lt;/tt&gt; and &lt;tt&gt;Group&lt;/tt&gt; where &lt;tt&gt;Group&lt;/tt&gt; has many &lt;tt&gt;Users&lt;/tt&gt; (&lt;tt&gt;User&lt;/tt&gt; many-to-one &lt;tt&gt;Group&lt;/tt&gt;).&lt;/p&gt;

&lt;p&gt;When I call &lt;tt&gt;UserRepository-&amp;gt;findBy( array( &apos;group&apos; =&amp;gt; 1 ))&lt;/tt&gt;, all goes well.&lt;br/&gt;
When I call &lt;tt&gt;UserRepository-&amp;gt;findBy( array( &apos;group&apos; =&amp;gt; array( 1, 2, 3 )))&lt;/tt&gt;, I get an notice and no results (Notice: Array to string conversion in /opt/local/www/doctrine2/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php on line 613)&lt;/p&gt;

&lt;p&gt;I&apos;ve tracked the &quot;problem&quot; down to the &lt;tt&gt;BasicEntityPersister&lt;/tt&gt;:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;BasicEntityPersister::_getSelectEntitiesSQL()&lt;/tt&gt;, which uses &lt;tt&gt;BasicEntityPersister::_getSelectConditionSQL()&lt;/tt&gt;, correctly creates a query containing something like &lt;tt&gt;WHERE t0.group_id IN ( ? )&lt;/tt&gt;.&lt;br/&gt;
But &lt;tt&gt;BasicEntityPersister::expandParameters()&lt;/tt&gt; doesn&apos;t implode the array to some string that can be bound to the query. This is because it doesn&apos;t take into account that the field could be an association.&lt;/p&gt;

&lt;p&gt;I don&apos;t know if this is intended behavior, but I would think not. I&apos;ve therefor altered the &lt;tt&gt;BasicEntityPersister::expandParameters()&lt;/tt&gt; a bit:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-none&quot;&gt;private function expandParameters($criteria)
    {
        $params = $types = array();

        foreach ($criteria AS $field =&amp;gt; $value) {
            if ($value === null) {
                continue; // skip null values.
            }

            $type = null;
            if (isset($this-&amp;gt;_class-&amp;gt;fieldMappings[$field])) {
                $type = Type::getType($this-&amp;gt;_class-&amp;gt;fieldMappings[$field][&apos;type&apos;])-&amp;gt;getBindingType();
            // BEGIN: Jasper N. Brouwer (14-07-2011)
            } else if (isset($this-&amp;gt;_class-&amp;gt;associationMappings[$field])) {
                if ($this-&amp;gt;_class-&amp;gt;associationMappings[$field][&apos;isOwningSide&apos;]) {
                    $targetClass = $this-&amp;gt;_em-&amp;gt;getClassMetadata($this-&amp;gt;_class-&amp;gt;associationMappings[$field][&apos;targetEntity&apos;]);
                    $targetField = $this-&amp;gt;_class-&amp;gt;associationMappings[$field][&apos;joinColumns&apos;][0][&apos;referencedColumnName&apos;];
                    if (isset($targetClass-&amp;gt;fieldMappings[$targetField])) {
                        $type = Type::getType($targetClass-&amp;gt;fieldMappings[$targetField][&apos;type&apos;])-&amp;gt;getBindingType();
                    }
                }
            // END: Jasper N. Brouwer (14-07-2011)
            }
            if (is_array($value)) {
                $type += Connection::ARRAY_PARAM_OFFSET;
            }
            
            $params[] = $value;
            $types[] = $type;
        }
        return array($params, $types);                                                                                  
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I hope this bit of code also clarifies what I&apos;m trying to explain a bit more...&lt;/p&gt;</description>
                <environment></environment>
            <key id="12827">DDC-1277</key>
            <summary>BasicEntityPersister::expandParameters() will check associations</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="jasper@nerdsweide.nl">Jasper N. Brouwer</reporter>
                        <labels>
                    </labels>
                <created>Thu, 14 Jul 2011 13:25:51 +0000</created>
                <updated>Sun, 14 Aug 2011 00:27:55 +0000</updated>
                    <resolved>Sun, 14 Aug 2011 00:27:55 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16310" author="jasper@nerdsweide.nl" created="Thu, 11 Aug 2011 19:00:35 +0000"  >&lt;p&gt;I found an error in my fix &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;/p&gt;

&lt;p&gt;&lt;tt&gt;$this-&amp;gt;_class-&amp;gt;associationMappings&lt;span class=&quot;error&quot;&gt;&amp;#91;$field&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;joinColumns&amp;#39;&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;referencedColumnName&amp;#39;&amp;#93;&lt;/span&gt;;&lt;/tt&gt; refers to a column-name, not a field-name. I made a new patch:&lt;/p&gt;

&lt;div class=&quot;code panel&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 expandParameters($criteria)                                                                            
{
    $params = $types = array();

    foreach ($criteria AS $field =&amp;gt; $value) {
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($value === &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;) {
            &lt;span class=&quot;code-keyword&quot;&gt;continue&lt;/span&gt;; &lt;span class=&quot;code-comment&quot;&gt;// skip &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; values.
&lt;/span&gt;        }

        $type = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_class-&amp;gt;fieldMappings[$field])) {
            $type = Type::getType($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_class-&amp;gt;fieldMappings[$field][&apos;type&apos;])-&amp;gt;getBindingType();
        &lt;span class=&quot;code-comment&quot;&gt;// BEGIN: Jasper N. Brouwer (11-08-2011)
&lt;/span&gt;        } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_class-&amp;gt;associationMappings[$field])) {
            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_class-&amp;gt;associationMappings[$field][&apos;isOwningSide&apos;]) {
                $targetClass = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getClassMetadata($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_class-&amp;gt;associationMappings[$field][&apos;targetEntity&apos;]);
                $targetColumn = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_class-&amp;gt;associationMappings[$field][&apos;joinColumns&apos;][0][&apos;referencedColumnName&apos;];
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($targetClass-&amp;gt;fieldNames[$targetColumn])) {
                    $type = Type::getType($targetClass-&amp;gt;fieldMappings[$targetClass-&amp;gt;fieldNames[$targetColumn]][&apos;type&apos;])-&amp;gt;getBindingType();
                }
            }
        &lt;span class=&quot;code-comment&quot;&gt;// END: Jasper N. Brouwer (11-08-2011)
&lt;/span&gt;        }
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (is_array($value)) {
            $type += Connection::ARRAY_PARAM_OFFSET;
        }

        $params[] = $value;
        $types[] = $type;
    }
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; array($params, $types);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I&apos;ll attach a new diff to.&lt;/p&gt;</comment>
                    <comment id="16317" author="guilhermeblanco" created="Sun, 14 Aug 2011 00:27:55 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;Thanks a lot to report this issue and attempt to fix it.&lt;br/&gt;
I extracted parts of your patch to resolve this issue, thanks again for investing your time on this.&lt;/p&gt;

&lt;p&gt;This issue is not fixed on trunk by commit &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/63a2f02f4ddea1ab9191b0e4acfd1d790d2247c7&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/63a2f02f4ddea1ab9191b0e4acfd1d790d2247c7&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11047" name="BasicEntityPersister.php-fixed.diff" size="801" author="jasper@nerdsweide.nl" created="Thu, 11 Aug 2011 19:02:27 +0000" />
                    <attachment id="11029" name="BasicEntityPersister.php.diff" size="775" author="jasper@nerdsweide.nl" created="Thu, 14 Jul 2011 13:25:51 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1272] Ability to choose another column name than ID as automatic record identifier in generate:doctrine:crude</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1272</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I got a message while crude generating because of my column names in the database model. They are not &quot;id&quot; named. Could be nice to get a parameter for that ?&lt;/p&gt;</description>
                <environment>Symfony RC4, php5.3</environment>
            <key id="12816">DDC-1272</key>
            <summary>Ability to choose another column name than ID as automatic record identifier in generate:doctrine:crude</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="yofab">yofab</reporter>
                        <labels>
                    </labels>
                <created>Tue, 12 Jul 2011 06:25:42 +0000</created>
                <updated>Sun, 14 Aug 2011 03:05:12 +0000</updated>
                    <resolved>Sun, 14 Aug 2011 03:05:12 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16320" author="guilhermeblanco" created="Sun, 14 Aug 2011 03:05:12 +0000"  >&lt;p&gt;This is a Symfony bug, not related to Doctrine\ORM package.&lt;/p&gt;

&lt;p&gt;Closing since it&apos;s not related to this tool, please open the issue report on correct place.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1271] Failing tests for PostgreSQL</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1271</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The &lt;tt&gt;pgsql.phpunit.xml&lt;/tt&gt; file:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;&amp;lt;php&amp;gt;
    &amp;lt;!-- &quot;Real&quot; test database --&amp;gt;
    &amp;lt;var name=&quot;db_type&quot; value=&quot;pdo_pgsql&quot;/&amp;gt;
    &amp;lt;var name=&quot;db_host&quot; value=&quot;localhost&quot; /&amp;gt;
    &amp;lt;var name=&quot;db_username&quot; value=&quot;root&quot; /&amp;gt;
    &amp;lt;var name=&quot;db_password&quot; value=&quot;root&quot; /&amp;gt;
    &amp;lt;var name=&quot;db_name&quot; value=&quot;doctrine_tests&quot; /&amp;gt;
    &amp;lt;var name=&quot;db_port&quot; value=&quot;5432&quot;/&amp;gt;

    &amp;lt;!-- Database for temporary connections (i.e. to drop/create the main database) --&amp;gt;
    &amp;lt;var name=&quot;tmpdb_type&quot; value=&quot;pdo_pgsql&quot;/&amp;gt;
    &amp;lt;var name=&quot;tmpdb_host&quot; value=&quot;localhost&quot; /&amp;gt;
    &amp;lt;var name=&quot;tmpdb_username&quot; value=&quot;root&quot; /&amp;gt;
    &amp;lt;var name=&quot;tmpdb_password&quot; value=&quot;root&quot; /&amp;gt;
    &amp;lt;var name=&quot;tmpdb_name&quot; value=&quot;doctrine_tests_tmp&quot; /&amp;gt;
    &amp;lt;var name=&quot;tmpdb_port&quot; value=&quot;5432&quot;/&amp;gt;
&amp;lt;/php&amp;gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;tt&gt;root&lt;/tt&gt; is a user created by me, with SUPERUSER provileges:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;ALTER ROLE root WITH SUPERUSER INHERIT NOCREATEROLE CREATEDB LOGIN PASSWORD &apos;root&apos;;&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Test output:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;PHPUnit 3.5.10 by Sebastian Bergmann.

.SSSSSS......................................F...............   61 / 1137 (  5%)
............................S................................  122 / 1137 ( 10%)
.............................................................  183 / 1137 ( 16%)
.............................................................  244 / 1137 ( 21%)
........................................F....................  305 / 1137 ( 26%)
..........................SSS................................  366 / 1137 ( 32%)
S............................................................  427 / 1137 ( 37%)
....................SS.......................................  488 / 1137 ( 42%)
.............................................................  549 / 1137 ( 48%)
............................................................S  610 / 1137 ( 53%)
..................S..........................................  671 / 1137 ( 59%)
.............................................................  732 / 1137 ( 64%)
.............................................................  793 / 1137 ( 69%)
.............................................................  854 / 1137 ( 75%)
.............................................................  915 / 1137 ( 80%)
.............................................................  976 / 1137 ( 85%)
............................................................. 1037 / 1137 ( 91%)
............................................................. 1098 / 1137 ( 96%)
.................

Time: 57 seconds, Memory: 145.25Mb

There were 2 failures:

1) Doctrine\Tests\ORM\Functional\BasicFunctionalTest::testRemove
Failed asserting that &amp;lt;integer:3&amp;gt; matches expected &amp;lt;integer:2&amp;gt;.

/mnt/fs/doctrine/github/Infranology/doctrine2/tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php:161

2) Doctrine\Tests\ORM\Functional\QueryDqlFunctionTest::testDateDiff
Should be roughly -10 (or -9)
Failed asserting that &amp;lt;string:-10 days&amp;gt; matches expected &amp;lt;integer:-10&amp;gt;.

/mnt/fs/doctrine/github/Infranology/doctrine2/tests/Doctrine/Tests/ORM/Functional/QueryDqlFunctionTest.php:280

--

Deprecated PHPUnit features are being used

47, ommited by me :)

--

There were 15 skipped tests:

1) Doctrine\Tests\ORM\Query\DqlGenerationTest::testSelect
Not yet implemented.

/mnt/fs/doctrine/github/Infranology/doctrine2/tests/Doctrine/Tests/ORM/Criteria/DqlGenerationTest.php:40

2) Doctrine\Tests\ORM\Query\DqlGenerationTest::testSelectDistinct
Not yet implemented.

/mnt/fs/doctrine/github/Infranology/doctrine2/tests/Doctrine/Tests/ORM/Criteria/DqlGenerationTest.php:40

3) Doctrine\Tests\ORM\Query\DqlGenerationTest::testSelectJoin
Not yet implemented.

/mnt/fs/doctrine/github/Infranology/doctrine2/tests/Doctrine/Tests/ORM/Criteria/DqlGenerationTest.php:40

4) Doctrine\Tests\ORM\Query\DqlGenerationTest::testSelectWhere
Not yet implemented.

/mnt/fs/doctrine/github/Infranology/doctrine2/tests/Doctrine/Tests/ORM/Criteria/DqlGenerationTest.php:40

5) Doctrine\Tests\ORM\Query\DqlGenerationTest::testSelectWhereIn
Not yet implemented.

/mnt/fs/doctrine/github/Infranology/doctrine2/tests/Doctrine/Tests/ORM/Criteria/DqlGenerationTest.php:40

6) Doctrine\Tests\ORM\Query\DqlGenerationTest::testDelete
Not yet implemented.

/mnt/fs/doctrine/github/Infranology/doctrine2/tests/Doctrine/Tests/ORM/Criteria/DqlGenerationTest.php:40

7) Doctrine\Tests\ORM\Functional\CompositePrimaryKeyTest::testCompositeCollectionMemberExpression
How to test this?

/mnt/fs/doctrine/github/Infranology/doctrine2/tests/Doctrine/Tests/ORM/Functional/CompositePrimaryKeyTest.php:83

8) Doctrine\Tests\ORM\Functional\SchemaTool\MySqlSchemaToolTest::testGetCreateSchemaSql
The Doctrine\Tests\ORM\Functional\SchemaTool\MySqlSchemaToolTest requires the use of mysql.

/mnt/fs/doctrine/github/Infranology/doctrine2/tests/Doctrine/Tests/ORM/Functional/SchemaTool/MySqlSchemaToolTest.php:15

9) Doctrine\Tests\ORM\Functional\SchemaTool\MySqlSchemaToolTest::testGetCreateSchemaSql2
The Doctrine\Tests\ORM\Functional\SchemaTool\MySqlSchemaToolTest requires the use of mysql.

/mnt/fs/doctrine/github/Infranology/doctrine2/tests/Doctrine/Tests/ORM/Functional/SchemaTool/MySqlSchemaToolTest.php:15

10) Doctrine\Tests\ORM\Functional\SchemaTool\MySqlSchemaToolTest::testGetCreateSchemaSql3
The Doctrine\Tests\ORM\Functional\SchemaTool\MySqlSchemaToolTest requires the use of mysql.

/mnt/fs/doctrine/github/Infranology/doctrine2/tests/Doctrine/Tests/ORM/Functional/SchemaTool/MySqlSchemaToolTest.php:15

11) Doctrine\Tests\ORM\Functional\Ticket\DDC1050Test::testPerformance
performance skipped

/mnt/fs/doctrine/github/Infranology/doctrine2/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1050Test.php:15

12) Doctrine\Tests\ORM\Functional\Ticket\DDC758Test::testManyToManyMergeAssociationAdds
Destroys testsuite

/mnt/fs/doctrine/github/Infranology/doctrine2/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC758Test.php:17

13) Doctrine\Tests\ORM\Functional\Ticket\DDC758Test::testManyToManyMergeAssociationRemoves
Destroys testsuite

/mnt/fs/doctrine/github/Infranology/doctrine2/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC758Test.php:17

14) Doctrine\Tests\ORM\Mapping\PHPMappingDriverTest::testDiscriminatorColumnDefaults
PHP Mapping Drivers have no defaults.

/mnt/fs/doctrine/github/Infranology/doctrine2/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php:284

15) Doctrine\Tests\ORM\Mapping\StaticPHPMappingDriverTest::testDiscriminatorColumnDefaults
PHP Mapping Drivers have no defaults.

/mnt/fs/doctrine/github/Infranology/doctrine2/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php:284&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>Ubuntu 10.10 x86_64&lt;br/&gt;
PostgreSQL 8.4.4&lt;br/&gt;
PHP 5.3.3 &amp;amp; pdo_pgsql</environment>
            <key id="12815">DDC-1271</key>
            <summary>Failing tests 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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="eriksencosta">Eriksen Costa</reporter>
                        <labels>
                    </labels>
                <created>Mon, 11 Jul 2011 18:58:10 +0000</created>
                <updated>Sun, 31 Jul 2011 09:56:40 +0000</updated>
                    <resolved>Sun, 31 Jul 2011 09:56:40 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16243" author="beberlei" created="Sun, 31 Jul 2011 09:56:40 +0000"  >&lt;p&gt;I don&apos;t get the first error, but the second is fixed now.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1260] Enable nesting of OR and AND statements in DQL queries</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1260</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Currently it is not allowed to nest AND and OR conditions in themselves. However, this comes in handy if you try to do a dynamic query rewriting, where you want to add some more conditions without knowing the original query before.&lt;/p&gt;

&lt;p&gt;The fix is trivial, just allow to add AND in AND. The same needs to be done for OR. Patch will follow in a second...&lt;/p&gt;</description>
                <environment></environment>
            <key id="12803">DDC-1260</key>
            <summary>Enable nesting of OR and AND statements in DQL queries</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="t3andi">Andreas F&#246;rthner</reporter>
                        <labels>
                    </labels>
                <created>Fri, 8 Jul 2011 14:30:59 +0000</created>
                <updated>Mon, 8 Aug 2011 05:10:29 +0000</updated>
                    <resolved>Mon, 8 Aug 2011 05:10:29 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16125" author="guilhermeblanco" created="Fri, 8 Jul 2011 14:44:24 +0000"  >&lt;p&gt;This can lead to unpredictable situations inside QueryBuilder.&lt;br/&gt;
Maybe we can add a &quot;merge&quot; function to Expr\Composite, I&apos;m not sure.&lt;/p&gt;

&lt;p&gt;I need to actually test it on every driver to make sure if it doesn&apos;t break anything. It was not originally designed to hold same instances. If you pay attention:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;((a AND b) AND c) 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Is the same as:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;a AND b AND c
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Can&apos;t you make a check internally and use addMultiple?&lt;br/&gt;
In the meantime, I can make tests to check if it doesn&apos;t break anything else.&lt;/p&gt;</comment>
                    <comment id="16295" author="guilhermeblanco" created="Mon, 8 Aug 2011 05:10:29 +0000"  >&lt;p&gt;In this commit: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/816ce41f638d28934c79a12ef27f954124b2639e&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/816ce41f638d28934c79a12ef27f954124b2639e&lt;/a&gt;&lt;br/&gt;
I applied the support to this improvement, since it does not mess with generated code.&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10002">
                <name>Dependency</name>
                                                <inwardlinks description="is required for">
                            <issuelink>
            <issuekey id="12861">DDC-1299</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="12796">DDC-1255</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1258] Add Debug Listener for UnitOfWork</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1258</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Sometimes you need to debug complex scenarios where cascade operations fail or something weird happens in the UnitOfWork. There should be a listener that dumps the state of the identity map in &quot;onFlush&quot; so that you can more easily see whats going on.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12801">DDC-1258</key>
            <summary>Add Debug Listener for UnitOfWork</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</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 12:27:42 +0000</created>
                <updated>Sat, 9 Jul 2011 20:18:00 +0000</updated>
                    <resolved>Sat, 9 Jul 2011 20:18:00 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1257] Duplicate PHP methods generated from XML metadata lifecycle-callbacks</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1257</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;If lifecycle callbacks are added to XML metadata like so:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-xml&quot;&gt;	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;lifecycle-callbacks&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;lifecycle-callback type=&lt;span class=&quot;code-quote&quot;&gt;&quot;prePersist&quot;&lt;/span&gt; method=&lt;span class=&quot;code-quote&quot;&gt;&quot;validate&quot;&lt;/span&gt; /&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;lifecycle-callback type=&lt;span class=&quot;code-quote&quot;&gt;&quot;preUpdate&quot;&lt;/span&gt; method=&lt;span class=&quot;code-quote&quot;&gt;&quot;validate&quot;&lt;/span&gt; /&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/lifecycle-callbacks&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The &lt;tt&gt;validate()&lt;/tt&gt; method will appear twice in an entity generated from this metadata.&lt;/p&gt;</description>
                <environment>Zend Server 5.1.0, PHP 5.3.5, Apache 2.2.10, Linux (SUSE)</environment>
            <key id="12800">DDC-1257</key>
            <summary>Duplicate PHP methods generated from XML metadata lifecycle-callbacks</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="skl">Stephen Lang</reporter>
                        <labels>
                    </labels>
                <created>Fri, 8 Jul 2011 10:41:58 +0000</created>
                <updated>Sat, 9 Jul 2011 13:16:54 +0000</updated>
                    <resolved>Sat, 9 Jul 2011 13:16:54 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.0.7</fixVersion>
                <fixVersion>2.1.1</fixVersion>
                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16132" author="beberlei" created="Sat, 9 Jul 2011 13:16:54 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1251] EntityGenerator uses non-existing constant T_AMPERSAND</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1251</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;As per &lt;a href=&quot;http://www.php.net/manual/en/tokens.php&quot; class=&quot;external-link&quot;&gt;http://www.php.net/manual/en/tokens.php&lt;/a&gt; - the T_AMPERSAND token does not exist. I&apos;m not sure what was the intent, but the entity generator fails on the following code:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;            $elems = array_map(function($el) {
                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $el;
            }, $elems);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Due to the way notices are handled in Symfony, this basically stops the execution of the generator entirely. Not so great.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;  [ErrorException]                                                                                            
  Notice: Use of undefined constant T_AMPERSAND - assumed &apos;T_AMPERSAND&apos; in ./vendor/doctrine/lib/Doctrine/ORM/Tools/EntityGenerator.php line 454
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Commenting out the offending line makes it work fine though, so I think it&apos;s just choking while expecting a function that takes args by reference or something.&lt;/p&gt;</description>
                <environment>Irrelevant</environment>
            <key id="12791">DDC-1251</key>
            <summary>EntityGenerator uses non-existing constant T_AMPERSAND</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/blocker.png">Blocker</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="seldaek">Jordi Boggiano</reporter>
                        <labels>
                    </labels>
                <created>Tue, 5 Jul 2011 15:45:46 +0000</created>
                <updated>Sat, 9 Jul 2011 12:57:33 +0000</updated>
                    <resolved>Sat, 9 Jul 2011 12:57:33 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.0.7</fixVersion>
                <fixVersion>2.1.1</fixVersion>
                <fixVersion>2.2</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16131" author="beberlei" created="Sat, 9 Jul 2011 12:57:33 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1236] GROUP BY does not work with functions</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1236</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The following query fails with &lt;tt&gt;Cannot group by undefined identification variable&lt;/tt&gt; (yes CAST-Function was added). Would be nice to have such a feature,&lt;/p&gt;

&lt;div class=&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; Task t
...
&lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt;
  ...
&lt;span class=&quot;code-keyword&quot;&gt;GROUP&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;BY&lt;/span&gt;
  CAST(t.scheduledDate as date)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; </description>
                <environment></environment>
            <key id="12760">DDC-1236</key>
            <summary>GROUP BY does not work with functions</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="h-andreas">Andreas H&#246;rnicke</reporter>
                        <labels>
                    </labels>
                <created>Wed, 29 Jun 2011 08:46:43 +0000</created>
                <updated>Fri, 2 Dec 2011 17:10:54 +0000</updated>
                    <resolved>Fri, 2 Dec 2011 17:10:54 +0000</resolved>
                            <version>2.0-RC1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>4</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="16096" author="beberlei" created="Wed, 29 Jun 2011 08:54:15 +0000"  >&lt;p&gt;This is documented in the EBNF of DQL that this not works.&lt;/p&gt;

&lt;p&gt;Marked as improvement.&lt;/p&gt;</comment>
                    <comment id="16655" author="dimirc" created="Tue, 18 Oct 2011 07:07:52 +0000"  >&lt;p&gt;Is there any workaround?&lt;/p&gt;</comment>
                    <comment id="16656" author="h-andreas" created="Tue, 18 Oct 2011 07:41:51 +0000"  >&lt;p&gt;Using a native query is a workaround.&lt;/p&gt;</comment>
                    <comment id="16658" author="beberlei" created="Tue, 18 Oct 2011 07:56:53 +0000"  >&lt;p&gt;There is another workaround that should work:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT ...,   CAST(t.scheduledDate as date) AS castedDate
FROM Task t
...
WHERE
  ...
GROUP BY
castedDate
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="16659" author="dimirc" created="Tue, 18 Oct 2011 08:03:13 +0000"  >&lt;p&gt;I tried this:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;SELECT ... ,MONTH(t.fechaCreacion) as mes 
FROM Tramite t 
...
WHERE 
... 
GROUP BY 
mes &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;But I get this error:&lt;/p&gt;

&lt;p&gt;Message: &lt;span class=&quot;error&quot;&gt;&amp;#91;Semantical Error&amp;#93;&lt;/span&gt; line 0, col 202 near &apos;mes &apos;: Error: &apos;mes&apos; does not point to a Class.&lt;/p&gt;</comment>
                    <comment id="16660" author="beberlei" created="Tue, 18 Oct 2011 08:19:25 +0000"  >&lt;p&gt;Then only native query is a workaround for now &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;/p&gt;

&lt;p&gt;We work on this for 2.2&lt;/p&gt;</comment>
                    <comment id="16661" author="dimirc" created="Tue, 18 Oct 2011 08:26:54 +0000"  >&lt;p&gt;Ok I&apos;ll need to move my code to native query...  Hope you can fix this with 2.2 or earlier &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/thumbs_up.gif&quot; height=&quot;19&quot; width=&quot;19&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; ... Thanks&lt;/p&gt;</comment>
                    <comment id="16767" author="alexb" created="Thu, 3 Nov 2011 13:25:38 +0000"  >&lt;p&gt;BTW I have put in a fix and so far have had no issues.... but this should be considered hack as I&apos;m not very familiar with the internal workings of Doctrine.&lt;/p&gt;

&lt;p&gt;See doctrine-dev groups:&lt;br/&gt;
&lt;a href=&quot;https://groups.google.com/d/topic/doctrine-dev/QZMMnYV4V_8/discussion&quot; class=&quot;external-link&quot;&gt;https://groups.google.com/d/topic/doctrine-dev/QZMMnYV4V_8/discussion&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;HTH&lt;/p&gt;

&lt;p&gt;Alex&lt;/p&gt;</comment>
                    <comment id="16941" author="guilhermeblanco" created="Fri, 2 Dec 2011 17:10:54 +0000"  >&lt;p&gt;Since this commit: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/2642daa43851878688d01625f272ff5874cac7b2&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/2642daa43851878688d01625f272ff5874cac7b2&lt;/a&gt;&lt;br/&gt;
This issue is solved through the SelectExpression + Hidden + ResultVariable refer.&lt;/p&gt;

&lt;div class=&quot;code panel&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 
    ..., CAST(t.scheduledDate as date) AS HIDDEN groupDate
FROM Task t
    ...
WHERE
    ...
GROUP BY
    groupDate
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1225] Invalid SQL generated (extra comma) when joining to entity with composite PK</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1225</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;            $qb-&amp;gt;from(&apos;Tournaments_Model_StageBracketTeamRegistration&apos;, &apos;r&apos;)
               -&amp;gt;innerJoin(&apos;r.teamSelection&apos;, &apos;ts&apos;)
               -&amp;gt;innerJoin(&apos;ts.players&apos;, &apos;tsp&apos;)
               -&amp;gt;select(&apos;r, ts, tsp&apos;)
               -&amp;gt;where(&apos;r.stageBracket = ?1&apos;)
               -&amp;gt;andWhere(&apos;r.opponentIsReserve = &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;&apos;)
               -&amp;gt;orderBy(&apos;r.registrationDateTime&apos;)
               -&amp;gt;setParameter(1, $bracket);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Generates:&lt;/p&gt;

&lt;div class=&quot;code panel&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_.opponent_is_reserve AS opponent_is_reserve1, s0_.opponent_checked_in AS opponent_checked_in2, s0_.registration_date_time AS registration_date_time3, t1_.id AS id4,, s0_.type AS type5, s0_.stage_bracket_id AS stage_bracket_id6, s2_.team_selection_id AS team_selection_id7, t1_.team_id AS team_id8, t3_.team_selection_id AS team_selection_id9, t3_.player_id AS player_id10
FROM stage_bracket_team_registrations s2_
INNER JOIN stage_bracket_registrations s0_ ON s2_.id = s0_.id
INNER JOIN team_selections t1_ ON s2_.team_selection_id = t1_.id
INNER JOIN team_selection_players t3_ ON t1_.id = t3_.team_selection_id
WHERE s0_.stage_bracket_id = 22 AND s0_.opponent_is_reserve = 0
ORDER BY s0_.registration_date_time ASC&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Note the 2nd comma after &quot;t1_.id AS id4&quot;. TeamSelectionPlayer uses a composite PK. I have attached the relevant entity classes.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12744">DDC-1225</key>
            <summary>Invalid SQL generated (extra comma) when joining to entity with composite PK</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="darkangel">Glen Ainscow</reporter>
                        <labels>
                    </labels>
                <created>Thu, 23 Jun 2011 16:15:08 +0000</created>
                <updated>Mon, 29 Aug 2011 19:56:26 +0000</updated>
                    <resolved>Mon, 15 Aug 2011 15:47:42 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.1.2</fixVersion>
                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="16228" author="beberlei" created="Thu, 28 Jul 2011 21:31:08 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                    <comment id="16312" author="darkangel" created="Fri, 12 Aug 2011 19:40:45 +0000"  >&lt;p&gt;Where can I find the changeset? Would it be easy for me to apply the changes to 2.1.0?&lt;/p&gt;</comment>
                    <comment id="16313" author="darkangel" created="Fri, 12 Aug 2011 20:32:41 +0000"  >&lt;p&gt;No worries, found the changes here: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/196632978cf39bc3914e14739767cb5b72a8df9d&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/196632978cf39bc3914e14739767cb5b72a8df9d&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="16315" author="darkangel" created="Sat, 13 Aug 2011 18:59:10 +0000"  >&lt;p&gt;This is still an issue:
&lt;br class=&quot;atl-forced-newline&quot; /&gt;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;            $qb-&amp;gt;from(&apos;Tournaments_Model_StageBracketRegisteredPlayer&apos;, &apos;p&apos;)
               -&amp;gt;select(&apos;p&apos;)
               -&amp;gt;where(&apos;p.stageBracket = ?1&apos;)
               -&amp;gt;andWhere(&apos;p.player = ?2&apos;)
               -&amp;gt;setParameter(1, $bracket)
               -&amp;gt;setParameter(2, $player)
               -&amp;gt;getQuery()
               -&amp;gt;getOneOrNullResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Results in:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT , s0_.stage_bracket_id AS stage_bracket_id0, s0_.player_id AS player_id1, s0_.game_account_id AS game_account_id2 FROM stage_bracket_registered_players s0_ WHERE s0_.stage_bracket_id = 14 AND s0_.player_id = 5
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="16319" author="guilhermeblanco" created="Sun, 14 Aug 2011 03:03:26 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I attempted to create a failing test case for this issue, but either the provided entities are not enough or the issue is not reproducible anymore (it was already fixed in latest 2.2-DEV).&lt;/p&gt;

&lt;p&gt;Could you please try to compile everything into a test case?&lt;/p&gt;


&lt;p&gt;Cheers, &lt;/p&gt;</comment>
                    <comment id="16335" author="darkangel" created="Mon, 15 Aug 2011 07:50:12 +0000"  >&lt;p&gt;Hi Guilherme,&lt;/p&gt;

&lt;p&gt;I&apos;ll attach 2 simple entities for testing. You can run the following query:
&lt;br class=&quot;atl-forced-newline&quot; /&gt;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;        $qb-&amp;gt;from(&apos;App_Model_TestEntity1&apos;, &apos;te1&apos;)
           -&amp;gt;select(&apos;te1&apos;)
           -&amp;gt;where(&apos;te1.testEntity2 = ?1&apos;)
           -&amp;gt;setParameter(1, 0)
           -&amp;gt;getQuery()
           -&amp;gt;getOneOrNullResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I&apos;m running this against 2.1.0 + &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/196632978cf39bc3914e14739767cb5b72a8df9d&quot; class=&quot;external-link&quot;&gt;this&lt;/a&gt; change.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</comment>
                    <comment id="16340" author="guilhermeblanco" created="Mon, 15 Aug 2011 15:47:42 +0000"  >&lt;p&gt;Fixed in this commit &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/6857134f36097187ab2f0d932f4f1d9ffab12854&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/6857134f36097187ab2f0d932f4f1d9ffab12854&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for the report!&lt;/p&gt;</comment>
                    <comment id="16399" author="beberlei" created="Mon, 29 Aug 2011 19:56:14 +0000"  >&lt;p&gt;Merged into 2.1.x&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11048" name="models.zip" size="646" author="darkangel" created="Mon, 15 Aug 2011 07:51:24 +0000" />
                    <attachment id="11016" name="models.zip" size="2010" author="darkangel" created="Thu, 23 Jun 2011 16:15:08 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1213] Make Bit comparsion available</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1213</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When you go to compare Bit Values in MySQL Database you can do thiy by &quot;&amp;amp;&quot; or &quot;|&quot; If you do this with Doctrine 2 you got an exception like following:&lt;br/&gt;
Message: &lt;span class=&quot;error&quot;&gt;&amp;#91;Syntax Error&amp;#93;&lt;/span&gt; line 0, col 161: Error: Expected =, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, &amp;gt;, &amp;gt;=, != got &apos;&amp;amp;&apos; &lt;/p&gt;

&lt;p&gt;So i fixed this problem for me:&lt;/p&gt;

&lt;p&gt;Doctrine\ORM\Query\Parser:&lt;br/&gt;
Line 2633&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;    /**
     * ComparisonOperator ::= &lt;span class=&quot;code-quote&quot;&gt;&quot;=&quot;&lt;/span&gt; | &lt;span class=&quot;code-quote&quot;&gt;&quot;&amp;lt;&quot;&lt;/span&gt; | &lt;span class=&quot;code-quote&quot;&gt;&quot;&amp;lt;=&quot;&lt;/span&gt; | &lt;span class=&quot;code-quote&quot;&gt;&quot;&amp;lt;&amp;gt;&quot;&lt;/span&gt; | &lt;span class=&quot;code-quote&quot;&gt;&quot;&amp;gt;&quot;&lt;/span&gt; | &lt;span class=&quot;code-quote&quot;&gt;&quot;&amp;gt;=&quot;&lt;/span&gt; | &lt;span class=&quot;code-quote&quot;&gt;&quot;!=&quot;&lt;/span&gt; | &lt;span class=&quot;code-quote&quot;&gt;&quot;&amp;amp;&quot;&lt;/span&gt; | &lt;span class=&quot;code-quote&quot;&gt;&quot;|&quot;&lt;/span&gt;
     *
     * @&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; string
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function ComparisonOperator()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;switch&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_lexer-&amp;gt;lookahead[&apos;value&apos;]) {
            &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; &apos;=&apos;:
                $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;match(Lexer::T_EQUALS);

                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &apos;=&apos;;

            &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; &apos;&amp;lt;&apos;:
                $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;match(Lexer::T_LOWER_THAN);
                $&lt;span class=&quot;code-keyword&quot;&gt;operator&lt;/span&gt; = &apos;&amp;lt;&apos;;

                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_lexer-&amp;gt;isNextToken(Lexer::T_EQUALS)) {
                    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;match(Lexer::T_EQUALS);
                    $&lt;span class=&quot;code-keyword&quot;&gt;operator&lt;/span&gt; .= &apos;=&apos;;
                } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_lexer-&amp;gt;isNextToken(Lexer::T_GREATER_THAN)) {
                    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;match(Lexer::T_GREATER_THAN);
                    $&lt;span class=&quot;code-keyword&quot;&gt;operator&lt;/span&gt; .= &apos;&amp;gt;&apos;;
                }

                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;operator&lt;/span&gt;;

            &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; &apos;&amp;gt;&apos;:
                $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;match(Lexer::T_GREATER_THAN);
                $&lt;span class=&quot;code-keyword&quot;&gt;operator&lt;/span&gt; = &apos;&amp;gt;&apos;;

                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_lexer-&amp;gt;isNextToken(Lexer::T_EQUALS)) {
                    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;match(Lexer::T_EQUALS);
                    $&lt;span class=&quot;code-keyword&quot;&gt;operator&lt;/span&gt; .= &apos;=&apos;;
                }

                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;operator&lt;/span&gt;;

            &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; &apos;!&apos;:
                $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;match(Lexer::T_NEGATE);
                $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;match(Lexer::T_EQUALS);

                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &apos;&amp;lt;&amp;gt;&apos;;
            /* Changes by SR-RM to make Bit Oprations available */
            &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; &apos;&amp;amp;&apos;:
            	$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;match(LEXER::T_BIT_AND);
            	&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &apos;&amp;amp;&apos;;
            &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; &apos;|&apos;:
            	$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;match(LEXER::T_BIT_OR);
            	&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &apos;|&apos;;
            /* Changes by SR-RM End */
            &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;:
                $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;syntaxError(&apos;=, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, &amp;gt;, &amp;gt;=, !=, &amp;amp;, |&apos;);
        }
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Doctrine\ORM\Query\Lexer:&lt;br/&gt;
Line 53&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/* Changes SR-RM to make Bit Oprations available */
&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; T_BIT_AND             = 30;
&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; T_BIT_OR               = 31;
/* Changes by SR-RM End */
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Line 193&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/* Changes SR-RM to make Bit Oprations available */
&lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; &apos;&amp;amp;&apos;: &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; self::T_BIT_AND;
&lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; &apos;|&apos;: &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; self::T_BIT_OR;
/* Changes by SR-RM End */
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So, maybe you gonna ad this in next Release &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;Thanks or your good Job&lt;/p&gt;</description>
                <environment>MAC OSX 10.7</environment>
            <key id="12721">DDC-1213</key>
            <summary>Make Bit comparsion available</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="scyks">Ronald Marske</reporter>
                        <labels>
                    </labels>
                <created>Fri, 17 Jun 2011 12:04:03 +0000</created>
                <updated>Thu, 9 Feb 2012 13:31:10 +0000</updated>
                    <resolved>Mon, 19 Dec 2011 19:44:00 +0000</resolved>
                            <version>2.0.5</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17050" author="beberlei" created="Mon, 19 Dec 2011 17:08:04 +0000"  >&lt;p&gt;This issue is referenced in Github Pull-Request GH-230&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/230&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/230&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17056" author="beberlei" created="Mon, 19 Dec 2011 18:37:03 +0000"  >&lt;p&gt;Related Pull Request was closed: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/230&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/230&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17057" author="beberlei" created="Mon, 19 Dec 2011 18:44:03 +0000"  >&lt;p&gt;This issue is referenced in Github Pull-Request GH-231&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/231&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/231&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17058" author="beberlei" created="Mon, 19 Dec 2011 19:09:04 +0000"  >&lt;p&gt;Related Pull Request was closed: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/231&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/231&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17059" author="beberlei" created="Mon, 19 Dec 2011 19:44:00 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                    <comment id="17381" author="historika" created="Thu, 9 Feb 2012 07:05:32 +0000"  >&lt;p&gt;I do miss this patch in the recently checked out 2.2 branch. Is there any reason, it was skipped, even if the fix-version here is still 2.2?&lt;br/&gt;
I really miss this feature and was unable to get it to work by applying it manually. The parser seems to have troubles applying my parameters :\&lt;/p&gt;</comment>
                    <comment id="17383" author="fabio.bat.silva" created="Thu, 9 Feb 2012 12:25:26 +0000"  >&lt;p&gt;Hi Markus&lt;/p&gt;

&lt;p&gt;The bit comparisons was been added as DQL functions,&lt;br/&gt;
Can you explain your problem ? &lt;/p&gt;</comment>
                    <comment id="17384" author="historika" created="Thu, 9 Feb 2012 13:02:46 +0000"  >&lt;p&gt;Hi Fabio, thank you for the fast reply and the great Doctrine anyway!&lt;/p&gt;

&lt;p&gt;My problem is the following:&lt;br/&gt;
I have an &lt;tt&gt;@Entity&lt;/tt&gt; called Picture with some columns and the following&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;	/** @Column(type = &quot;integer&quot;, nullable = false)
	 * @var int */
	private $visibility;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now I try to fetch entities from the database that satisfy some special bit mask in this &lt;tt&gt;visibility&lt;/tt&gt; attribute by doing the following:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;	/** @var $query \Doctrine\ORM\Query */
	$query = $this-&amp;gt;entityManager-&amp;gt;createQuery(&apos;SELECT e FROM Classes\Models\Event e JOIN e.pictures p WHERE p.visibility &amp;amp; :visibility = :visibility ORDER BY p.uploadTime DESC&apos;);
	$query-&amp;gt;setParameter(&apos;visibility&apos;, \Classes\Session::instance()-&amp;gt;getActualUsersRights());
	return $query-&amp;gt;getResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The error reported is:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;Fatal error:  Uncaught exception &apos;Doctrine\ORM\Query\QueryException&apos; with message &apos;[Syntax Error] line 0, col 78: Error: Expected end of string, got &apos;=&apos;&apos; in ...\Doctrine\ORM\Query\QueryException.php:42
Stack trace:
#0 ...\Doctrine\ORM\Query\Parser.php(380): Doctrine\ORM\Query\QueryException::syntaxError(&apos;line 0, col 78:...&apos;)
#1 ...\Doctrine\ORM\Query\Parser.php(745): Doctrine\ORM\Query\Parser-&amp;gt;syntaxError(&apos;end of string&apos;)
#2 ...\Doctrine\ORM\Query\Parser.php(213): Doctrine\ORM\Query\Parser-&amp;gt;QueryLanguage()
#3 ...\Doctrine\ORM\Query\Parser.php(288): Doctrine\ORM\Query\Parser-&amp;gt;getAST()
#4 ...\Doctrine\ORM\Query.php(231): Doctrine\ORM\Query\Parser-&amp;gt;parse()
#5 ...\Doctrine\ORM\Query.php(242): Doctrine\ORM\Query-&amp;gt;_parse()
#6 in &amp;lt;b&amp;gt;...\Doctrine\ORM\Query\QueryException.php&amp;lt;/b&amp;gt; on line &amp;lt;b&amp;gt;42&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Please note: I applied the above patch by hand to the Doctrine 2.2 code. Before that I got an &quot;expected = got &apos;&amp;amp;&apos;&quot; exception in the query.&lt;/p&gt;

&lt;p&gt;Am I wrong, if I look through the code and try to find the suggested lines from Ronald there? They aren&apos;t in the downloadable package and even not in the SVN, I checked out this morning from &lt;tt&gt;&lt;a href=&quot;http://svn.github.com/doctrine/doctrine2.git&quot; class=&quot;external-link&quot;&gt;http://svn.github.com/doctrine/doctrine2.git&lt;/a&gt;&lt;/tt&gt;&lt;/p&gt;</comment>
                    <comment id="17387" author="fabio.bat.silva" created="Thu, 9 Feb 2012 13:19:44 +0000"  >&lt;p&gt;Hi Markus&lt;/p&gt;

&lt;p&gt;The &quot;&amp;amp;&quot; and &quot;|&quot; is not available for database compatibilities&lt;br/&gt;
You should use the DQL function BIT_AND or BIT_OR&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;WHERE BIT_AND( p.visibility, :visibility )
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="17388" author="historika" created="Thu, 9 Feb 2012 13:31:10 +0000"  >&lt;p&gt;Thanks a lot Fabio,&lt;/p&gt;

&lt;p&gt;stupid me, sorry.&lt;/p&gt;

&lt;p&gt;For completeness, I now use:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;SELECT e FROM Classes\Models\Event e JOIN e.pictures p WHERE BIT_AND(p.visibility, :visibility) = :visibility ORDER BY p.uploadTime DESC
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and seem to get past the critical part.&lt;/p&gt;

&lt;p&gt;Now I can go on trying to get the project back to work with the new Doctrine 2.2 &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;br/&gt;
I know its worth the work &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;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1170] XML Mapping : add attribute &quot;column-definition&quot; for tag &quot;id&quot;</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1170</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;b&gt;XML mapping :&lt;/b&gt;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&amp;lt;id name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt; type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;&amp;gt;
      &amp;lt;generator strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;IDENTITY&quot;&lt;/span&gt;/&amp;gt;
&amp;lt;/id&amp;gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;b&gt;Generate SQL :&lt;/b&gt;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;id &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; auto_increment not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;b&gt;It&apos;s not possible with XML mapping to have :&lt;/b&gt;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; id &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; UNSIGNED not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; auto_increment&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Because tag &quot;id&quot; doesn&apos;t support &quot;column-definition&quot; attribute.&lt;br/&gt;
We can have same problem for others types parameters.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;I suggest this solution :  in file &amp;lt;Doctrine/ORM/Mapping/Driver/XmlDriver.php&amp;gt;&lt;/b&gt;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;// add &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; code to line 226 ( in the &lt;span class=&quot;code-quote&quot;&gt;&quot;Evaluate &amp;lt;id ...&amp;gt;&quot;&lt;/span&gt; bloc after the array &lt;span class=&quot;code-quote&quot;&gt;&quot;mapping&quot;&lt;/span&gt; )  :
&lt;/span&gt;
&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;(isset($idElement[&apos;column-definition&apos;])){
                $mapping[&apos;columnDefinition&apos;] = (string)$idElement[&apos;column-definition&apos;];
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;b&gt;New XML mapping :&lt;/b&gt;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&amp;lt;id name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt; type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt; column=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt; column-definition=&lt;span class=&quot;code-quote&quot;&gt;&quot;INT unsigned NOT NULL&quot;&lt;/span&gt; &amp;gt;
      &amp;lt;generator strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;IDENTITY&quot;&lt;/span&gt;/&amp;gt;
&amp;lt;/id&amp;gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;b&gt;Warning : &quot;column-definition&quot; must not contains &quot;AUTO_INCREMENT&quot; (added automaticly)  :&lt;/b&gt;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&amp;lt;id name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt; type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt; column=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt; column-definition=&lt;span class=&quot;code-quote&quot;&gt;&quot;INT unsigned NOT NULL AUTO_INCREMENT&quot;&lt;/span&gt; &amp;gt;
      &amp;lt;generator strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;IDENTITY&quot;&lt;/span&gt;/&amp;gt;
&amp;lt;/id&amp;gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;With &quot;AUTO_INCREMENT&quot; in column-definition all foreign keys contain this parameter.&lt;/p&gt;</description>
                <environment>Linux, Doctrine ORM 2.0.3 on Symfony2, MySQL.</environment>
            <key id="12668">DDC-1170</key>
            <summary>XML Mapping : add attribute &quot;column-definition&quot; for tag &quot;id&quot;</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="nichfr">Nicolas C</reporter>
                        <labels>
                    </labels>
                <created>Thu, 26 May 2011 10:21:53 +0000</created>
                <updated>Mon, 5 Dec 2011 20:17:07 +0000</updated>
                    <resolved>Mon, 5 Dec 2011 20:17:07 +0000</resolved>
                            <version>2.0.3</version>
                                <fixVersion>2.2</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16948" author="guilhermeblanco" created="Mon, 5 Dec 2011 20:17:07 +0000"  >&lt;p&gt;Fixed since this commit: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/eaec259186b7f19a22b7632f30ea4d1ee94705f2&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/eaec259186b7f19a22b7632f30ea4d1ee94705f2&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1165] [ Proposal] entityMethod#find() for Entity with ForeignKey as PrimaryKey, pass entity object instead of id</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1165</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi all, i am currently using Doctrine 2.1Beta because i have an entity with foreignKey  as primaryKey:&lt;/p&gt;

&lt;p&gt;class IndividualsStatus&lt;br/&gt;
{&lt;br/&gt;
    /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@var Individuals&lt;br/&gt;
     *&lt;/li&gt;
	&lt;li&gt;@Id&lt;/li&gt;
	&lt;li&gt;@ManyToOne(targetEntity=&quot;Individuals&quot;, inversedBy=&quot;diagnosers&quot;, cascade=
{&quot;persist&quot;,&quot;refresh&quot;})&lt;br/&gt;
     * @JoinColumns({
     *   @JoinColumn(name=&quot;individuals_id&quot;, referencedColumnName=&quot;id&quot;)
     * })&lt;br/&gt;
     */&lt;br/&gt;
    private $individuals;&lt;br/&gt;
&lt;br/&gt;
    /**&lt;br/&gt;
     * @var Diagnosers&lt;br/&gt;
     *&lt;br/&gt;
     * @Id&lt;br/&gt;
     * @ManyToOne(targetEntity=&quot;Diagnosers&quot;, inversedBy=&quot;individuals&quot;, cascade={&quot;persist&quot;,&quot;refresh&quot;}
&lt;p&gt;)&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;@JoinColumns(
{
     *   @JoinColumn(name=&quot;diagnosers_id&quot;, referencedColumnName=&quot;id&quot;)
     * }
&lt;p&gt;)&lt;br/&gt;
     */&lt;br/&gt;
    private $diagnosers;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;    /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@var smallint $status&lt;br/&gt;
    *&lt;/li&gt;
	&lt;li&gt;@Column(name=&quot;status_individuals&quot;, type=&quot;smallint&quot;)&lt;br/&gt;
    */&lt;br/&gt;
    private $statusIndividuals;&lt;br/&gt;
}&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;i use the em find method to get an IndividualsStatus entity, i am expecting to do:&lt;/p&gt;

&lt;p&gt;$individuals = $em-&amp;gt;find(&apos;Individuals&apos;, 10); &lt;br/&gt;
$diagnosers = $em-&amp;gt;find(&apos;Diagnosers&apos;, 15); &lt;/p&gt;

&lt;p&gt;$individualsStatus = $em-&amp;gt;find(&apos;IndividualsStatus&apos;, array(&apos;individiduals&apos; =&amp;gt; $individuals, &apos;diagnosers&apos; =&amp;gt; $diagnosers)); &lt;/p&gt;

&lt;p&gt;But i have to do:&lt;br/&gt;
$individualsStatus = $em-&amp;gt;find(&apos;IndividualsStatus&apos;, array(&apos;individiduals&apos; =&amp;gt; $individuals-&amp;gt;getId(), &apos;diagnosers&apos; =&amp;gt; $diagnosers-&amp;gt;getId())); &lt;/p&gt;

&lt;p&gt;It&apos;s very trivial but maybe another people was expecting that too.&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;</description>
                <environment>Doctrine 2.1 Beta</environment>
            <key id="12658">DDC-1165</key>
            <summary>[ Proposal] entityMethod#find() for Entity with ForeignKey as PrimaryKey, pass entity object instead of id</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="benoit">Jonathan Clus</reporter>
                        <labels>
                    </labels>
                <created>Sat, 21 May 2011 21:20:47 +0000</created>
                <updated>Sun, 14 Aug 2011 03:49:05 +0000</updated>
                    <resolved>Sun, 14 Aug 2011 03:49:05 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16325" author="guilhermeblanco" created="Sun, 14 Aug 2011 03:49:05 +0000"  >&lt;p&gt;This issue is fixed in latest 2.2-DEV by this commit: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/63a2f02f4ddea1ab9191b0e4acfd1d790d2247c7&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/63a2f02f4ddea1ab9191b0e4acfd1d790d2247c7&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1161] DQL generate duplicate SQL Alias with CTI + oneToOne self referencing</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1161</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I have a Entity &quot;Content&quot; whith several childs entities like &quot;Page&quot; , &quot;Article&quot; in Joined inheritance.&lt;br/&gt;
I make DQL directly on entity &quot;Content&quot;, that work perfectly with the discriminator map for return/delete/update appropriates objects.&lt;br/&gt;
I use &quot;Page&quot; or &quot;Article&quot; entity only for make a new object and persist.&lt;/p&gt;

&lt;p&gt;But now I have add a oneToOne self relation in &quot;Content&quot; : &lt;br/&gt;
Content#parent_id =&amp;gt; Content#id , no cascade.&lt;/p&gt;

&lt;p&gt;And now every DQL return :&lt;br/&gt;
SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;42000&amp;#93;&lt;/span&gt;: Syntax error or access violation: 1066 Not unique table/alias: XX&lt;br/&gt;
And yes I see in generated SQL that Content&apos;s alias is not unique :&lt;/p&gt;

&lt;p&gt;For DQL : SELECT c FROM Content WHERE c.status = 1&lt;/p&gt;

&lt;p&gt;SQL Result :&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT n0_.id AS id0, n0_.name AS name1, n0_.title AS title2, n0_.author AS author3, n0_.author_update AS author_update4, n0_.status AS status5, n0_.type AS type6, n0_.weight AS weight7, n0_.create_on AS create_on8, n0_.update_on AS update_on9, n0_.url AS url10, n0_.zone AS zone11, n0_.children_sort AS children_sort12, n0_.children_sort_type AS children_sort_type13, n0_.path AS path14, n0_.level AS level15, n1_.meta AS meta16, n2_.content AS content17, n3_.description AS description18, n3_.keywords AS keywords19, n3_.gwt AS gwt20, n3_.analytics AS analytics21, n3_.xiti AS xiti22, n0_.class AS class23 FROM ncms_content n0_ LEFT JOIN ncms_page n1_ ON n0_.id = n1_.id LEFT JOIN ncms_article n2_ ON n0_.id = n2_.id LEFT JOIN ncms_content n0_ ON n0_.id = n0_.id LEFT JOIN ncms_content n0_ ON n0_.id = n0_.id LEFT JOIN ncms_content n0_ ON n0_.id = n0_.id LEFT JOIN ncms_content n0_ ON n0_.id = n0_.id LEFT JOIN ncms_content n0_ ON n0_.id = n0_.id LEFT JOIN ncms_website n3_ ON n0_.id = n3_.id LEFT JOIN ncms_content n0_ ON n0_.id = n0_.id WHERE n0_.status =1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;=&amp;gt; SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;42000&amp;#93;&lt;/span&gt;: Syntax error or access violation: 1066 Not unique table/alias: &apos;n0_&apos; &lt;/p&gt;

&lt;p&gt;But if I use getRepository like this :&lt;br/&gt;
$em-&amp;gt;getRepository(&apos;Content&apos;)-&amp;gt;findBy(array(&apos;status&apos;=&amp;gt;1));&lt;br/&gt;
It works, and return appropriates objects.&lt;br/&gt;
And I can see that &quot;Content&quot; have several unique alias in the SQL query :&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT t0.id AS id1, t0.name AS name2, t0.title AS title3, t0.author AS author4, t0.author_update AS author_update5, t0.status AS status6, t0.type AS type7, t0.weight AS weight8, t0.create_on AS create_on9, t0.update_on AS update_on10, t0.url AS url11, t0.zone AS zone12, t0.children_sort AS children_sort13, t0.children_sort_type AS children_sort_type14, t0.path AS path15, t0.level AS level16, t0.parent_id AS parent_id17, t0.class, t18.meta AS meta19, t20.content AS content21, t27.description AS description28, t27.keywords AS keywords29, t27.gwt AS gwt30, t27.analytics AS analytics31, t27.xiti AS xiti32 FROM ncms_content t0 LEFT JOIN ncms_page t18 ON t0.id = t18.id LEFT JOIN ncms_article t20 ON t0.id = t20.id LEFT JOIN ncms_content t22 ON t0.id = t22.id LEFT JOIN ncms_content t23 ON t0.id = t23.id LEFT JOIN ncms_content t24 ON t0.id = t24.id LEFT JOIN ncms_content t25 ON t0.id = t25.id LEFT JOIN ncms_content t26 ON t0.id = t26.id LEFT JOIN ncms_website t27 ON t0.id = t27.id LEFT JOIN ncms_content t33 ON t0.id = t33.id WHERE t0.status =1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Regards,&lt;/p&gt;</description>
                <environment>WAMP , PHP 5.3.5 , MySql 5.5.8&lt;br/&gt;
Symfony 2 Beta 1</environment>
            <key id="12653">DDC-1161</key>
            <summary>DQL generate duplicate SQL Alias with CTI + oneToOne self referencing</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="nico_b">Nicolas Badey</reporter>
                        <labels>
                    </labels>
                <created>Fri, 20 May 2011 15:17:51 +0000</created>
                <updated>Sun, 16 Oct 2011 03:44:19 +0000</updated>
                    <resolved>Sun, 16 Oct 2011 03:44:19 +0000</resolved>
                            <version>2.0.5</version>
                <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15937" author="beberlei" created="Sun, 5 Jun 2011 14:38:27 +0000"  >&lt;p&gt;Fixed formatting.&lt;/p&gt;</comment>
                    <comment id="15938" author="beberlei" created="Sun, 5 Jun 2011 14:48:26 +0000"  >&lt;p&gt;Can you upload the mapping files and php code? This looks very weird and i dont know where to start debugging from your description.&lt;/p&gt;</comment>
                    <comment id="15950" author="nico_b" created="Mon, 6 Jun 2011 07:32:29 +0000"  >&lt;p&gt;Done, Mapping and Entities (simplified).&lt;/p&gt;

&lt;p&gt;I have a little question, how we can acces to the discriminator map in a DQL query or Entity&apos;s object ? Because we cannot mappe this field.&lt;/p&gt;</comment>
                    <comment id="16614" author="guilhermeblanco" created="Sun, 16 Oct 2011 03:44:19 +0000"  >&lt;p&gt;Hi Nicholas,&lt;/p&gt;

&lt;p&gt;In 2.2-DEV this issue seems to be addressed already.&lt;br/&gt;
We did an internal refactoring (that leads us to not merge into 2.1) that addressed this issue.&lt;/p&gt;

&lt;p&gt;I added coverage to your issue with this commit and it works nicely: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/33bcf7ad6f67b8641983f51901d0e74cfde8446c&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/33bcf7ad6f67b8641983f51901d0e74cfde8446c&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Marking the ticket as fixed in 2.2&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11000" name="Content.php" size="887" author="nico_b" created="Mon, 6 Jun 2011 07:32:29 +0000" />
                    <attachment id="11001" name="Page.php" size="289" author="nico_b" created="Mon, 6 Jun 2011 07:32:29 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1150] BasicEntityPersister::expandParameters does not check assiciation mapping when expanding parameters</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1150</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;If you try to find entities, filtering them by field with association mapping (ManyToOne) and use an array as a filter argument it will not work:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;    $em-&amp;gt;getRepository(&apos;EntityBundle:Entity&apos;)-&amp;gt;findBy(array(&apos;child&apos; =&amp;gt; array(1,2,3)));
    8 Array to string conversion vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php 595
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I fixed method BasicEntityPersister::expandParameters:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
Index: ../vendor/doctrine/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php
===================================================================
@@ -1300,6 +1300,9 @@
             &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_class-&amp;gt;fieldMappings[$field])) {
                 $type = Type::getType($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_class-&amp;gt;fieldMappings[$field][&apos;type&apos;])-&amp;gt;getBindingType();
             }
+            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_class-&amp;gt;associationMappings[$field])) {
+                $type = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_class-&amp;gt;associationMappings[$field][&apos;type&apos;];
+            }
             &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (is_array($value)) {
                 $type += Connection::ARRAY_PARAM_OFFSET;
             }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="12635">DDC-1150</key>
            <summary>BasicEntityPersister::expandParameters does not check assiciation mapping when expanding parameters</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="realmfoo">Konstantin</reporter>
                        <labels>
                    </labels>
                <created>Fri, 13 May 2011 15:11:12 +0000</created>
                <updated>Sun, 14 Aug 2011 00:26:45 +0000</updated>
                    <resolved>Sun, 14 Aug 2011 00:26:45 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15947" author="beberlei" created="Sun, 5 Jun 2011 15:35:33 +0000"  >&lt;p&gt;What is $this-&amp;gt;_class-&amp;gt;associationMappings&lt;span class=&quot;error&quot;&gt;&amp;#91;$field&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;type&amp;#39;&amp;#93;&lt;/span&gt; supposed to be? This key does not exist&lt;/p&gt;</comment>
                    <comment id="15949" author="realmfoo" created="Sun, 5 Jun 2011 18:23:59 +0000"  >&lt;p&gt;The key exists when ToMany association is used. $field&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;type&amp;#39;&amp;#93;&lt;/span&gt; is a real Doctrine&apos;s type of the field, because fieldMappings contains entity type of association.&lt;/p&gt;

&lt;p&gt;Checking of this key in Doctrine itself:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php#L386&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php#L386&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="15973" author="beberlei" created="Sat, 11 Jun 2011 07:43:27 +0000"  >&lt;p&gt;Yes buts its the type of the association, MANY_TO_ONE ,ONE_TO_MANY, etc, etc..The type of the associated column is not really known.&lt;/p&gt;</comment>
                    <comment id="15982" author="realmfoo" created="Tue, 14 Jun 2011 07:20:52 +0000"  >&lt;p&gt;Heh, I was lucky, thanks for pointing it out &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;In any case we still can find this type by the target class. May be it will be a good to cache it in the associationMappings array (by functions like _validateAndCompleteOneToOneMapping)?&lt;/p&gt;</comment>
                    <comment id="15984" author="beberlei" created="Tue, 14 Jun 2011 07:56:12 +0000"  >&lt;p&gt;At that point you still don&apos;t have the information since its saved on the related association and we don&apos;t access it at this point (otherwise you get a riffling effect and everything is in memory). We could just assume it is PDO::PARAM_STR.&lt;/p&gt;</comment>
                    <comment id="16316" author="guilhermeblanco" created="Sun, 14 Aug 2011 00:26:45 +0000"  >&lt;p&gt;This issue was fixed in &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/63a2f02f4ddea1ab9191b0e4acfd1d790d2247c7&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/63a2f02f4ddea1ab9191b0e4acfd1d790d2247c7&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for the report and attempting to fix the issue. =)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1131] Couldn&apos;t find a class in a subselect</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1131</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi &lt;/p&gt;

&lt;p&gt;This dql query work fine &lt;/p&gt;

&lt;div class=&quot;code panel&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 GrrArea a where a.id not in (select code from Customer where code is not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But 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;From GrrArea a where a.id not in (select c.code from Customer c where c.code is not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Generate this error message  :   Couldn&apos;t find class c, I also try the subselect alone&lt;/p&gt;

&lt;div class=&quot;code panel&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 c.code from Customer c where c.code is not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;which works fine&lt;/p&gt;

</description>
                <environment>Using symfony 1.4</environment>
            <key id="12594">DDC-1131</key>
            <summary>Couldn&apos;t find a class in a subselect</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="michaelcourcy">Michael Courcy</reporter>
                        <labels>
                    </labels>
                <created>Fri, 29 Apr 2011 18:21:23 +0000</created>
                <updated>Tue, 16 Aug 2011 05:29:42 +0000</updated>
                    <resolved>Tue, 16 Aug 2011 05:29:42 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16342" author="guilhermeblanco" created="Tue, 16 Aug 2011 05:29:41 +0000"  >&lt;p&gt;This is a Doctrine 1 bug, not a Doctrine 2.&lt;/p&gt;

&lt;p&gt;Reopen the ticket and provide more information (like mapping, etc) if it&apos;s a Doctrine 2 issue.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1116] Sort by association id</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1116</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;For now it is not possible to sort a result by an association field.&lt;/p&gt;

&lt;p&gt;ie : SELECT * FROM Post as p ORDER BY p.Author&lt;/p&gt;</description>
                <environment></environment>
            <key id="12565">DDC-1116</key>
            <summary>Sort by association id</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="rande">Thomas Rabaix</reporter>
                        <labels>
                    </labels>
                <created>Fri, 15 Apr 2011 12:09:41 +0000</created>
                <updated>Sun, 14 Aug 2011 03:43:33 +0000</updated>
                    <resolved>Sun, 14 Aug 2011 03:43:33 +0000</resolved>
                            <version>2.0.1</version>
                                <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="15903" author="justhannes" created="Fri, 3 Jun 2011 16:07:18 +0000"  >&lt;p&gt;I agree, maybe even make it sortable by a field of the target?&lt;/p&gt;

&lt;p&gt;ie: SELECT * FROM Post as p ORDER BY p.Author.Name&lt;/p&gt;</comment>
                    <comment id="16126" author="guillaumec@gmail.com" created="Fri, 8 Jul 2011 15:18:48 +0000"  >&lt;p&gt;I agree with Johannes about sorting by a field of the target. &lt;/p&gt;

&lt;p&gt;Without this feature or a decent workaround, I will have to stop using doctrine for my project.&lt;/p&gt;</comment>
                    <comment id="16127" author="guilhermeblanco" created="Fri, 8 Jul 2011 15:58:54 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I think the first one if doable. &lt;br/&gt;
But please take in mind that it&apos;s doable if your association is the owning side and is a *ToOne side. I say that because it could generate a 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-java&quot;&gt;SELECT ... FROM posts p ORDER BY p.author_id
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If it&apos;s a *ToMany, it&apos;s impossible. No way to achieve it.&lt;br/&gt;
But if it&apos;s the inverse side, it is doable, but it would require a JOIN. We dropped this &quot;auto inclusion&quot; of JOINs back in RC3 because it is not stable and to make it stable would make the overall Parser performance much slow. The other reason is that developer is pretty able to do the join yourself. I&apos;ll take the first comment as an example:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT ... FROM Post p INNER JOIN p.Author a ORDER BY a.name
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This one is already supported. =)&lt;/p&gt;


&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                    <comment id="16128" author="guillaumec@gmail.com" created="Fri, 8 Jul 2011 16:13:45 +0000"  >&lt;p&gt;Thank you Guilherme Blanco, this fixes the issue for me!&lt;/p&gt;</comment>
                    <comment id="16324" author="guilhermeblanco" created="Sun, 14 Aug 2011 03:43:33 +0000"  >&lt;p&gt;Added support to SingleValuedPathExpression in ORDER BY since this commit: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/a0ca506db7e577c55dd89544bfd8ba08962c3cfe&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/a0ca506db7e577c55dd89544bfd8ba08962c3cfe&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for the report.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1107] Make QueryBuilder&apos;s setParameters method mirror the behavior of AbstractQuery&apos;s</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1107</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In ORM/QueryBuilder.php,&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setParameters(array $params, array $types = array())
{
    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_paramTypes = $types;
    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_params = $params;
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Makes it so that in order to use the QueryBuilder to conditionally build up a query you have to hold the parameters to be set in a separate variable and call setParameters when you&apos;re done building your query, instead of being able to call setParameters at the spot where it would be apparent what that parameter is to someone reading the code. Compare to the method in ORM/AbstractQuery.php:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setParameters(array $params, array $types = array())
{
    foreach ($params as $key =&amp;gt; $value) {
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($types[$key])) {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;setParameter($key, $value, $types[$key]);
        } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;setParameter($key, $value);
        }
    }
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;which can be called multiple times safely.&lt;/p&gt;

&lt;p&gt;It would be awesome if the QueryBuilder&apos;s behavior could be modified to match that of AbstractQueries in this regard, but if there&apos;s a good reason for the difference in behavior, a mention in the API/Reference docs would be much appreciated.&lt;/p&gt;</description>
                <environment>platform independent</environment>
            <key id="12550">DDC-1107</key>
            <summary>Make QueryBuilder&apos;s setParameters method mirror the behavior of AbstractQuery&apos;s</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="jdd">Jeremiah Dodds</reporter>
                        <labels>
                    </labels>
                <created>Fri, 8 Apr 2011 14:33:35 +0000</created>
                <updated>Sun, 14 Aug 2011 03:54:47 +0000</updated>
                    <resolved>Sun, 14 Aug 2011 03:54:47 +0000</resolved>
                            <version>2.0.3</version>
                <version>2.0.4</version>
                <version>Git Master</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16326" author="guilhermeblanco" created="Sun, 14 Aug 2011 03:54:47 +0000"  >&lt;p&gt;This issue was already fixed on a previous release. Since I could not find the exact commit, marking this item as resolved for 2.2-DEV.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1100] INSTANCE OF and IN in QueryBuilder</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1100</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I need to obtain specific entity instances. And I don&apos;t know how to write better solution for my 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;$nodes = array(&apos;Entities\FooNode&apos;, &apos;Entities\BarNode&apos;);

$qb-&amp;gt;select(&apos;Entities\Node&apos;, &apos;n&apos;)-&amp;gt;where(&lt;span class=&quot;code-quote&quot;&gt;&quot;n.level = 1&quot;&lt;/span&gt;); 
$classes = array(); 
foreach ($nodes as $class) { 
        $classes[] = &lt;span class=&quot;code-quote&quot;&gt;&quot;n INSTANCE OF &quot;&lt;/span&gt; . $class; 
} 

$qb-&amp;gt;andWhere(call_user_func_array(array($qb-&amp;gt;expr(), &apos;orx&apos;), $classes))); 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="12530">DDC-1100</key>
            <summary>INSTANCE OF and IN in QueryBuilder</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="vrtak-cz">Patrik Voto&#269;ek</reporter>
                        <labels>
                    </labels>
                <created>Mon, 4 Apr 2011 11:06:03 +0000</created>
                <updated>Mon, 15 Aug 2011 04:51:55 +0000</updated>
                    <resolved>Mon, 15 Aug 2011 04:51:55 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16334" author="guilhermeblanco" created="Mon, 15 Aug 2011 04:51:55 +0000"  >&lt;p&gt;Implemented in latest 2.2-DEV by commit: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/f148912a28601d9c6234d59661f0e4ad1ae0c138&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/f148912a28601d9c6234d59661f0e4ad1ae0c138&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1073] Refactor SqlWalker::walkGroupByItem not to use PathExpression anymore but accept strings (identification variable) aswell</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1073</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Due to &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1053&quot; title=&quot;GROUP BY crashes Doctrine 2&quot;&gt;&lt;del&gt;DDC-1053&lt;/del&gt;&lt;/a&gt; the code in SqlWalker::walkGroupByClause and ::walkGroupByItems() is not as nice as it could be. This is because of the PathExpression type hint.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12477">DDC-1073</key>
            <summary>Refactor SqlWalker::walkGroupByItem not to use PathExpression anymore but accept strings (identification variable) aswell</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 20 Mar 2011 08:33:35 +0000</created>
                <updated>Sun, 4 Dec 2011 07:39:34 +0000</updated>
                    <resolved>Sun, 4 Dec 2011 07:39:34 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16944" author="guilhermeblanco" created="Sun, 4 Dec 2011 07:39:34 +0000"  >&lt;p&gt;Issue was resolved by this commit: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/2642daa43851878688d01625f272ff5874cac7b2&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/2642daa43851878688d01625f272ff5874cac7b2&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                                <inwardlinks description="is referenced by">
                            <issuelink>
            <issuekey id="12439">DDC-1053</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1071] CASE expressions do not work as documented in EBNF</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1071</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The EBNF definition of DQL on the website (&lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.0/en/reference/dql-doctrine-query-language.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/reference/dql-doctrine-query-language.html&lt;/a&gt;) defines the SELECT expression as follows:&lt;/p&gt;

&lt;p&gt;SelectExpression  ::= IdentificationVariable | PartialObjectExpression | (AggregateExpression | &quot;(&quot; Subselect &quot;)&quot;  | FunctionDeclaration | ScalarExpression) [&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;AS&amp;quot;&amp;#93;&lt;/span&gt; AliasResultVariable]&lt;/p&gt;

&lt;p&gt;A ScalarExpression, in turn, is defined as follows:&lt;/p&gt;

&lt;p&gt;ScalarExpression ::= SimpleArithmeticExpression | StringPrimary | DateTimePrimary | StateFieldPathExpression BooleanPrimary | CaseExpression | EntityTypeExpression&lt;/p&gt;

&lt;p&gt;There is already a missing &apos;&apos;|&quot; between &quot;StateFieldPathExpression&quot; and &quot;BooleanPrimary&quot; here.&lt;/p&gt;


&lt;p&gt;But ignoring that detail, this definition states that case expressions can show up anywhere in the list of values to be selected in a query, which, of course, would come in handy.&lt;/p&gt;


&lt;p&gt;Contrary to this definition, queries like this one will not work:&lt;/p&gt;

&lt;p&gt;SELECT someEntity.a, CASE someEntity.b WHEN 1 THEN &apos;A&apos; ELSE &apos;B&apos; END FROM \someEntity;&lt;/p&gt;

&lt;p&gt;Whereas queries like this one will:&lt;/p&gt;

&lt;p&gt;SELECT CASE someEntity.b WHEN 1 THEN &apos;A&apos; ELSE &apos;B&apos; END FROM \someEntity;&lt;/p&gt;


&lt;p&gt;Both queries should be legitimate, according to the EBNF definition.&lt;/p&gt;


&lt;p&gt;In addition, CASE expressions are not allowed in subselects either, although the EBNF definition of the SimpleSelectExpression states that they should be.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12470">DDC-1071</key>
            <summary>CASE expressions do not work as documented in EBNF</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="dalvarez">Daniel Alvarez Arribas</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Mar 2011 18:36:46 +0000</created>
                <updated>Mon, 8 Aug 2011 05:08:41 +0000</updated>
                    <resolved>Mon, 8 Aug 2011 05:08:41 +0000</resolved>
                            <version>2.0.2</version>
                                <fixVersion>2.2</fixVersion>
                                <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="15499" author="beberlei" created="Tue, 15 Mar 2011 19:46:27 +0000"  >&lt;p&gt;Case is not fully implemented yet. Its on the roaodmap for 2.1&lt;/p&gt;</comment>
                    <comment id="15510" author="dalvarez" created="Thu, 17 Mar 2011 22:56:22 +0000"  >&lt;p&gt;I reopen this as a doc issue, as long as the feature is not yet implemented.&lt;/p&gt;

&lt;p&gt;At the moment, the Doctrine 2 online documentation is patently misleading with respect to the case statement., It documents the case expression as being supported, when in fact it is not even implemented yet. How is a user supposed to know, by reading the docs, that the feature is not yet implemented? I mean, if something in the EBNF definitions, the normal thing is to expect that it is actually supported. People will choose Doctrine 2, because they believe it does what it is documented to do, and instead end up with something that does not. I know Doctrine 2 comes with no warranty. But this is almost deliberate misdocumentation. This was the case with path expressions, and now with the case statement. It is becoming a bad habit.&lt;/p&gt;

&lt;p&gt;Anyway, I am looking forward to full support of case expressions. Until then, I will have to patch my code.&lt;/p&gt;

&lt;p&gt;But, PLEASE, PLEASE, fix the docs, to save prospective users some serious pain. It is just unfair to document features that are not there.&lt;/p&gt;</comment>
                    <comment id="15511" author="beberlei" created="Fri, 18 Mar 2011 08:22:19 +0000"  >&lt;p&gt;The problem here is that it was planned for 2.0 and its really hard to keep the EBNF and the actual working stuff in sync. I know its not perfect, i will add a note to the docs soonish, but CASE and path expression were the only things that changed and/or didnt get finished for 2.0&lt;/p&gt;</comment>
                    <comment id="15512" author="dalvarez" created="Fri, 18 Mar 2011 16:03:08 +0000"  >&lt;p&gt;Thanks for taking care.&lt;/p&gt;

&lt;p&gt;An option would be to use a parser generator and generate the parser from an EBNF syntax spec, which saves you the process of deriving the EBNF manually from implementation code. As you already opted for maintaining a formal syntax definition, you could as well reap some consequential benefits. Then again, it would probably be a completely different approach. I also do not know a parser gerator capable of generating PHP 5 code.&lt;/p&gt;

&lt;p&gt;Another viable option would be making it a habit to update the EBNF definition first, then using it as a starting point for the actual implementation. Then, with each release, simply publish both code and documentation as you normally would. This way the EBNF definition does not run any risk of ever becoming outdated. Unless you find other ways of screwing it, of course &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;</comment>
                    <comment id="15527" author="beberlei" created="Sun, 20 Mar 2011 07:00:37 +0000"  >&lt;p&gt;There is no parser generator for PHP that generates a top-down recursive descent walker as the one we are using. There is a parser generator for bottom-up, but that is targeting php4 and produces ugly code.&lt;/p&gt;

&lt;p&gt;We have a convention to always update EBNF and code in conjunction, but given the large EBNF this can just be forgotten sometimes.&lt;/p&gt;</comment>
                    <comment id="15600" author="dalvarez" created="Mon, 28 Mar 2011 05:47:31 +0000"  >&lt;p&gt;Fixed typo (&quot;EBDF&quot; instead of &quot;EBNF&quot;)&lt;/p&gt;</comment>
                    <comment id="16294" author="guilhermeblanco" created="Mon, 8 Aug 2011 05:08:41 +0000"  >&lt;p&gt;In this commit: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/816ce41f638d28934c79a12ef27f954124b2639e&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/816ce41f638d28934c79a12ef27f954124b2639e&lt;/a&gt;&lt;br/&gt;
And documented in this commit: &lt;a href=&quot;https://github.com/doctrine/orm-documentation/commit/189c729f15d2fafecf92662cad9553c2ec3dccd7&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/orm-documentation/commit/189c729f15d2fafecf92662cad9553c2ec3dccd7&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This support was FINALLY included. =)&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10002">
                <name>Dependency</name>
                                <outwardlinks description="depends on">
                            <issuelink>
            <issuekey id="10032">DDC-3</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1057] The methods of ResultSetMapping should return the current object</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1057</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The ResultSetMapping class methods should return the current object, so that a fluent interface is provided. Its just a minor issues but makes the class more pleasant to use.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12449">DDC-1057</key>
            <summary>The methods of ResultSetMapping should return the current object</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="ota">Ota Mares</reporter>
                        <labels>
                    </labels>
                <created>Fri, 4 Mar 2011 09:53:38 +0000</created>
                <updated>Wed, 7 Dec 2011 15:26:13 +0000</updated>
                    <resolved>Wed, 7 Dec 2011 15:26:13 +0000</resolved>
                            <version>2.0</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16949" author="guilhermeblanco" created="Wed, 7 Dec 2011 15:26:13 +0000"  >&lt;p&gt;Fixed since this commit &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/33c5b639b04169f9520910da0d25508754d32b6b&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/33c5b639b04169f9520910da0d25508754d32b6b&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1028] MsSQL-Server DateTime microseconds issue</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1028</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The string for the function getDateTimeFormatString() in the MsSqlPlatform class is &apos;wrong&apos;.&lt;br/&gt;
The Microsoft-SQL-Server just uses 3 digits for microseconds and not 6. &lt;br/&gt;
So the string &apos;Y-m-d H:i:s.u&apos; fails and the server states: &lt;span class=&quot;error&quot;&gt;&amp;#91;SQL Server&amp;#93;&lt;/span&gt;Fehler beim Konvertieren  einer Zeichenfolge in einen datetime-Wert (Error when converting a string to a datetime-value) .&lt;/p&gt;

&lt;p&gt;So this string works, but does not regard the microseconds for those how rely on them: &apos;Y-m-d H:i:s.000&apos;&lt;/p&gt;

&lt;p&gt;See also: &lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt; The MS datetime column is documented to have an accuracy of only about .3 seconds anyway &lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt; &lt;br/&gt;
&lt;a href=&quot;http://bytes.com/topic/sql-server/answers/80150-inserting-datetime-milliseconds-sql-server&quot; class=&quot;external-link&quot;&gt;http://bytes.com/topic/sql-server/answers/80150-inserting-datetime-milliseconds-sql-server&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-gb/library/ms186819.aspx&quot; class=&quot;external-link&quot;&gt;http://msdn.microsoft.com/en-gb/library/ms186819.aspx&lt;/a&gt; (Section: Remarks)&lt;/p&gt;</description>
                <environment>WindowsXP/Windows2008 R2 / PHP 5.3 / MsSQL-Server 2005 / MsSQL-PDO_PHP-Driver</environment>
            <key id="12379">DDC-1028</key>
            <summary>MsSQL-Server DateTime microseconds issue</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="juokaz">Juozas Kaziukenas</assignee>
                                <reporter username="le_shatai">Martin Weise</reporter>
                        <labels>
                    </labels>
                <created>Fri, 11 Feb 2011 12:09:38 +0000</created>
                <updated>Mon, 9 Jan 2012 13:19:12 +0000</updated>
                    <resolved>Mon, 9 Jan 2012 13:19:12 +0000</resolved>
                            <version>2.0.1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15275" author="beberlei" created="Fri, 11 Feb 2011 17:00:06 +0000"  >&lt;p&gt;Assigned to juozas, but i think the issue here is that you have to use Datetime2, or add your own type replacing the shipped one to support the old datetime.&lt;/p&gt;</comment>
                    <comment id="15303" author="le_shatai" created="Mon, 14 Feb 2011 06:34:49 +0000"  >&lt;p&gt;Ok, I had another problem with the datetime, but this does not regard the problem of this issue ( at least not totally).&lt;br/&gt;
The problem with the MsSQL-Server before 2008 is that there is no data type named &apos;datetime2&apos;, just &apos;datetime&apos;.&lt;br/&gt;
The next problem is that every date conversion for a query is done in the language set upon conection time.&lt;br/&gt;
Thus leads to a problem, when it is not possible to set the connection language. &lt;/p&gt;

&lt;p&gt;So the problem is that the MsSQL-Server relies on the settings above.&lt;br/&gt;
In my case the datetime conversion failed, as the server always thought that the datetime-string would come in&lt;br/&gt;
the following format: Y-d-m . This is not true, as the default format string is: Y-m-d . So every insert/update query fails.&lt;br/&gt;
To solve the problem I did that: $entityManager-&amp;gt;getConnection()-&amp;gt;exec(&apos;SET DATEFORMAT ymd&apos;); .&lt;br/&gt;
This way I ensured that the dateformat string works fine, except the issue problem.&lt;/p&gt;

&lt;p&gt;To solve the problem in general, it would be helpful to subclass the MsSqlPlatform into a class named MsSql2005Platform or something like this and just override the getDateTimeFormatString and upon connection setting the format for the queries&lt;br/&gt;
as mentioned before.&lt;/p&gt;

&lt;p&gt;Hope this helps out.&lt;br/&gt;
Besides, here a link to the datetime problem (in german): &lt;a href=&quot;http://www.insidesql.org/blogs/frankkalis/2010/08/19/der-ultimative-guide-fuer-die-datetime-datentypen&quot; class=&quot;external-link&quot;&gt;http://www.insidesql.org/blogs/frankkalis/2010/08/19/der-ultimative-guide-fuer-die-datetime-datentypen&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="15304" author="juokaz" created="Mon, 14 Feb 2011 06:47:07 +0000"  >&lt;p&gt;I have somehow manage to miss the fact that datetime2 wasn&apos;t around in datetime... What I&apos;m thinking now is there a need for datetime2 in Doctrine at all. If only thing it brings is additional accuracy for microseconds, maybe best idea would be to use datetime for 2008 installs too if used from Doctrine. However datetime is now a standard and Microsoft recommends to use it for new installs. What I can do is I can always insert 3 fractional points to datetime column as both datetime2 and datetime would accept it as valid date string. &lt;/p&gt;

&lt;p&gt;We can have separate platforms for 2008 and 2005 servers, but that would be quite resource intensive. Let me see what is the best way to fix it.&lt;/p&gt;

&lt;p&gt;Regards to Dateformat, I guess the solution would be to set format on connection, how you suggested. How about you create a separate ticket for this and assign it to me.&lt;/p&gt;</comment>
                    <comment id="15305" author="beberlei" created="Mon, 14 Feb 2011 08:28:37 +0000"  >&lt;p&gt;Oracle also has an Session Init Listener that handles the date format things, i guess we can take this as example. However I think having Mssql2005Platform sounds goods also, it would be only one method to override.&lt;/p&gt;</comment>
                    <comment id="16303" author="le_shatai" created="Tue, 9 Aug 2011 14:05:08 +0000"  >&lt;p&gt;To solve this issue, at least for MsSQL-Server datetime data types, change the following TypeClass of Doctrine by adding&lt;br/&gt;
this check before converting to PHP\DateTime in &apos;convertToPHPValue()&apos; :&lt;/p&gt;

&lt;p&gt;if( strlen($value) == 24 &amp;amp;&amp;amp; $platform-&amp;gt;getDateTimeFormatString() == &apos;Y-m-d H:i:s.u&apos;)&lt;br/&gt;
	$value = $value.&apos;000&apos;;&lt;/p&gt;

&lt;p&gt;I know this is propably very specific, but I do not know, how other DBs handle microseconds in datetime strings.&lt;/p&gt;</comment>
                    <comment id="16455" author="le_shatai" created="Thu, 8 Sep 2011 07:47:19 +0000"  >&lt;p&gt;I fixed this bug with some changes in the DateTimeType class. As there is no Explicit MSSQL2005 Plattform this change would also affect datetime2 type in the SQLServer 2008 plattform, which is the data type that has 6 microseconds.&lt;br/&gt;
So either populate a MSSQLServer2005 Plattform, or introduce a new DateTimeType for the 2005 platform.&lt;/p&gt;



&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;DateTimeType.php&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&amp;lt;?php
/*
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * &lt;span class=&quot;code-quote&quot;&gt;&quot;AS IS&quot;&lt;/span&gt; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * This software consists of voluntary contributions made by many individuals
 * and is licensed under the LGPL. For more information, see
 * &amp;lt;http:&lt;span class=&quot;code-comment&quot;&gt;//www.doctrine-project.org&amp;gt;.
&lt;/span&gt; */

namespace Doctrine\DBAL\Types;

use Doctrine\DBAL\Platforms\AbstractPlatform;

/**
 * Type that maps an SQL DATETIME/TIMESTAMP to a PHP DateTime object.
 *
 * @since 2.0
 */
class DateTimeType &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Type
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getName()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; Type::DATETIME;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $platform-&amp;gt;getDateTimeTypeDeclarationSQL($fieldDeclaration);
    }

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

		$value = $value-&amp;gt;format($platform-&amp;gt;getDateTimeFormatString());

		&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;( strlen($value) == 26 &amp;amp;&amp;amp;
			$platform-&amp;gt;getDateTimeFormatString() == &apos;Y-m-d H:i:s.u&apos; &amp;amp;&amp;amp;
			$platform &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; \Doctrine\DBAL\Platforms\MsSqlPlatform )
			$value = substr($value, 0, \strlen($value)-3);

		&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $value;

    }

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

		&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;( strlen($value) == 24 &amp;amp;&amp;amp; $platform-&amp;gt;getDateTimeFormatString() == &apos;Y-m-d H:i:s.u&apos;)
			$value = $value.&apos;000&apos;;

        $val = \DateTime::createFromFormat($platform-&amp;gt;getDateTimeFormatString(),$value);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!$val) {
            &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; ConversionException::conversionFailedFormat($value, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getName(), $platform-&amp;gt;getDateTimeFormatString());
        }
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $val;
    }
}

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="17197" author="beberlei" created="Mon, 9 Jan 2012 13:19:12 +0000"  >&lt;p&gt;Added SQLServer2005 platform that uses DATETIME and the .000 format as per instructions of Martin.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
            <subtask id="12386">DDC-1032</subtask>
        </subtasks>
        </item>

<item>
            <title>[DDC-1022] Wakeup behavior difference between proxy and eager-loaded instance</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1022</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When an object is reconstituted from the persistent storage the unserialize trick is used. That means &lt;tt&gt;__wakeup()&lt;/tt&gt; is called, which is useful to do further initialization as needed.&lt;/p&gt;

&lt;p&gt;If the object is lazy loaded a proxy is generated. That proxy is generated with &lt;tt&gt;new&lt;/tt&gt; and thus no &lt;tt&gt;_&lt;em&gt;wakeup()&lt;/tt&gt; is called. When the proxy is eventually initialized still no call to &lt;tt&gt;&lt;/em&gt;_wakeup()&lt;/tt&gt; is done, thus initialization code that is &quot;usually&quot; executed is not called when an object is lazy-loaded.&lt;/p&gt;

&lt;p&gt;That is a semantical error.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12364">DDC-1022</key>
            <summary>Wakeup behavior difference between proxy and eager-loaded instance</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="k-fish">Karsten Dambekalns</reporter>
                        <labels>
                    </labels>
                <created>Wed, 9 Feb 2011 04:15:50 +0000</created>
                <updated>Sat, 9 Jul 2011 12:39:36 +0000</updated>
                    <resolved>Sat, 9 Jul 2011 12:39:36 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.0.7</fixVersion>
                <fixVersion>2.1.1</fixVersion>
                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15385" author="beberlei" created="Sat, 26 Feb 2011 07:08:33 +0000"  >&lt;p&gt;__wakeup() shouldn&apos;t be used as per definition of an entity, &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.0/en/cookbook/implementing-wakeup-or-clone.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/cookbook/implementing-wakeup-or-clone.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For post initialization &quot;postLoad()&quot; should be used.&lt;/p&gt;</comment>
                    <comment id="15395" author="k-fish" created="Sat, 26 Feb 2011 12:18:11 +0000"  >&lt;p&gt;You write &lt;cite&gt;shouldn&apos;t be used&lt;/cite&gt;, but that seems somewhat strange, given that the page you point to explicitly says &lt;cite&gt;However, it is quite easy to make use of these methods in a safe way by guarding the custom wakeup or clone code with an entity identity check, as demonstrated in the following sections.&lt;/cite&gt;&lt;/p&gt;

&lt;p&gt;And still the issue remains that eager-loaded instances created with the unserialize trick &lt;b&gt;do&lt;/b&gt; call &lt;tt&gt;wakeup()&lt;/tt&gt; (of course) but this does not happen when being lazy-loaded. &lt;em&gt;Inconsistency&lt;/em&gt;, it screams... &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="16129" author="beberlei" created="Sat, 9 Jul 2011 09:31:09 +0000"  >&lt;p&gt;I changed my mind, this is valid&lt;/p&gt;</comment>
                    <comment id="16130" author="beberlei" created="Sat, 9 Jul 2011 12:39:36 +0000"  >&lt;p&gt;Fixed in 2.0.7, 2.1.1 and in master&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1013] Possible issue with multiple levels of Mappedsuperclasses and wrong sql table aliases</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1013</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Possible issue with multiple levels of Mappedsuperclasses and wrong sql table aliases&lt;/p&gt;</description>
                <environment></environment>
            <key id="12348">DDC-1013</key>
            <summary>Possible issue with multiple levels of Mappedsuperclasses and wrong sql table aliases</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 Feb 2011 13:31:08 +0000</created>
                <updated>Sun, 14 Aug 2011 16:18:34 +0000</updated>
                    <resolved>Sun, 14 Aug 2011 03:23:10 +0000</resolved>
                            <version>2.0.1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16203" author="kbond" created="Tue, 26 Jul 2011 14:31:30 +0000"  >&lt;p&gt;Any update on this, is there a work-around?&lt;/p&gt;</comment>
                    <comment id="16205" author="beberlei" created="Tue, 26 Jul 2011 18:36:25 +0000"  >&lt;p&gt;I could not reproduce this yet, can you provide me with a reproduce case?&lt;/p&gt;</comment>
                    <comment id="16207" author="kbond" created="Tue, 26 Jul 2011 19:01:58 +0000"  >&lt;p&gt;&lt;a href=&quot;https://gist.github.com/1107578&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/1107578&lt;/a&gt; shows my entity inheritance structure:&lt;/p&gt;

&lt;p&gt;Entity (MappedSuperClass) -&amp;gt; Page -&amp;gt; BaseClassification (MappedSuperClass) -&amp;gt; Species&lt;/p&gt;

&lt;p&gt;...&lt;del&gt;&amp;gt;getRepository(&apos;Species&apos;)&lt;/del&gt;&amp;gt;findOneByPath(&apos;path&apos;) gives me this error:&lt;/p&gt;

&lt;p&gt;SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;42S22&amp;#93;&lt;/span&gt;: Column not found: 1054 Unknown column &apos;t0.path&apos; in &apos;where clause&apos; &lt;/p&gt;

&lt;p&gt;The query being generated is as follows:&lt;/p&gt;

&lt;p&gt;&apos;SELECT t1.body AS body2, t1.path AS path3, t1.id AS id4, t1.title AS title5, t1.updated_at AS updated_at6, t1.created_at AS created_at7, t1.alternate_names AS alternate_names8, t1.latin_name AS latin_name9, t1.genus_id AS genus_id10 FROM species t1 WHERE t0.path = ?&apos;&lt;/p&gt;

&lt;p&gt;that t0 is an alias that does exist.&lt;/p&gt;

&lt;p&gt;If you need further information, let me know.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</comment>
                    <comment id="16323" author="guilhermeblanco" created="Sun, 14 Aug 2011 03:23:10 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;Your mapping is wrong.&lt;br/&gt;
Species entity extends from BaseClassification, which contains no &quot;path&quot; field. The only &quot;path&quot; that exists is in Page entity, which has nothing hierarchically to Species entity.&lt;/p&gt;

&lt;p&gt;Marking this issue as invalid. Reopen if you after your mapping fix the issue still persist.&lt;/p&gt;

&lt;p&gt;Cheers, &lt;/p&gt;</comment>
                    <comment id="16328" author="kbond" created="Sun, 14 Aug 2011 16:18:34 +0000"  >&lt;p&gt;Hmm, not sure what you mean?  BaseClassification extends the Page entity...  Should BaseClassification not contain all the fields from Page and Species not all the fields from BaseClassification?&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                                <inwardlinks description="is referenced by">
                            <issuelink>
            <issuekey id="12011">DDC-841</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-979] ArrayHydrator::updateResultPointer() must be an array, string given</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-979</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have the following MySQL tables + data&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-sql&quot;&gt;
CREATE TABLE `agent` (
  `agentID` bigint(20) NOT NULL AUTO_INCREMENT,
  `company` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`agentID`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT=&apos;module=agent&apos;;

CREATE TABLE `file` (
  `fileID` bigint(20) NOT NULL AUTO_INCREMENT,
  `filename` varchar(100) DEFAULT NULL,
  `mimetype` varchar(100) DEFAULT NULL,
  `extension` varchar(5) DEFAULT NULL,
  `path` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`fileID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT=&apos;module=agent&apos;;

CREATE TABLE `agentFile` (
  `agentID` bigint(20) NOT NULL COMMENT &apos;orderBy=orderNr&amp;amp;order=asc&apos;,
  `fileID` bigint(20) NOT NULL,
  `orderNr` int(11) DEFAULT NULL,
  PRIMARY KEY (`agentID`,`fileID`),
  KEY `agentFileAgent` (`agentID`),
  KEY `agentFileFile` (`fileID`),
  CONSTRAINT `agentFileAgent` FOREIGN KEY (`agentID`) REFERENCES `agent` (`agentID`) ON &lt;span class=&quot;code-keyword&quot;&gt;DELETE&lt;/span&gt; CASCADE ON &lt;span class=&quot;code-keyword&quot;&gt;UPDATE&lt;/span&gt; NO ACTION,
  CONSTRAINT `agentFileFile` FOREIGN KEY (`fileID`) REFERENCES `file` (`fileID`) ON &lt;span class=&quot;code-keyword&quot;&gt;DELETE&lt;/span&gt; CASCADE ON &lt;span class=&quot;code-keyword&quot;&gt;UPDATE&lt;/span&gt; NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT=&apos;module=agent&apos;;


INSERT INTO `agent` (agentID,company) VALUES (1,&apos;Company 1&apos;);
INSERT INTO `agent` (agentID,company) VALUES (2,&apos;Company 2&apos;);
INSERT INTO `file` (fileID,filename,mimetype,extension,path) VALUES (1,&apos;logoCompany2&apos;,NULL,NULL,NULL);
INSERT INTO `agentFile` (agentID,fileID,orderNr) VALUES (2,1,0);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Everything works fine if I do the following:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$query = $em-&amp;gt;createQuery(&apos;SELECT a, af, f FROM Agent_Model_Agent a LEFT JOIN a._agentFileRefAgent af WITH af._orderNr=0 LEFT JOIN af._file f&apos;);
$results = $query-&amp;gt;getResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;But I get an error when I replace getResult with getArrayResult.&lt;/p&gt;
&lt;div class=&quot;code panel&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 = $em-&amp;gt;createQuery(&apos;SELECT a, af, f FROM Agent_Model_Agent a LEFT JOIN a._agentFileRefAgent af WITH af._orderNr=0 LEFT JOIN af._file f&apos;);
$results = $query-&amp;gt;getArrayResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;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;Catchable fatal error: Argument 1 passed to Doctrine\ORM\Internal\Hydration\ArrayHydrator::updateResultPointer() must be an array, string given, called in /&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;/www/vhost/issue/htdocs/externals/Doctrine/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php on line 150 and defined in /&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;/www/vhost/issue/htdocs/externals/Doctrine/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php on line 207
0.2773	12011956	Doctrine\ORM\AbstractQuery-&amp;gt;getArrayResult( )	../IndexController.php:18
0.2773	12012164	Doctrine\ORM\AbstractQuery-&amp;gt;execute( )	../AbstractQuery.php:378
0.3262	12217064	Doctrine\ORM\Internal\Hydration\AbstractHydrator-&amp;gt;hydrateAll( )	../AbstractQuery.php:527
0.3263	12199568	Doctrine\ORM\Internal\Hydration\ArrayHydrator-&amp;gt;_hydrateAll( )	../AbstractHydrator.php:99
0.3276	12219368	Doctrine\ORM\Internal\Hydration\ArrayHydrator-&amp;gt;_hydrateRow( )	../ArrayHydrator.php:62
0.3277	12223840	Doctrine\ORM\Internal\Hydration\ArrayHydrator-&amp;gt;updateResultPointer( )	../ArrayHydrator.php:150
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>MySQL - Ubuntu</environment>
            <key id="12293">DDC-979</key>
            <summary>ArrayHydrator::updateResultPointer() must be an array, string given</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="2">Won&apos;t Fix</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="tbo">Van Hauwaert Bert</reporter>
                        <labels>
                    </labels>
                <created>Wed, 12 Jan 2011 12:43:10 +0000</created>
                <updated>Sun, 11 Dec 2011 07:51:06 +0000</updated>
                    <resolved>Sun, 11 Dec 2011 07:50:12 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.2</fixVersion>
                                <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16344" author="guilhermeblanco" created="Tue, 16 Aug 2011 05:37:12 +0000"  >&lt;p&gt;Could you please include your Model mappings too?&lt;/p&gt;</comment>
                    <comment id="16964" author="guilhermeblanco" created="Sun, 11 Dec 2011 07:50:12 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;This special situation is not really possible.&lt;br/&gt;
You are not allowed to create a cross-reference Entity without defining an own @Id.&lt;br/&gt;
The situation you exposed here is due to it. Issue was left open but now after some tests it can be closed. In 2.2-DEV we added a better explanation for your problem, I hope the message is clear enough for you:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Entity of type Doctrine\Tests\ORM\Functional\Ticket\DDC979AgentFile has identity through a foreign entity Doctrine\Tests\ORM\Functional\Ticket\DDC979Agent, however &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; entity has no identity itself. 
You have to call EntityManager#persist() on the related entity and make sure that an identifier was generated before trying to persist &apos;Doctrine\Tests\ORM\Functional\Ticket\DDC979AgentFile&apos;. 
In &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; of Post Insert ID Generation (such as MySQL Auto-Increment or PostgreSQL SERIAL) &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; means you have to call EntityManager#flush() between both persist operations.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;Marking the issue as won&apos;t fix.&lt;/p&gt;</comment>
                    <comment id="16965" author="guilhermeblanco" created="Sun, 11 Dec 2011 07:51:06 +0000"  >&lt;p&gt;Added the testcase I have used.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11129" name="DDC979Test.php" size="4364" author="guilhermeblanco" created="Sun, 11 Dec 2011 07:51:06 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-934] Parameter binding documentation inconsistency</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-934</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.0/en/reference/dql-doctrine-query-language.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/reference/dql-doctrine-query-language.html&lt;/a&gt; it is stated that you bind :parameter placeholders &lt;b&gt;including&lt;/b&gt; the colon. However, this doesn&apos;t seem to be the case.&lt;/p&gt;

&lt;p&gt;To find the location in the documentation, search for :groupid.&lt;/p&gt;

&lt;p&gt;It would be nice if doctrine would either output a warning/an exception if you try to use &quot;:parameter&quot; instead of &quot;parameter&quot; or simply strip the colon from the input. &lt;/p&gt;

&lt;p&gt;This bug should be fixed prior the final release, since it makes new doctrine users scratch their head.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12230">DDC-934</key>
            <summary>Parameter binding documentation inconsistency</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="felicitus">Timo A. Hummel</reporter>
                        <labels>
                    </labels>
                <created>Tue, 14 Dec 2010 23:16:58 +0000</created>
                <updated>Mon, 15 Aug 2011 04:51:35 +0000</updated>
                    <resolved>Mon, 15 Aug 2011 04:51:35 +0000</resolved>
                            <version>2.0-RC2</version>
                                <fixVersion>2.2</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16333" author="guilhermeblanco" created="Mon, 15 Aug 2011 04:51:35 +0000"  >&lt;p&gt;Implemented in latest 2.2-DEV by commit: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/f148912a28601d9c6234d59661f0e4ad1ae0c138&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/f148912a28601d9c6234d59661f0e4ad1ae0c138&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-766] Parameter not used in OrmTestCase</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-766</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The param $eventManager in OrmTestCase::_getTestEntityManager is not used and should be removed.&lt;/p&gt;

&lt;p&gt;(However, I&apos;m not sure whether this would be a change to API and thus I don&apos;t do it myself but file this as an issue)&lt;/p&gt;</description>
                <environment></environment>
            <key id="11822">DDC-766</key>
            <summary>Parameter not used in OrmTestCase</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="shurakai">Christian Heinrich</reporter>
                        <labels>
                    </labels>
                <created>Wed, 25 Aug 2010 10:32:35 +0000</created>
                <updated>Sun, 16 Oct 2011 04:11:25 +0000</updated>
                    <resolved>Sun, 16 Oct 2011 04:11:25 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16617" author="guilhermeblanco" created="Sun, 16 Oct 2011 04:11:25 +0000"  >&lt;p&gt;Fixed in &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/eeba947ea7f0f5f18672c368398f105a93e58545&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/eeba947ea7f0f5f18672c368398f105a93e58545&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-753] RepositoryClass for MappedSuperclass or other global set custom repository</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-753</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I need global repository class setter for all my entities. Because manualy set on all entity is not DRY.&lt;/p&gt;

&lt;p&gt;My idea is two possibilities. First is param for MappedSuperclass:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * @MappedSuperclass(repositoryClass=MyRepository)
 */
class Foo {}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;or config option (same as proxy dir/namespace)&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$config = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\ORM\Configuration;
$config-&amp;gt;setDefaultRepository(&apos;MyRepository&apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="11792">DDC-753</key>
            <summary>RepositoryClass for MappedSuperclass or other global set custom repository</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="vrtak-cz">Patrik Voto&#269;ek</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 Aug 2010 06:06:14 +0000</created>
                <updated>Sun, 13 Nov 2011 21:16:57 +0000</updated>
                    <resolved>Sun, 13 Nov 2011 21:16:57 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16809" author="beberlei" created="Sun, 13 Nov 2011 21:16:57 +0000"  >&lt;p&gt;Implemented&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-744] invalid onDelete value inside of @JoinColumn annotation throws an exception instead of valueable error message</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-744</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Invalid onDelete value throws an exception in doctrine cli interface. It would be nice that developer can see what error occured and where fix it. Exception does not have any information about invalid onDelete value or file &amp;amp; line pointer to problem.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11755">DDC-744</key>
            <summary>invalid onDelete value inside of @JoinColumn annotation throws an exception instead of valueable error message</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="obrys">Jan Obr&#225;til</reporter>
                        <labels>
                    </labels>
                <created>Wed, 11 Aug 2010 10:25:17 +0000</created>
                <updated>Sun, 16 Oct 2011 04:14:24 +0000</updated>
                    <resolved>Sun, 16 Oct 2011 04:14:24 +0000</resolved>
                            <version>2.0-BETA2</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16618" author="guilhermeblanco" created="Sun, 16 Oct 2011 04:14:24 +0000"  >&lt;p&gt;We have the validate-schema command. This ticket is now invalid&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-725] Consider removing onUpdate attribute from join column mappings</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-725</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;If onUpdate is only ever used in cases where a primary key changes, which is bad design and not supported by doctrine anyway, there is no reason to support this attribute.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11693">DDC-725</key>
            <summary>Consider removing onUpdate attribute from join column mappings</summary>
                <type id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/task.png">Task</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="romanb">Roman S. Borschel</reporter>
                        <labels>
                    </labels>
                <created>Thu, 29 Jul 2010 05:17:56 +0000</created>
                <updated>Tue, 26 Jul 2011 21:14:50 +0000</updated>
                    <resolved>Tue, 26 Jul 2011 21:14:50 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="13733" author="beberlei" created="Fri, 30 Jul 2010 03:22:21 +0000"  >&lt;p&gt;ah yes, this is probably a good idea.&lt;/p&gt;</comment>
                    <comment id="16040" author="mridgway" created="Tue, 21 Jun 2011 21:28:20 +0000"  >&lt;p&gt;Do you plan on removing the annotation or just ignoring it?  Removing it will cause a backwards compatibility issue for people that did use it.&lt;/p&gt;

&lt;p&gt;I will work on a patch for this then.&lt;/p&gt;</comment>
                    <comment id="16215" author="beberlei" created="Tue, 26 Jul 2011 21:14:50 +0000"  >&lt;p&gt;Merged Pull Request, closing this issue.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-720] Ability to call flush only for a given entity</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-720</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In a nutshell, this change would mean that flush() can optionally accept an entity as an argument. When that happens, the resulting changeset will be limited to that entity and any entity reachable from it.&lt;/p&gt;

&lt;p&gt;The IRC transcript contains more details.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11685">DDC-720</key>
            <summary>Ability to call flush only for a given entity</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="amirabiri">Amir Abiri</reporter>
                        <labels>
                    </labels>
                <created>Tue, 27 Jul 2010 11:58:19 +0000</created>
                <updated>Sun, 13 Nov 2011 20:44:02 +0000</updated>
                    <resolved>Sun, 13 Nov 2011 20:44:02 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16680" author="beberlei" created="Sat, 22 Oct 2011 08:52:32 +0000"  >&lt;p&gt;Rescheduled for 2.2&lt;/p&gt;</comment>
                    <comment id="16682" author="beberlei" created="Sat, 22 Oct 2011 12:33:13 +0000"  >&lt;p&gt;Code here, please review &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/166&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/166&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="16808" author="beberlei" created="Sun, 13 Nov 2011 20:44:02 +0000"  >&lt;p&gt;This was implemented and is in master.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10711" name="irc.txt" size="7166" author="amirabiri" created="Tue, 27 Jul 2010 11:58:19 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-659] Programmatic PHP ClassMetadata Builder</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-659</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Currently using the two existing PHP Metadata Drivers you have a hard time writing the metadata against a plain ClassMetadata instance, because its already so optimiized in the datastruct. It would we cool if we had a class (Doctrine\ORM\Tools\ClassMetadataBuilder) which accepts a ClassMetadata instance in the constructor and has convenience methods to build up this instance.&lt;/p&gt;

&lt;p&gt;This way you could use the PHPStatic Driver for example:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;class MyEntity
{
  &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function loadClassMetadata(ClassMetadata $metadata)
  {
    $builder = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ClassMetadataBuilder($metadata);
    $builder-&amp;gt;setTable(&apos;my_entity&apos;);
    &lt;span class=&quot;code-comment&quot;&gt;// ...
&lt;/span&gt;  }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="11565">DDC-659</key>
            <summary>Programmatic PHP ClassMetadata Builder</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 28 Jun 2010 17:18:51 +0000</created>
                <updated>Sun, 4 Sep 2011 12:14:03 +0000</updated>
                    <resolved>Sun, 4 Sep 2011 12:14:03 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="13848" author="beberlei" created="Sun, 8 Aug 2010 08:00:58 +0000"  >&lt;p&gt;API Suggestion:&lt;/p&gt;

&lt;div class=&quot;code panel&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 ClassMetadataBuilder
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __construct(ClassMetadata $cm);
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function markMappedSuperclass();

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setTable($name);
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addTableIndex($columns, $name);
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addTableUniqueConstraint($columns, $name);

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setJoinedTableInheritance();
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setSingleTableInheritance();
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setDiscriminatorColumn($name, $type);
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addDiscriminatorMapClass($name, $class);
    
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setChangeTrackingPolicyDeferredImplict();
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setChangeTrackingPolicyDeferredExplicit();
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setChangeTrackingPolicyNotify();

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addField($fieldName, $type, array $options = array());
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addVersionField($fieldName, $type, array $options = array());
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addPrimaryField($fieldName, $type, array $options = array());
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setSequenceGenerator($sequenceName, $allocationSize = 1, $initialValue = 1);

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addOneToOne(fieldName, $targetEntity);
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addInverseManyToOne(fieldName, $targetEntity);
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addManyToOne(fieldName, $targetEntity);
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addOneToMany(fieldName, $targetEntity);
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addManyToMany(fieldName, $targetEntity);

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addLifecycleEvent($event, $methodName);
}

class FieldBuilder
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function length($length);
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function nullable($flag);
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function unique($flag);
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function columnName($name);
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function precision($p);
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function scale($s);
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function columnDefinition($def);
}

class AssociationBuilder
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function mappedBy($fieldName);
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function inversedBy($fieldName);

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addCascade(array $cascade);
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function cascadePersist();
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function cascadeRemove();
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function cascadeMerge();
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function cascadeDetach();
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function cascadeRefresh();

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function notRemoveOrphans();
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function removeOrphans();
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function fetchEager();
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function fetchLazy();

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addJoinColumn($columnName, $referencedColumnName, $nullable = &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;, $unique = &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;, $onDelete = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;, $columnDef = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;);
}

class OneToManyAssociationBuilder &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; AssociationBuilder
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addOrderBy($fieldName, $orientation);
}

class ManyToManyAssociationBuilder &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; OneToManyAssociationBuilder
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setJoinTable($name);
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addInverseJoinColumn($columnName, $referencedColumnName, $nullable = &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;, $unique = &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;, $onDelete = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;, $columnDef = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="14041" author="avalanche123" created="Mon, 23 Aug 2010 18:09:35 +0000"  >&lt;p&gt;I&apos;m on it, in case you were wondering&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="14043" author="beberlei" created="Tue, 24 Aug 2010 04:24:15 +0000"  >&lt;p&gt;Can we discuss on the API?&lt;/p&gt;

&lt;p&gt;@Roman what is your opinion on using set/add or omitting it in this case? I want the interface to be as fluent as possible &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="14086" author="romanb" created="Thu, 26 Aug 2010 08:19:57 +0000"  >&lt;p&gt;I think omitting add/set prefixes is fine if it improves the readability of the fluent interface.&lt;/p&gt;</comment>
                    <comment id="14184" author="avalanche123" created="Mon, 30 Aug 2010 22:20:02 +0000"  >&lt;p&gt;So I&apos;m kinda stuck with associations.&lt;br/&gt;
API like addOneToOne($fieldName, $targetEntity) makes little sense, since relation mapping requires much more information than that.&lt;br/&gt;
So one way to account for it would be to change the function signature to read addOneToOne($fieldName, $targetEntity, $associationMapping), where the mapping array would contain the rest of the required information like joinColumns, mappedBy, cascade, fetch, etc.&lt;br/&gt;
Then the $associationMapping array could be generated using the AssociationBuilder and subclasses.&lt;br/&gt;
This makes builder somewhat bloated...&lt;br/&gt;
Thoughts?&lt;/p&gt;</comment>
                    <comment id="14188" author="beberlei" created="Tue, 31 Aug 2010 03:06:18 +0000"  >&lt;p&gt;The idea is that methods on ClassMetadataBuilder return the FieldBuilder and AssociationBuilder when necessary.&lt;/p&gt;

&lt;p&gt;That way the interface isnt fully fluent, but it is fluent for the definition of one field, which is a pretty good separation layer anyways:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$builder-&amp;gt;oneToOne(&lt;span class=&quot;code-quote&quot;&gt;&quot;address&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;MyEntities\Address&quot;&lt;/span&gt;)-&amp;gt;cascadePersist()-&amp;gt;cascadeMerge();
$builder-&amp;gt;field(&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)-&amp;gt;length(10);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Passing options is rather bad in my opinion, because it would be cumbersome to map that into a correct method call.&lt;/p&gt;

&lt;p&gt;However I just realize that is complicated to call the final method on ClassMetadataInfo.&lt;/p&gt;

&lt;p&gt;Can we collaborate in IRC on that tonight?&lt;/p&gt;</comment>
                    <comment id="14597" author="shurakai" created="Fri, 22 Oct 2010 20:00:48 +0000"  >&lt;p&gt;Hm, what about a &quot;setIdGenerator&quot; method?&lt;/p&gt;</comment>
                    <comment id="16417" author="beberlei" created="Sun, 4 Sep 2011 12:14:03 +0000"  >&lt;p&gt;Implemented&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-638] Extend SqlWalker</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-638</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I needed to extend SqlWalker for a custom output walker and all the vars are private instead of protected.  Easy fix if it is intended to be extendable and I was supposed to be extending SqlWalker.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11491">DDC-638</key>
            <summary>Extend SqlWalker</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/trivial.png">Trivial</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="2">Won&apos;t Fix</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="ss10sb">Scott Morken</reporter>
                        <labels>
                    </labels>
                <created>Mon, 14 Jun 2010 15:26:09 +0000</created>
                <updated>Fri, 9 Dec 2011 05:17:49 +0000</updated>
                    <resolved>Fri, 9 Dec 2011 05:17:49 +0000</resolved>
                            <version>2.0-BETA2</version>
                                <fixVersion>2.2</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="13370" author="beberlei" created="Sat, 19 Jun 2010 15:14:55 +0000"  >&lt;p&gt;Don&apos;t all the private variables have getter and setter methods to modify them?&lt;/p&gt;

&lt;p&gt;Btw, can you explain your use-case a little bit more? This would greatly help to find solutions to the issue.&lt;/p&gt;</comment>
                    <comment id="13388" author="ss10sb" created="Mon, 21 Jun 2010 10:20:22 +0000"  >&lt;p&gt;They do have getter and setter methods, but privates don&apos;t show up at all in a class that extends the base class.  SqlWalker works great if it&apos;s not meant to be extended.&lt;/p&gt;

&lt;p&gt;Sure, I was using HINT_CUSTOM_OUTPUT_WALKER to point to an extended version of SqlWalker to strip some joins off of a query (in the SqlWalker::walkFromClause() method)  that I cloned from the base query I was using.  Something like...&lt;br/&gt;
SELECT id FROM table &lt;br/&gt;
LEFT JOIN table1 table1.table_id = table.id&lt;br/&gt;
ORDER BY field1&lt;br/&gt;
I wanted just the ids without the joins for the cloned query so the easiest thing I could think of was to override SqlWalker with the HINT_CUSTOM_OUTPUT_WALKER and strip the joins in ::walkFromClause().  I was also thinking about removing the order by but it didn&apos;t seem to have much impact on performance, but if I had, it would have been the same way, although I think that one would be removable via a HINT_CUSTOM_TREE_WALKER?  I didn&apos;t really look into that part.  I know my use-case is pretty specific and won&apos;t apply to 99.9% of people out there.&lt;/p&gt;

&lt;p&gt;There&apos;s a good chance I misunderstood how you guys wanted the HINT_CUSTOM_OUTPUT_WALKER to work, but it seemed to me like it would be easiest to use it to extend SqlWalker and that worked great once I changed the privates to protected &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/biggrin.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="13389" author="romanb" created="Mon, 21 Jun 2010 10:38:00 +0000"  >&lt;p&gt;@&quot;... and that worked great once I changed the privates to protected&quot;&lt;/p&gt;

&lt;p&gt;Until the next refactoring &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; This is heavily &quot;moving&quot; code and I don&apos;t think we want to take care of the backwards compatibility issues with making them protected. You were right in assuming that currently SQLWalker is not meant to be extended, implementing TreeWalker directly with a custom walker. I do see that it can be a valid use-case but the problem is that this will cause quite some burden on backwards compatibility because this code tends to change a lot.&lt;/p&gt;</comment>
                    <comment id="13390" author="ss10sb" created="Mon, 21 Jun 2010 10:46:38 +0000"  >&lt;p&gt;Sounds good to me.  As always, thanks!!&lt;/p&gt;</comment>
                    <comment id="16956" author="guilhermeblanco" created="Fri, 9 Dec 2011 05:17:49 +0000"  >&lt;p&gt;As previously defined, SqlWalker is not meant to be extended.&lt;/p&gt;

&lt;p&gt;If user wants to create a customized output, he must provide his own customOutputWalker entirely implemented.&lt;br/&gt;
SqlWalker is a place of heavy implementation, one of the core functionalities ans it tends to restrict a lot our possible fixes because internal API is always changing.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-609] Refactor ComparisonExpression grammar rule</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-609</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;ComparisonExpression has a lot of alternatives to choose from and it is simply difficult to make the decision without backtracking, only lookahead.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11407">DDC-609</key>
            <summary>Refactor ComparisonExpression grammar rule</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Mon, 24 May 2010 14:03:00 +0000</created>
                <updated>Sat, 10 Dec 2011 22:41:24 +0000</updated>
                    <resolved>Sat, 10 Dec 2011 22:41:24 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16961" author="guilhermeblanco" created="Sat, 10 Dec 2011 22:41:24 +0000"  >&lt;p&gt;Done with current refactorings&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-551] Consider adding ability to specify additional join conditions on a @JoinTable / @JoinColumn</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-551</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Per discussion with beberlei and romanb in #doctrine-dev yesterday, opening this ticket as a &quot;feature request&quot; to support migrating legacy schemas with a special many-to-many mapping to Doctrine.&lt;/p&gt;

&lt;p&gt;Consider the following schema:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;CREATE TABLE categories (
    category_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    content_type ENUM(&apos;posts&apos;, &apos;videos&apos;),
    /* ... */
    PRIMARY KEY (category_id)
) ENGINE=InnoDB;

CREATE TABLE content_category_association (
    content_id BIGINT UNSIGNED NOT NULL,
    category_id BIGINT UNSIGNED NOT NULL,
    content_type ENUM(&apos;posts&apos;, &apos;videos&apos;),
    PRIMARY KEY (content_id, category_id, content_type),
    FOREIGN KEY (category_id, content_type) REFERENCES categories(category_id, content_type) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB;

CREATE TABLE posts (
    post_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    /* ... */
    PRIMARY KEY (post_id)
) ENGINE=InnoDB;

CREATE TABLE videos (
    video_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    /* ... */
) ENGINE=InnoDB;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;There is a Many-To-Many relationship between each of the posts and videos table (via the content_category_association table) to the categories table.  The difference from a standard many-to-many relationship is there is an extra column in the association table (content_type) which must be included in the join condition to return correct results. Since both the videos and posts table have their own autonumber primary keys, a join against the association table must include an extra condition (i.e. INNER JOIN ... ON ... AND content_category_association.content_type = &apos;posts&apos;).&lt;/p&gt;

&lt;p&gt;Perhaps you could allow passing of additional properties to @JoinTable / joinColumns to specify the additional join condition .. i.e.:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;/** @Entity */
class Video
{
  /**
   * @ManyToMany(targetEntity=&quot;Category&quot;)
   * @JoinTable(name=&quot;content_category_association&quot;,
   *      joinColumns={@JoinColumn(name=&quot;content_id&quot;, referencedColumnName=&quot;video_id&quot;)},
   *      inverseJoinColumns={@JoinColumn(name=&quot;category_id&quot;, referencedColumnName=&quot;video_id&quot;)},
   *      extraJoinTerms={@JoinTerm(content_type=&quot;video&quot;)}
   *      )
   */
  private $categories;

  // ...
}

/** @Entity */
class Category
{
    // ...
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Certainly this schema is not ideal from a pure OO perspective.  Class inheritance with a discriminator column may have been a better way to do this, thereby allowing a globally unique &quot;content_id&quot; for all types of content, negating the need for the extra column in the association table.  However, it would nonetheless be helpful to have this additional capability within Doctrine to avoid having to re-factor such a legacy schema.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11283">DDC-551</key>
            <summary>Consider adding ability to specify additional join conditions on a @JoinTable / @JoinColumn</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="asm89">Alexander</assignee>
                                <reporter username="mjh_ca">Marc Hodgins</reporter>
                        <labels>
                    </labels>
                <created>Wed, 28 Apr 2010 13:33:44 +0000</created>
                <updated>Thu, 22 Dec 2011 20:20:04 +0000</updated>
                    <resolved>Sun, 18 Dec 2011 16:08:35 +0000</resolved>
                            <version>2.0-BETA1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>5</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="14833" author="yaroslav" created="Thu, 25 Nov 2010 03:51:52 +0000"  >&lt;p&gt;Would be great to get this functionality&lt;/p&gt;</comment>
                    <comment id="16192" author="beberlei" created="Fri, 22 Jul 2011 07:28:31 +0000"  >&lt;p&gt;Assigned to asm89&lt;/p&gt;</comment>
                    <comment id="16193" author="beberlei" created="Fri, 22 Jul 2011 07:29:05 +0000"  >&lt;p&gt;Scheduled for 2.2&lt;/p&gt;</comment>
                    <comment id="16346" author="asm89" created="Tue, 16 Aug 2011 11:55:36 +0000"  >&lt;p&gt;I&apos;ve been working on this ticket over here:&lt;br/&gt;
&lt;a href=&quot;https://github.com/asm89/doctrine2/tree/DDC-551&quot; class=&quot;external-link&quot;&gt;https://github.com/asm89/doctrine2/tree/DDC-551&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Latest thing I added was the state of the collection of filters, because this is needed for parsing (and sometimes not parsing) the queries to generate SQL. I&apos;d like some feedback about the state keeping. More information at the commit:&lt;br/&gt;
&lt;a href=&quot;https://github.com/asm89/doctrine2/commit/2653d735e230d19b0fcb703800008f3abdb7a3ba&quot; class=&quot;external-link&quot;&gt;https://github.com/asm89/doctrine2/commit/2653d735e230d19b0fcb703800008f3abdb7a3ba&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point the EntityManager keeps track of this state, but maybe it would be nice to have a separate FilterCollection keep track of the state/hashes etc?&lt;/p&gt;</comment>
                    <comment id="17024" author="beberlei" created="Sun, 18 Dec 2011 16:04:03 +0000"  >&lt;p&gt;This issue is referenced in Github Pull-Request GH-224&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/224&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/224&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17025" author="beberlei" created="Sun, 18 Dec 2011 16:04:04 +0000"  >&lt;p&gt;Related Pull Request was closed: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/210&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/210&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17026" author="beberlei" created="Sun, 18 Dec 2011 16:04:05 +0000"  >&lt;p&gt;Related Pull Request was closed: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/224&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/224&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17027" author="beberlei" created="Sun, 18 Dec 2011 16:08:35 +0000"  >&lt;p&gt;Implemented&lt;/p&gt;</comment>
                    <comment id="17028" author="beberlei" created="Sun, 18 Dec 2011 18:59:03 +0000"  >&lt;p&gt;This issue is referenced in Github Pull-Request GH-225&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/225&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/225&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17029" author="beberlei" created="Sun, 18 Dec 2011 19:00:02 +0000"  >&lt;p&gt;Related Pull Request was closed: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/225&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/225&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17038" author="beberlei" created="Mon, 19 Dec 2011 08:27:05 +0000"  >&lt;p&gt;This issue is referenced in Github Pull-Request GH-227&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/227&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/227&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17040" author="beberlei" created="Mon, 19 Dec 2011 08:49:04 +0000"  >&lt;p&gt;Related Pull Request was closed: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/227&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/227&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17052" author="darkangel" created="Mon, 19 Dec 2011 18:12:12 +0000"  >&lt;p&gt;Alex mentioned on IRC that filters do not provide the functionality that the OP requires, so this issue should really re-opened, unless I&apos;m missing something?&lt;/p&gt;</comment>
                    <comment id="17090" author="beberlei" created="Thu, 22 Dec 2011 20:20:04 +0000"  >&lt;p&gt;This issue is referenced in Github Pull-Request GH-237&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/237&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/237&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="12337">DDC-1007</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="11785">DDC-750</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="12518">DDC-1092</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="12505">DDC-1083</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-509] Documentation for Implementing Event Listeners is incomplete</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-509</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;See: &lt;a href=&quot;http://www.doctrine-project.org/documentation/manual/2_0/en/events#implementing-event-listeners&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/documentation/manual/2_0/en/events#implementing-event-listeners&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I created it as Major due to the following statement  &quot;you have to follow this restrictions very carefully since operations in the wrong event may produce lots of different errors, such as inconsistent data and lost updates/persists/removes.&quot;&lt;/p&gt;

&lt;p&gt;s/this/these/ as well&lt;/p&gt;</description>
                <environment></environment>
            <key id="11204">DDC-509</key>
            <summary>Documentation for Implementing Event Listeners is incomplete</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="hobodave">David Abdemoulaie</reporter>
                        <labels>
                    </labels>
                <created>Sat, 10 Apr 2010 03:07:06 +0000</created>
                <updated>Tue, 11 Oct 2011 04:28:04 +0000</updated>
                    <resolved>Tue, 11 Oct 2011 04:28:04 +0000</resolved>
                            <version>2.0-ALPHA4</version>
                                <fixVersion>2.2</fixVersion>
                                <component>Documentation</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16572" author="guilhermeblanco" created="Tue, 11 Oct 2011 04:28:04 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-446] Cached resultset do not add Entities in UnitOfWork</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-446</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When using resultset cache, when you fetch for these object and attempt to manipulate them, they fail to work giving this message:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Notice:  Undefined index: 000000006f95482300000000384dffac in /srv/app/library/Doctrine/ORM/UnitOfWork.php on line 1901
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="11096">DDC-446</key>
            <summary>Cached resultset do not add Entities in UnitOfWork</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Mar 2010 18:39:03 +0000</created>
                <updated>Sun, 30 Oct 2011 13:21:37 +0000</updated>
                    <resolved>Sun, 30 Oct 2011 13:21:37 +0000</resolved>
                                            <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="12381" author="romanb" created="Sat, 20 Mar 2010 05:19:59 +0000"  >&lt;p&gt;Objects coming from the result cache are all detached. The EM does not care about them unless you merge() them. But there should probably be a better exception instead of this notice. Please show the code that causes the notice.&lt;/p&gt;

&lt;p&gt;PS: Result caching objects is inefficient. &lt;/p&gt;</comment>
                    <comment id="12392" author="guilhermeblanco" created="Sat, 20 Mar 2010 09:24:18 +0000"  >&lt;p&gt;Test case attached.&lt;/p&gt;

&lt;p&gt;This is a situation where it should work smoothly IMHO.&lt;/p&gt;</comment>
                    <comment id="12397" author="romanb" created="Sat, 20 Mar 2010 10:37:35 +0000"  >&lt;p&gt;No, it should not work smoothly because $user is a detached object. It should throw an exception but the problem is that its hard to detect whether an object is detached in _doPersist.&lt;/p&gt;</comment>
                    <comment id="12398" author="romanb" created="Sat, 20 Mar 2010 10:37:57 +0000"  >&lt;p&gt;You need to understand the difference between managed and detached. Its very important.&lt;/p&gt;</comment>
                    <comment id="12401" author="guilhermeblanco" created="Sat, 20 Mar 2010 11:01:53 +0000"  >&lt;p&gt;Adding merge doesn&apos;t work too.... same error.&lt;/p&gt;

&lt;p&gt;Juyst add $this-&amp;gt;_em-&amp;gt;merge($user); in line 52.&lt;/p&gt;</comment>
                    <comment id="12402" author="romanb" created="Sat, 20 Mar 2010 11:20:39 +0000"  >&lt;p&gt;Of course it wouldnt because thats not how merge works. Merge returns a managed copy.&lt;/p&gt;

&lt;p&gt;So you would do:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$managedUser = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;merge($user);

...

$article-&amp;gt;setUser($managedUser);

...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="12403" author="romanb" created="Sat, 20 Mar 2010 11:21:29 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/documentation/manual/2_0/en/working-with-objects:merging-entities&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/documentation/manual/2_0/en/working-with-objects:merging-entities&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="16726" author="beberlei" created="Sun, 30 Oct 2011 13:21:37 +0000"  >&lt;p&gt;Implemented through &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-217&quot; title=&quot;Result cache should cache the SQL result and not the final objects&quot;&gt;&lt;del&gt;DDC-217&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                <outwardlinks description="relates to">
                            <issuelink>
            <issuekey id="10634">DDC-217</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                    <attachment id="10508" name="DDC446Test.php" size="1878" author="guilhermeblanco" created="Sat, 20 Mar 2010 09:24:18 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-408] accepting array of values per conditions rather than scalar only for find() and findBy() methods</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-408</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Regarding this post:&lt;br/&gt;
&lt;a href=&quot;http://groups.google.com/group/doctrine-user/browse_thread/thread/ab48be395099dec9&quot; class=&quot;external-link&quot;&gt;http://groups.google.com/group/doctrine-user/browse_thread/thread/ab48be395099dec9&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;it would be interesting to be able to pass array of values per criteria.&lt;/p&gt;

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

&lt;p&gt;// retrieve &apos;user&apos; role : Already works with current implementation of ORM&lt;br/&gt;
$em-&amp;gt;getRepository(&apos;Entities\Role&apos;)-&amp;gt;findBy(array(&apos;name&apos; =&amp;gt; &apos;user&apos;));&lt;/p&gt;

&lt;p&gt;// retrieve &apos;user&apos; and &apos;moderator&apos; roles : Not implemented yet&lt;br/&gt;
$em-&amp;gt;getRepository(&apos;Entities\Role&apos;)-&amp;gt;findBy(array(&apos;name&apos; =&amp;gt; array(&apos;user&apos;, &apos;moderator&apos;)));&lt;/p&gt;</description>
                <environment></environment>
            <key id="11031">DDC-408</key>
            <summary>accepting array of values per conditions rather than scalar only for find() and findBy() methods</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="floch">Florent B</reporter>
                        <labels>
                    </labels>
                <created>Thu, 11 Mar 2010 13:14:05 +0000</created>
                <updated>Sun, 14 Aug 2011 00:28:20 +0000</updated>
                    <resolved>Sun, 14 Aug 2011 00:28:20 +0000</resolved>
                            <version>2.0-ALPHA4</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="12352" author="romanb" created="Thu, 18 Mar 2010 19:18:27 +0000"  >&lt;p&gt;The idea here is that this makes it easy to construct alternatives, so all conditions that look like &quot;a = ? and (b = ? or b = ? or b = ? ... )&quot;, so every value that is an array would result in a parenthesized block of alternatives.&lt;/p&gt;</comment>
                    <comment id="12929" author="shurakai" created="Wed, 12 May 2010 14:09:21 +0000"  >&lt;p&gt;I&apos;ve fixed this within my branch: &lt;a href=&quot;http://github.com/Shurakai/doctrine2/commit/c8f95f932a6519d27bc9402553b017da3f836c09&quot; class=&quot;external-link&quot;&gt;http://github.com/Shurakai/doctrine2/commit/c8f95f932a6519d27bc9402553b017da3f836c09&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If this change gets accepted, it should be available in trunk soon.&lt;/p&gt;

&lt;p&gt;@Roman: Could you please take a look at the _transformIntoOneDimensionalArray method? I wasn&apos;t sure if there&apos;s a better way to achieve this, so maybe you want to change it. (I rejected using RecursiveIterators because we&apos;re only dealing with 2 dimensional arrays here)&lt;/p&gt;</comment>
                    <comment id="12934" author="romanb" created="Thu, 13 May 2010 06:59:49 +0000"  >&lt;p&gt;Hm, I thought this would be easier, I forgot that we have to flatten the criteria, even if there is nothing to do (which is most of the time).&lt;/p&gt;

&lt;p&gt;I also think it would be more useful to expand this a bit to a more generalized concept, allowing to compose all sorts of simple criteria, including &amp;lt;, &amp;gt;, &amp;lt;=, &amp;gt;=, &amp;lt;&amp;gt;, ...&lt;/p&gt;

&lt;p&gt;Maybe we can address both issues by some new (optional) way to construct the conditions for the find*() methods, i.e. with expression objects or special arrays or whatever, so that we can also cheaply identify these criteria for sql construction, any ideas are welcome.&lt;/p&gt;

&lt;p&gt;As it is now, I don&apos;t think we should include this.&lt;/p&gt;

&lt;p&gt;ps. A side note about the test in the commit: It is silently relying on a specific order of the objects in the result but you can generally not rely on this. The order may not be the same as the order in which you invoked persist() on the objects between all the different database platforms. In general, you can only assume a guaranteed order if the SQL/DQL statement contained an explicit ORDER clause, otherwise there is no guarantee whatsoever about the order.&lt;/p&gt;</comment>
                    <comment id="13000" author="romanb" created="Wed, 19 May 2010 06:41:29 +0000"  >&lt;p&gt;Unscheduling as implementation is unclear.&lt;/p&gt;</comment>
                    <comment id="13036" author="shurakai" created="Fri, 21 May 2010 18:59:39 +0000"  >&lt;p&gt;Stopping progress until we&apos;ve discussed this issue.&lt;/p&gt;

&lt;p&gt;Roman, do you want this to be included in the final 2.0 release or should this be moved to 2.1? I totally cannot estimate the effort and whether it&apos;s worth it.&lt;/p&gt;</comment>
                    <comment id="16318" author="guilhermeblanco" created="Sun, 14 Aug 2011 00:28:20 +0000"  >&lt;p&gt;This issue is now fixed by commit &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/63a2f02f4ddea1ab9191b0e4acfd1d790d2247c7&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/63a2f02f4ddea1ab9191b0e4acfd1d790d2247c7&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-217] Result cache should cache the SQL result and not the final objects</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-217</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When fetching objects and using a result cache, it would probably be better to cache the SQL result array instead of the hydrated objects. That way, when grabbing from the cache managed entities can be returned. Also, caching is more efficient since an SQL result array does not need to be serialized/unserialized when storing in apc or memcached.&lt;/p&gt;</description>
                <environment></environment>
            <key id="10634">DDC-217</key>
            <summary>Result cache should cache the SQL result and not the final objects</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="romanb">Roman S. Borschel</reporter>
                        <labels>
                    </labels>
                <created>Sat, 19 Dec 2009 13:49:14 +0000</created>
                <updated>Mon, 19 Dec 2011 16:44:04 +0000</updated>
                    <resolved>Sun, 30 Oct 2011 13:21:18 +0000</resolved>
                            <version>2.0-ALPHA3</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>5</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="11552" author="beberlei" created="Sun, 31 Jan 2010 11:58:48 +0000"  >&lt;p&gt;It also avoids unnecessary &quot;proxy not initialized, can&apos;t serialize&quot; exceptions.&lt;/p&gt;</comment>
                    <comment id="12342" author="jwage" created="Thu, 18 Mar 2010 17:43:21 +0000"  >&lt;p&gt;If we make this change, the caching won&apos;t be &quot;as&quot; affective right since it will still have to go through the hydration process?&lt;/p&gt;</comment>
                    <comment id="12343" author="beberlei" created="Thu, 18 Mar 2010 17:48:28 +0000"  >&lt;p&gt;Correct, but its almost impossible to result cache entities because they are not allowed to have a single proxy entity at any depth of the object graph.&lt;/p&gt;

&lt;p&gt;Maybe we should introduce another notion of SqlResultCache? The ResultCache is good and effective for all Array and Scalar hydration modes, however the SQL Result caching is more useful for Object Hydration.&lt;/p&gt;</comment>
                    <comment id="12347" author="romanb" created="Thu, 18 Mar 2010 17:58:34 +0000"  >&lt;p&gt;Exactly. Yes it means hydration is always run but you really cant speak of &quot;effective&quot; when caching large object result sets because serialization &amp;amp; especially unserialization which then happens on every request will be pretty slow.&lt;/p&gt;

&lt;p&gt;As Benjamin said, result caching is perfect for anything but objects so this ticket really only affects queries that use object hydration. Storing the raw sql result for these has the advantage that the objects retrieved from the cache are not detached and thus need not be merged and also you dont have issues with uninitialized proxies preventing serialization.&lt;/p&gt;</comment>
                    <comment id="12377" author="jwage" created="Sat, 20 Mar 2010 01:47:01 +0000"  >&lt;p&gt;Is this also the cause of this issue? &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-446&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-446&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since we&apos;re unserializing some objects, does Doctrine know about them?&lt;/p&gt;</comment>
                    <comment id="12383" author="romanb" created="Sat, 20 Mar 2010 05:25:41 +0000"  >&lt;p&gt;Yes, as already said, objects coming from the result cache are currently DETACHED. Thus the EM does not care about them. This is fine if you just want to display them but if you want to modify them and persist new changes, you need to merge() the ones you want to become MANAGED again into the EM.&lt;/p&gt;</comment>
                    <comment id="12384" author="romanb" created="Sat, 20 Mar 2010 05:27:09 +0000"  >&lt;p&gt;It should also be noticed that if we make this change and the cached objects are managed after grabbing from the cache this can have a negative effect on flushing performance, if you only want the cached objects for read-only/display purposes. Maybe we should still provide both options, like Benjamin said.&lt;/p&gt;</comment>
                    <comment id="13817" author="romanb" created="Sat, 7 Aug 2010 07:00:42 +0000"  >&lt;p&gt;Moved to 2.1 for now.&lt;/p&gt;</comment>
                    <comment id="14872" author="dcousineau" created="Tue, 30 Nov 2010 15:09:53 +0000"  >&lt;p&gt;I would like to see the ability to cache pre-hydration as I have already run into this issue.&lt;/p&gt;

&lt;p&gt;Maybe the interface could be along similar syntaxes as turning on result caches&lt;/p&gt;

&lt;div class=&quot;code panel&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;useResultCache(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
      -&amp;gt;setResultCacheLifetime(3600)
      -&amp;gt;setResultCachePreHydration(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;); &lt;span class=&quot;code-comment&quot;&gt;//Result cache should work pre-hydration, &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt; caches &lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However from my examinations the hydrators will have to be rewritten to accept an array instead of a pdo statement.&lt;/p&gt;

&lt;p&gt;That would be my vote. If you don&apos;t have the resources to work on the ticket I can tackle it.&lt;/p&gt;</comment>
                    <comment id="14873" author="beberlei" created="Wed, 1 Dec 2010 03:25:29 +0000"  >&lt;p&gt;rewriting to use an array is not an option. this would require to call -&amp;gt;fetchAll() which is not wanted for the Iterate Result feature.&lt;/p&gt;

&lt;p&gt;There has to be a better way to redefine the method signatures to allow both use-cases.&lt;/p&gt;</comment>
                    <comment id="14874" author="beberlei" created="Wed, 1 Dec 2010 03:26:17 +0000"  >&lt;p&gt;Ah btw, any help is appreciated. Just Fork doctrine2 over at Github and develop this feature in a new branch (git checkout -b &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-217&quot; title=&quot;Result cache should cache the SQL result and not the final objects&quot;&gt;&lt;del&gt;DDC-217&lt;/del&gt;&lt;/a&gt;) and link it here or issue a pull request on Github.&lt;/p&gt;</comment>
                    <comment id="14880" author="dcousineau" created="Wed, 1 Dec 2010 15:55:26 +0000"  >&lt;p&gt;Forked here: &lt;a href=&quot;https://github.com/dcousineau/doctrine2&quot; class=&quot;external-link&quot;&gt;https://github.com/dcousineau/doctrine2&lt;/a&gt; though probably should pull it out into a local branch.&lt;/p&gt;

&lt;p&gt;I went ahead and went down that route of altering hydrators to accept an array as well as a statement. This way uncached queries will work with the statement as it used to, but can also hydrate from an array.&lt;/p&gt;

&lt;p&gt;As for the iterable hydrator you have a point but in this case you really can&apos;t cache it period, be it pre or post hydration (since to cache we have to serialize ALL the information).&lt;/p&gt;

&lt;p&gt;What I have up is working(ish with the caveat that I backported the changes to an earlier tagged release for our application and tested using that), take a look and see if we like or don&apos;t like how I did it.&lt;/p&gt;

&lt;p&gt;You&apos;ll notice I did split up _doExecute() for the query objects, because the DQL query object does so much analysis in the _doExecute() method which produces and attaches information (namely the result set mapping) that is depended on by the hydration process, I split it up into a &quot;doPreExecute&quot; function so that it can be called separately without actually executing the query.&lt;/p&gt;</comment>
                    <comment id="14885" author="beberlei" created="Thu, 2 Dec 2010 03:53:55 +0000"  >&lt;p&gt;Yes i know that the serialize thing won&apos;t work with the Iterator. My point was that the Iterator USES the Hydrator code and it should still support that use-case.&lt;/p&gt;

&lt;p&gt;See the IterableResult class and make sure that its still working after your refactoring.&lt;/p&gt;

&lt;p&gt;I don&apos;t like the instanceof check then iterate vs the forach over the array. I would rather find a solutio nthat works for both, but i cant find one now that doesnt involve findAll() (which is bad).&lt;/p&gt;</comment>
                    <comment id="14889" author="dcousineau" created="Thu, 2 Dec 2010 16:20:54 +0000"  >&lt;p&gt;I&apos;ll double check against the IterableResult and make sure it&apos;s compatible.&lt;/p&gt;

&lt;p&gt;Beyond that, I don&apos;t know what I could other than the instance of check. I could extend the statement object and create a statement that takes a flat array so all the code remains the same (i&apos;m passing a statement).&lt;/p&gt;</comment>
                    <comment id="15007" author="beberlei" created="Fri, 24 Dec 2010 04:50:38 +0000"  >&lt;p&gt;Assigning Guilherme&lt;/p&gt;</comment>
                    <comment id="15819" author="sobstel" created="Tue, 10 May 2011 10:50:31 +0000"  >&lt;p&gt;I&apos;ve made my own implementation for this:&lt;br/&gt;
&lt;a href=&quot;https://github.com/sobstel/doctrine2/commit/f583625f791da22dec77dd7d6c83b813f0bcbdaa&quot; class=&quot;external-link&quot;&gt;https://github.com/sobstel/doctrine2/commit/f583625f791da22dec77dd7d6c83b813f0bcbdaa&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are no changes in specific hydrators and there is no fetchAll(). I&apos;ve added 2 wrappers: one for cached result array, and one for uncached pdo statement. The former (CachedResultStatement) is actually ArrayIterator which just implements used methods (fetch &amp;amp; closeCursor =&amp;gt; also specified in ResultStatementInterface). The latter is decorator for stmt, which just collects results on each call of fetch() (results are later available by calling getResult), and apart from this all calls are delegated to actual stmt object.&lt;/p&gt;

&lt;p&gt;I&apos;ve used (copied) following changes from Daniel &lt;a href=&quot;https://github.com/dcousineau/doctrine2/commit/c23b5a902da79ffc472c0769b9258775baf3189e&quot; class=&quot;external-link&quot;&gt;https://github.com/dcousineau/doctrine2/commit/c23b5a902da79ffc472c0769b9258775baf3189e&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Btw, what is your reasoning for not using fetchAll() anywhere?&lt;/p&gt;</comment>
                    <comment id="16032" author="hypno" created="Sun, 19 Jun 2011 11:44:23 +0000"  >&lt;p&gt;maybe a dumb question but is it normal that result cache fetched entities associations are set to blank objects?&lt;/p&gt;</comment>
                    <comment id="16197" author="bogdan.albei" created="Fri, 22 Jul 2011 16:12:02 +0000"  >&lt;p&gt;I&apos;ve sent a pull request for the fix(&lt;a href=&quot;https://github.com/bogdanalbei/doctrine2/commit/00d1aa2192b86e51872fbc833b2436354f6fe162&quot; class=&quot;external-link&quot;&gt;https://github.com/bogdanalbei/doctrine2/commit/00d1aa2192b86e51872fbc833b2436354f6fe162&lt;/a&gt;) . The changes were tested under live conditions sice v2.0.&lt;/p&gt;</comment>
                    <comment id="16654" author="beberlei" created="Mon, 17 Oct 2011 23:00:24 +0000"  >&lt;p&gt;Workaround for this issue: &lt;a href=&quot;https://gist.github.com/57e6b4deea566baac053&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/57e6b4deea566baac053&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also: This will be fixed in 2.2.&lt;/p&gt;</comment>
                    <comment id="16687" author="beberlei" created="Sat, 22 Oct 2011 16:59:54 +0000"  >&lt;p&gt;First step of this hit DBAL today &lt;a href=&quot;https://github.com/doctrine/dbal/pull/69&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/69&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="16691" author="beberlei" created="Sun, 23 Oct 2011 21:37:31 +0000"  >&lt;p&gt;DBAL code was heavily refactored and merged, the ORM PR is now open for discussion:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/172&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/172&lt;/a&gt;&lt;/p&gt;
</comment>
                    <comment id="16725" author="beberlei" created="Sun, 30 Oct 2011 13:21:18 +0000"  >&lt;p&gt;Merged into master&lt;/p&gt;</comment>
                    <comment id="17049" author="beberlei" created="Mon, 19 Dec 2011 16:44:04 +0000"  >&lt;p&gt;Related Pull Request was closed: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/87&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/87&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="12832">DDC-1279</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                                <inwardlinks description="is referenced by">
                            <issuelink>
            <issuekey id="11096">DDC-446</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-209] Add the notion of read-only entities</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-209</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This may include:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;a doctrine.readOnly query hint&lt;/li&gt;
	&lt;li&gt;a @ReadOnly annotation or xml/yaml descriptor element&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Useful mainly for optimization purposes to tell doctrine to ignore such objects for any change tracking (except the initial creation/insert, of course).&lt;/p&gt;</description>
                <environment></environment>
            <key id="10612">DDC-209</key>
            <summary>Add the notion of read-only entities</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="romanb">Roman S. Borschel</reporter>
                        <labels>
                    </labels>
                <created>Mon, 14 Dec 2009 19:14:54 +0000</created>
                <updated>Sat, 15 Oct 2011 13:55:06 +0000</updated>
                    <resolved>Sat, 15 Oct 2011 13:55:06 +0000</resolved>
                            <version>2.0-ALPHA3</version>
                                <fixVersion>2.2</fixVersion>
                                        <due></due>
                    <votes>3</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="14083" author="romanb" created="Thu, 26 Aug 2010 08:05:23 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-692&quot; title=&quot;Read-only entities&quot;&gt;&lt;del&gt;DDC-692&lt;/del&gt;&lt;/a&gt; might make it into 2.0. The query hint is definitely out of scope for that release.&lt;/p&gt;</comment>
                    <comment id="15628" author="beberlei" created="Tue, 29 Mar 2011 14:32:27 +0000"  >&lt;p&gt;Implemented &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-692&quot; title=&quot;Read-only entities&quot;&gt;&lt;del&gt;DDC-692&lt;/del&gt;&lt;/a&gt; for inclusion in 2.1, however move the query hint to 2.x&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10002">
                <name>Dependency</name>
                                                <inwardlinks description="is required for">
                            <issuelink>
            <issuekey id="13030">DDC-1386</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
            <subtask id="11628">DDC-691</subtask>
            <subtask id="11629">DDC-692</subtask>
        </subtasks>
        </item>

<item>
            <title>[DDC-3] Support for CASE expressions in DQL</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-3</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;CASE expressions should be supported in DQL similarly to the definition found in 4.6.17.3 of the JPA 2.0 specification.&lt;/p&gt;

&lt;p&gt;Steps: 1) Adjust the BNF&lt;br/&gt;
2) Adjust the Parser according to the changed BNF&lt;br/&gt;
3) Adjust the SqlWalker? to produce the correct SQL&lt;/p&gt;</description>
                <environment></environment>
            <key id="10032">DDC-3</key>
            <summary>Support for CASE expressions in DQL</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="romanb">Roman S. Borschel</reporter>
                        <labels>
                    </labels>
                <created>Wed, 9 Sep 2009 18:43:27 +0000</created>
                <updated>Mon, 8 Aug 2011 05:08:05 +0000</updated>
                    <resolved>Mon, 8 Aug 2011 05:08:05 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="12690" author="romanb" created="Fri, 16 Apr 2010 11:23:05 +0000"  >&lt;p&gt;test&lt;/p&gt;</comment>
                    <comment id="13395" author="romanb" created="Mon, 21 Jun 2010 17:17:30 +0000"  >&lt;p&gt;The BNF and Parser has already been largely prepared for that.&lt;/p&gt;</comment>
                    <comment id="13927" author="guilhermeblanco" created="Thu, 12 Aug 2010 00:27:03 +0000"  >&lt;p&gt;Added all Lexer keywords to it. It was breaking some use cases.&lt;/p&gt;

&lt;p&gt;Parsing can be easily done. How far is Walker generation far from an acceptable state?&lt;/p&gt;</comment>
                    <comment id="13931" author="beberlei" created="Thu, 12 Aug 2010 02:40:55 +0000"  >&lt;p&gt;its a 2.1 change, so we can delay that for now or not? adding the keyword is a good idea though, maybe we should think about some other keywords that we potentially need in the future?&lt;/p&gt;</comment>
                    <comment id="15004" author="romanb" created="Fri, 24 Dec 2010 04:45:59 +0000"  >&lt;p&gt;I will try to finish this for 2.1.&lt;/p&gt;</comment>
                    <comment id="16293" author="guilhermeblanco" created="Mon, 8 Aug 2011 05:08:05 +0000"  >&lt;p&gt;In this commit: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/816ce41f638d28934c79a12ef27f954124b2639e&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/816ce41f638d28934c79a12ef27f954124b2639e&lt;/a&gt;&lt;br/&gt;
And documented in this commit: &lt;a href=&quot;https://github.com/doctrine/orm-documentation/commit/189c729f15d2fafecf92662cad9553c2ec3dccd7&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/orm-documentation/commit/189c729f15d2fafecf92662cad9553c2ec3dccd7&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This support was FINALLY included. =)&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10002">
                <name>Dependency</name>
                                                <inwardlinks description="is required for">
                            <issuelink>
            <issuekey id="12470">DDC-1071</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>