<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu Jun 20 09:57:41 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://doctrine-project.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+DDC+ORDER+BY+updated+DESC%2C+priority+DESC%2C+created+ASC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://doctrine-project.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Doctrine Project</title>
        <link>http://doctrine-project.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+DDC+ORDER+BY+updated+DESC%2C+priority+DESC%2C+created+ASC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="1000" total="2463"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DDC-1398] loading one item at a time when indexBy and EXTRA_LAZY fetch mode is used on a collection</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1398</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;collection-&amp;gt;get($key)&lt;/p&gt;

&lt;p&gt;Atm in 2.1.2 this is loading the entire collection. It would be really handy that it would extra lazy load only one item using the association and indexBy fields and given key value (if collection is not initialized and the key havent been loaded yet ofc)&lt;/p&gt;

&lt;p&gt;Am i making sense with this? &lt;/p&gt;</description>
                <environment></environment>
            <key id="13053">DDC-1398</key>
            <summary>loading one item at a time when indexBy and EXTRA_LAZY fetch mode is used on a collection</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="hypno">Reio Piller</reporter>
                        <labels>
                    </labels>
                <created>Thu, 29 Sep 2011 18:34:38 +0000</created>
                <updated>Thu, 20 Jun 2013 07:35:29 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>3</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="17075" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:22:20 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                    <comment id="17526" author="gcaseres" created="Mon, 5 Mar 2012 22:02:25 +0000"  >&lt;p&gt;Is there any fix for this? i have the same problem.&lt;/p&gt;</comment>
                    <comment id="17544" author="deatheriam" created="Sat, 10 Mar 2012 16:29:38 +0000"  >&lt;p&gt;It makes a perfect sense here, I wish it was possible, it would give us a room for even more optimization. Any input on the issue from the developers?&lt;/p&gt;</comment>
                    <comment id="20592" author="sandermarechal" created="Wed, 19 Jun 2013 14:20:49 +0000"  >&lt;p&gt;Any progress on this? I&apos;d love to have get() that works on EXTRA_LAZY collections.&lt;/p&gt;</comment>
                    <comment id="20595" author="ocramius" created="Wed, 19 Jun 2013 18:56:58 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=sandermarechal&quot; class=&quot;user-hover&quot; rel=&quot;sandermarechal&quot;&gt;Sander Marechal&lt;/a&gt; pull requests are welcome &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="20598" author="sandermarechal" created="Thu, 20 Jun 2013 06:17:14 +0000"  >&lt;p&gt;I&apos;m on it &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; I see the ORM is already in 2.4-RC stage. If my pull is accepted, can it still be included in 2.4 or will it have to wait until 2.5?&lt;/p&gt;</comment>
                    <comment id="20599" author="ocramius" created="Thu, 20 Jun 2013 07:30:31 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=sandermarechal&quot; class=&quot;user-hover&quot; rel=&quot;sandermarechal&quot;&gt;Sander Marechal&lt;/a&gt; no, it would need to wait for 2.5&lt;/p&gt;</comment>
                    <comment id="20600" author="sandermarechal" created="Thu, 20 Jun 2013 07:35:29 +0000"  >&lt;p&gt;Ah, too bad. Anyway: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/706&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/706&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2521] [GH-706] [DDC-1398] Extra-lazy get for indexed associations</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2521</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 sandermarechal:&lt;/p&gt;

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

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

&lt;p&gt;If an association is EXTRA_LAZY and has an indexBy, then&lt;br/&gt;
you can call get() without loading the entire collection.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15068">DDC-2521</key>
            <summary>[GH-706] [DDC-1398] Extra-lazy get for indexed associations</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Thu, 20 Jun 2013 07:33:36 +0000</created>
                <updated>Thu, 20 Jun 2013 07:33:36 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2520] [GH-705] [DDC-2519] Partial association identifier</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2520</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of FabioBatSilva:&lt;/p&gt;

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

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

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2519&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2519&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15067">DDC-2520</key>
            <summary>[GH-705] [DDC-2519] Partial association identifier</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Thu, 20 Jun 2013 04:18:07 +0000</created>
                <updated>Thu, 20 Jun 2013 04:18:07 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2519] Unable to DQL SELECT PARTIAL entity with association identifier</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2519</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Entity\Person: id, name, etc&lt;br/&gt;
Entity\User: person, admin, etc  (person is the primary and association key)&lt;/p&gt;

&lt;p&gt;Trying DQL: &lt;br/&gt;
 SELECT PARTIAL u.&lt;/p&gt;
{person,admin}
&lt;p&gt; FROM Entity\User u&lt;br/&gt;
will fail.&lt;/p&gt;</description>
                <environment>Ubuntu, OSX, PHP5.4.x</environment>
            <key id="15066">DDC-2519</key>
            <summary>Unable to DQL SELECT PARTIAL entity with association identifier</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="baohx2000">Gordon Forsythe</reporter>
                        <labels>
                    </labels>
                <created>Wed, 19 Jun 2013 23:37:45 +0000</created>
                <updated>Thu, 20 Jun 2013 04:06:35 +0000</updated>
                                    <version>2.3.4</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2518] [GH-704] added badges stable release and total downloads</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2518</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 liuggio:&lt;/p&gt;

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

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


&lt;p&gt;you can see the preview here: &lt;a href=&quot;https://github.com/liuggio/doctrine2/tree/patch-1&quot; class=&quot;external-link&quot;&gt;https://github.com/liuggio/doctrine2/tree/patch-1&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15064">DDC-2518</key>
            <summary>[GH-704] added badges stable release and total downloads</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Wed, 19 Jun 2013 14:42:45 +0000</created>
                <updated>Wed, 19 Jun 2013 18:38:49 +0000</updated>
                    <resolved>Wed, 19 Jun 2013 18:38:49 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20593" author="doctrinebot" created="Wed, 19 Jun 2013 16:02:42 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-704&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/704&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/704&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20594" author="ocramius" created="Wed, 19 Jun 2013 18:38:49 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/1382d766b09a04d504871bb50d519575ac553136&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/1382d766b09a04d504871bb50d519575ac553136&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2517] [GH-703] Clear visitedCollections</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2517</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 shulcsm:&lt;/p&gt;

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

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

&lt;p&gt;Visited collections are cleared only in commit(). Commit clears up only if it actually has something to do. Processing large amounts of records without changing them cause visitedCollections to grow without any way of clearing.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15063">DDC-2517</key>
            <summary>[GH-703] Clear visitedCollections</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Wed, 19 Jun 2013 13:35:15 +0000</created>
                <updated>Wed, 19 Jun 2013 13:35:15 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2516] Undefined offset in ObjectHydrator while working with iterableResult</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2516</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Following this documentation page &lt;a href=&quot;http://doctrine-orm.readthedocs.org/en/2.0.x/reference/batch-processing.html#iterating-large-results-for-data-processing&quot; class=&quot;external-link&quot;&gt;http://doctrine-orm.readthedocs.org/en/2.0.x/reference/batch-processing.html#iterating-large-results-for-data-processing&lt;/a&gt; I tried to create a batch process on 75k entities. But an error came in the ObjectHydrator on line 511 there&apos;s an Undefined offset. Now, i just use the SimpleObjectHydrator and it solve the problem. but i&apos;m wondering if it&apos;s a real bug or just a miss use of Doctrine.&lt;br/&gt;
Reproduce this error could be hard so ask if you want me to give you more informations about it.&lt;/p&gt;</description>
                <environment>using Symfony2</environment>
            <key id="15062">DDC-2516</key>
            <summary>Undefined offset in ObjectHydrator while working with iterableResult</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="johanny">Johanny Clerc-Renaud</reporter>
                        <labels>
                        <label>orm</label>
                    </labels>
                <created>Wed, 19 Jun 2013 12:20:16 +0000</created>
                <updated>Wed, 19 Jun 2013 12:20:16 +0000</updated>
                                    <version>2.3.4</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2515] Schema tool ignores index names in mapping file and uses generated name</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2515</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have defined an index on a foreign key colum in my .dcm.xml mapping file:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-xml&quot;&gt;
&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;indexes&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;index name=&lt;span class=&quot;code-quote&quot;&gt;&quot;ix_date_created__client_id&quot;&lt;/span&gt; columns=&lt;span class=&quot;code-quote&quot;&gt;&quot;date_created,client_id&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;index name=&lt;span class=&quot;code-quote&quot;&gt;&quot;ix_user_id&quot;&lt;/span&gt; columns=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_id&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/indexes&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However, the resulting CREATE TABLE statement includes:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-sql&quot;&gt;
    INDEX IDX_4848DD9FA76ED395 (user_id), 
    INDEX IDX_4848DD9F4239E22F (accessgroup_id), 
    INDEX IDX_4848DD9FD2112630 (usergroup_id), 
    INDEX ix_date_created__client_id (date_created, client_id), 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So Doctrine seems to be auto-generating indexes for all foreign key columns. I&apos;m assuming this is a feature, even though I&apos;d argue that there are real-life examples where the mere presence of a foreign key constraint does not justify indexing that column. &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;Anyway, the expected behavior is that Doctrine does not replace existing indexes with generated ones. I will attach a failing test case unless this bug is immediately dismissed as wontfix.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15060">DDC-2515</key>
            <summary>Schema tool ignores index names in mapping file and uses generated name</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="hussdl">Daniel Huss</reporter>
                        <labels>
                    </labels>
                <created>Tue, 18 Jun 2013 12:17:50 +0000</created>
                <updated>Tue, 18 Jun 2013 12:17:50 +0000</updated>
                                    <version>2.3.4</version>
                                                <component>ORM</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    /**
     * Deep clone of all expression objects in the SQL parts.
     *
     * @&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; void
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __clone()
    {
        foreach ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;sqlParts as $part =&amp;gt; $elements) {
            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (is_array($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;sqlParts[$part])) {
                foreach ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;sqlParts[$part] as $idx =&amp;gt; $element) {
                    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (is_object($element)) {
                        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;sqlParts[$part][$idx] = clone $element;
                    }
                }
            } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (is_object($elements)) {
                $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;sqlParts[$part] = clone $elements;
            }
        }

        $params = array();

        foreach ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;params as $param) {
            $params[] = clone $param;
        }

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;params = $params;
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14541">DDC-2313</key>
            <summary>Deep clone for DBAL QueryBuilder</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="tcm">Tim Mundt</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Feb 2013 22:33:34 +0000</created>
                <updated>Tue, 18 Jun 2013 07:10:36 +0000</updated>
                    <resolved>Tue, 18 Jun 2013 07:10:36 +0000</resolved>
                            <version>2.2</version>
                                <fixVersion>2.4</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20462" author="tcm" created="Mon, 3 Jun 2013 06:30:45 +0000"  >&lt;p&gt;Thanks for adding the code tags. Just updated my doctrine to 2.4-RC1 and did not find this in there. Would be nice to see this in the new version. Any obstacles I could be of help with?&lt;/p&gt;</comment>
                    <comment id="20463" author="ocramius" created="Mon, 3 Jun 2013 07:18:39 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=tcm&quot; class=&quot;user-hover&quot; rel=&quot;tcm&quot;&gt;Tim Mundt&lt;/a&gt;, there&apos;s an open PR at &lt;a href=&quot;https://github.com/doctrine/dbal/pull/327&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/327&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20591" author="beberlei" created="Tue, 18 Jun 2013 07:10:36 +0000"  >&lt;p&gt;Fixed in 2.4&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="15017">DBAL-537</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

&lt;p&gt;This allows anyone to override the default behavior to load Repositories.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15045">DDC-2503</key>
            <summary>[GH-695] Implemented support for RepositoryFactory.</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Fri, 14 Jun 2013 01:48:26 +0000</created>
                <updated>Tue, 18 Jun 2013 03:14:47 +0000</updated>
                    <resolved>Tue, 18 Jun 2013 03:14:47 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20572" author="doctrinebot" created="Fri, 14 Jun 2013 16:19:50 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-695&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/695&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/695&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20588" author="fabio.bat.silva" created="Tue, 18 Jun 2013 03:14:47 +0000"  >&lt;p&gt;Merged : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/7903a2b5139e51b5dd7ed5ae164f7e0f3685dea7&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/7903a2b5139e51b5dd7ed5ae164f7e0f3685dea7&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2513] [GH-702] ANSI compliant quote strategy</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2513</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of FabioBatSilva:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="15057">DDC-2513</key>
            <summary>[GH-702] ANSI compliant quote strategy</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Tue, 18 Jun 2013 02:03:12 +0000</created>
                <updated>Tue, 18 Jun 2013 02:03:12 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2512] Lifecycle callbacks</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2512</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I would like to know if the only one thing i need to save an entity in a lifecycle listener is the $unitOfWork-&amp;gt;scheduleForInsert($entity).&lt;/p&gt;

&lt;p&gt;My requirement is to save a log in every action in the DB. So i need to save the old entity and the new entity in the DB. I am making this in the preupdate listener:&lt;/p&gt;

&lt;p&gt;    $log = $this-&amp;gt;util-&amp;gt;createLog($entity-&amp;gt;serialize(),&quot;Current Object&quot;);             &lt;br/&gt;
    $unitOfWork    = $this-&amp;gt;wrapped-&amp;gt;getUnitOfWork();                &lt;br/&gt;
    $unitOfWork-&amp;gt;scheduleForInsert($log);&lt;/p&gt;

&lt;p&gt;But this log is never saved. Do i need something else to persist this new entity?.&lt;/p&gt;

&lt;p&gt;Thanks for your help.&lt;/p&gt;</description>
                <environment>windows xp</environment>
            <key id="15056">DDC-2512</key>
            <summary>Lifecycle callbacks</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="pcastrotigre">Petter Castro</reporter>
                        <labels>
                    </labels>
                <created>Mon, 17 Jun 2013 21:12:37 +0000</created>
                <updated>Mon, 17 Jun 2013 23:18:32 +0000</updated>
                    <resolved>Mon, 17 Jun 2013 23:18:32 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20586" author="ocramius" created="Mon, 17 Jun 2013 23:17:39 +0000"  >&lt;p&gt;It is not safe to schedule operations while they are happening. Please use the onFlush event instead, as described in &lt;a href=&quot;http://stackoverflow.com/questions/15092965/create-entity-on-entitiy-flush&quot; class=&quot;external-link&quot;&gt;http://stackoverflow.com/questions/15092965/create-entity-on-entitiy-flush&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copying the example for reference:&lt;/p&gt;

&lt;div class=&quot;code panel&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 YourApp\Subscriber;

use Doctrine\Common\EventSubscriber;
use Doctrine\ORM\Event\OnFlushEventArgs;
use Doctrine\ORM\Events;
use YourApp\Entity\Issue;
use YourApp\Entity\IssueLog;

class IssueUpdateSubscriber &lt;span class=&quot;code-keyword&quot;&gt;implements&lt;/span&gt; EventSubscriber
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function onFlush(OnFlushEventArgs $args)
    {
        $em  = $args-&amp;gt;getEntityManager();
        $uow = $em-&amp;gt;getUnitOfWork();

        foreach ($uow-&amp;gt;getScheduledEntityUpdates() as $updated) {
            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($updated &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; Issue) {
                $em-&amp;gt;persist(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; IssueLog($updated));
            }
        }

        $uow-&amp;gt;computeChangeSets();
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getSubscribedEvents()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; array(Events::onFlush);
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="20587" author="ocramius" created="Mon, 17 Jun 2013 23:18:32 +0000"  >&lt;p&gt;Not an issue - unsafe usage of the `preUpdate` event&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2496] Unexpected behaviour flushing single entity</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2496</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The following works as expected:&lt;br/&gt;
$existingElement = $repository-&amp;gt;find(1);&lt;br/&gt;
$existingElement-&amp;gt;setSomething(&apos;foo&apos;);&lt;br/&gt;
$newElement = new Element(&apos;bar&apos;);&lt;br/&gt;
$em-&amp;gt;persist($newElement);&lt;br/&gt;
$em-&amp;gt;flush($newElement);&lt;br/&gt;
// The new element is added and the existing is not modified&lt;/p&gt;

&lt;p&gt;The following does not:&lt;br/&gt;
$existingElement = $repository-&amp;gt;find(1);&lt;br/&gt;
$em-&amp;gt;remove(existingElement);&lt;br/&gt;
$newElement = new Element(&apos;bar&apos;);&lt;br/&gt;
$em-&amp;gt;persist($newElement);&lt;br/&gt;
$em-&amp;gt;flush($newElement);&lt;br/&gt;
// The new element is added and the existing is deleted (i didnt flush THAT element)&lt;/p&gt;

&lt;p&gt;The following does not:&lt;br/&gt;
$newElement2 = new Element(&apos;foo&apos;);&lt;br/&gt;
$em-&amp;gt;persist($newElement2);&lt;br/&gt;
$newElement = new Element(&apos;bar&apos;);&lt;br/&gt;
$em-&amp;gt;persist($newElement);&lt;br/&gt;
$em-&amp;gt;flush($newElement);&lt;br/&gt;
// Both elements are persisted, even if I only flushed $newElement&lt;/p&gt;</description>
                <environment></environment>
            <key id="15033">DDC-2496</key>
            <summary>Unexpected behaviour flushing single entity</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="hrajchert">Hernan Rajchert</reporter>
                        <labels>
                        <label>orm</label>
                        <label>unitofwork</label>
                    </labels>
                <created>Mon, 10 Jun 2013 21:37:39 +0000</created>
                <updated>Mon, 17 Jun 2013 18:03:51 +0000</updated>
                    <resolved>Wed, 12 Jun 2013 18:07:31 +0000</resolved>
                            <version>2.3.4</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20551" author="hrajchert" created="Wed, 12 Jun 2013 18:04:03 +0000"  >&lt;p&gt;By the way, I noticed in the code that this seems to be &quot;expected behaviour&quot;, but it doesn&apos;t make too much sense, as the idea is to not disturb the original unit of work.&lt;/p&gt;

&lt;p&gt;The problem arises when I call some findOrCreate methods that I&apos;ve done. The idea is that those entities should be there, but not always are, and they usually occur on the middle of some other processing, so if I have some new elements before calling the findOrCreate I dont want them to be inserted until I flush them in particular.&lt;/p&gt;

&lt;p&gt;Right now Im creating a new EntityManager (which involves a new connection), doing the insert there and then merging into the other EntityManager, but the merge is very error prone to the order you merge stuff.&lt;/p&gt;</comment>
                    <comment id="20552" author="ocramius" created="Wed, 12 Jun 2013 18:07:22 +0000"  >&lt;p&gt;Flushing with a given parameter is only about optimizing changeset computation - it is not meant to flush only the new element.&lt;/p&gt;</comment>
                    <comment id="20584" author="hrajchert" created="Mon, 17 Jun 2013 16:33:32 +0000"  >&lt;p&gt;So how would you recommend to resolve the findOrCreate issues?&lt;/p&gt;</comment>
                    <comment id="20585" author="ocramius" created="Mon, 17 Jun 2013 18:03:51 +0000"  >&lt;p&gt;You would have to flush afterwards.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2511] [GH-701] list_bugs.php needs to call to getters for protected vars</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2511</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 rbroen:&lt;/p&gt;

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

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

&lt;p&gt;list_bugs.php needs to call to getters for protected vars. This was changed in the &quot;getting-started&quot; code repository, but not in the &quot;getting-started&quot; tutorial.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15054">DDC-2511</key>
            <summary>[GH-701] list_bugs.php needs to call to getters for protected vars</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Mon, 17 Jun 2013 09:36:34 +0000</created>
                <updated>Mon, 17 Jun 2013 09:41:44 +0000</updated>
                    <resolved>Mon, 17 Jun 2013 09:41:44 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20582" author="doctrinebot" created="Mon, 17 Jun 2013 09:41:36 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-701&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/701&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/701&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20583" author="ocramius" created="Mon, 17 Jun 2013 09:41:44 +0000"  >&lt;p&gt;Merged at &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/a39ceb3159d9716b528c422099c853224a1bc863&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/a39ceb3159d9716b528c422099c853224a1bc863&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

&lt;p&gt;I would like to know if it&apos;s possible to add a CLI check too, something like:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($cacheDriver &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; Cache\ApcCache &amp;amp;&amp;amp; PHP_SAPI === &apos;cli&apos; )&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

<item>
            <title>[DDC-2510] [GH-700] Update getting-started.rst</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2510</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 rbroen:&lt;/p&gt;

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

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

&lt;p&gt;The tutorial assumes Doctrine 2.4&lt;/p&gt;</description>
                <environment></environment>
            <key id="15053">DDC-2510</key>
            <summary>[GH-700] Update getting-started.rst</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Mon, 17 Jun 2013 08:32:11 +0000</created>
                <updated>Mon, 17 Jun 2013 08:40:10 +0000</updated>
                    <resolved>Mon, 17 Jun 2013 08:40:10 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20579" author="doctrinebot" created="Mon, 17 Jun 2013 08:39:51 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-700&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/700&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/700&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20580" author="ocramius" created="Mon, 17 Jun 2013 08:40:10 +0000"  >&lt;p&gt;Merged at &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/1a958f70fdb2aa67d41c76c0f0bde7fb393ed4ab&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/1a958f70fdb2aa67d41c76c0f0bde7fb393ed4ab&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2508] [GH-699] commented a change that was ahead of stable; added calls to getters</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2508</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 rbroen:&lt;/p&gt;

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

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

&lt;p&gt;CreateHelperSet appears to be a method in 2.4, which is not stable yet and does not correspond with this 2.3 tutorial.&lt;br/&gt;
list_bugs.php was trying to get protected vars.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15051">DDC-2508</key>
            <summary>[GH-699] commented a change that was ahead of stable; added calls to getters</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Sat, 15 Jun 2013 20:27:50 +0000</created>
                <updated>Sun, 16 Jun 2013 17:51:51 +0000</updated>
                    <resolved>Sun, 16 Jun 2013 17:51:51 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20578" author="doctrinebot" created="Sun, 16 Jun 2013 17:50:00 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-699&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/699&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/699&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2506] WITH Conditionals on Class Table Inheritance LEFT JOINs are inserted incorrectly</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2506</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The following JOIN&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
JOIN c.ctiRelationship cti WITH cti.id IN (42)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;generates unexpected 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;
LEFT JOIN class_base p1_ ON u1_.cti_id = p1_.id 
LEFT JOIN class_child1 p2_ ON p1_.id = p2_.id
LEFT JOIN class_child2 p3_ ON p1_.id = p3_.id AND (p1_.id IN (42)) 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;when it SHOULD be generating&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
LEFT JOIN class_base p1_ ON u1_.cti_id = p1_.id AND (p1_.id IN (42)) 
LEFT JOIN class_child1 p2_ ON p1_.id = p2_.id
LEFT JOIN class_child2 p3_ ON p1_.id = p3_.id
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="15049">DDC-2506</key>
            <summary>WITH Conditionals on Class Table Inheritance LEFT JOINs are inserted incorrectly</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="mattjanssen">Matt Janssen</reporter>
                        <labels>
                        <label>dql</label>
                        <label>inheritance</label>
                        <label>joins</label>
                        <label>sql-walker</label>
                    </labels>
                <created>Fri, 14 Jun 2013 16:32:37 +0000</created>
                <updated>Fri, 14 Jun 2013 16:46:34 +0000</updated>
                                    <version>Git Master</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20573" author="mattjanssen" created="Fri, 14 Jun 2013 16:46:34 +0000"  >&lt;p&gt;Pull: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/698&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/698&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2507] [GH-698] Fix for [DDC-2506] CTI JOINs and WITH conditionals</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2507</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 mattjanssen:&lt;/p&gt;

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

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

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2506&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2506&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Moved the `SqlWalker::walkConditionalExpression()` out of `walkJoin()` and into `walkJoinAssociationDeclaration()` after the base class JOIN but *&lt;b&gt;before&lt;/b&gt;* the `_generateClassTableInheritanceJoins()`, thus allowing WITH conditions in Class Table Inheritance joins to apply correctly.&lt;/p&gt;

&lt;p&gt;On a side note, I&apos;m not able to get phpunit to run (even on a clean Master) so I&apos;m leaving the testing up to Travis.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15050">DDC-2507</key>
            <summary>[GH-698] Fix for [DDC-2506] CTI JOINs and WITH conditionals</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Fri, 14 Jun 2013 16:34:33 +0000</created>
                <updated>Fri, 14 Jun 2013 16:34:33 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2505] [GH-697] Fix phpDoc syntax in ClassMetadataInfo.php</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2505</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of michaelperrin:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="15047">DDC-2505</key>
            <summary>[GH-697] Fix phpDoc syntax in ClassMetadataInfo.php</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Fri, 14 Jun 2013 08:00:51 +0000</created>
                <updated>Fri, 14 Jun 2013 13:57:21 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20571" author="doctrinebot" created="Fri, 14 Jun 2013 13:57:21 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-697&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/697&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/697&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2504] [GH-696] extra lazy joined test</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2504</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Padam87:&lt;/p&gt;

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

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

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

&lt;p&gt;This is just a bug report, not an actual PR, you don&apos;t have to merge.&lt;/p&gt;

&lt;p&gt;When you have a JOINED inheritance, and you have another class, which is related to the parent class of the inheritance, and you only have an association for one of the child classes, EXTRA_LAZY fetch mode creates a fatal error, because it is not joining the parent table to the count query.&lt;/p&gt;

&lt;p&gt;There are many ways around this fortunately, but I thought I should report it anyway.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15046">DDC-2504</key>
            <summary>[GH-696] extra lazy joined test</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Fri, 14 Jun 2013 07:49:08 +0000</created>
                <updated>Fri, 14 Jun 2013 07:49:08 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2502] [GH-694] [DDC-2478] Support null association comparison</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2502</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of FabioBatSilva:&lt;/p&gt;

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

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

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2478&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2478&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15044">DDC-2502</key>
            <summary>[GH-694] [DDC-2478] Support null association comparison</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 Jun 2013 20:53:55 +0000</created>
                <updated>Fri, 14 Jun 2013 04:27:46 +0000</updated>
                    <resolved>Fri, 14 Jun 2013 04:27:46 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20568" author="doctrinebot" created="Fri, 14 Jun 2013 03:12:55 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-694&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/694&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/694&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20570" author="fabio.bat.silva" created="Fri, 14 Jun 2013 04:27:46 +0000"  >&lt;p&gt;Merged : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/f2f1d8986c288a437b81cd756d889aa47880d8b8&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/f2f1d8986c288a437b81cd756d889aa47880d8b8&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2478] PersisterException when matching Criteria expression isNull to ArrayCollection</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2478</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;
    /**
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;ClubBoardPost&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;children&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; ClubBoardPost
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $parent;

$criteria = Criteria::create()-&amp;gt;where(Criteria::expr()-&amp;gt;isNull(&apos;parent&apos;));
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;boardPosts-&amp;gt;matching($criteria);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;output&amp;#93;&lt;/span&gt;&lt;br/&gt;
Cannot match on Fubles\CoreBundle\Entity\ClubBoardPost::parent with a non-object value. Matching objects by id is not compatible with matching on an in-memory collection, which compares objects by reference.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;first analysis&amp;#93;&lt;/span&gt;&lt;br/&gt;
@SqlExpressionVisitor:69 It seems like this check pretends that the value must be an object, maybe do you need to exclude NULL values only if association is nullable?&lt;/p&gt;</description>
                <environment></environment>
            <key id="15003">DDC-2478</key>
            <summary>PersisterException when matching Criteria expression isNull to ArrayCollection</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="twistedlogic">Antonio Trapani</reporter>
                        <labels>
                    </labels>
                <created>Thu, 30 May 2013 13:24:31 +0000</created>
                <updated>Fri, 14 Jun 2013 04:26:40 +0000</updated>
                    <resolved>Fri, 14 Jun 2013 04:26:40 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20569" author="fabio.bat.silva" created="Fri, 14 Jun 2013 04:26:40 +0000"  >&lt;p&gt;Fixed : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/f2f1d8986c288a437b81cd756d889aa47880d8b8&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/f2f1d8986c288a437b81cd756d889aa47880d8b8&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2480] Filter stops working after upgrade to Symfony 2.3rc1</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2480</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In our project we have two associated entities &quot;portal&quot; and &quot;object_data&quot;. To get all object_data of an object that belong to a portal, we use filtering code like this since symfony 2.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;
        $object_data = $object-&amp;gt;getObjectData()-&amp;gt;filter(
            function ($current_object_data) use ($portal) {
                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $current_object_data-&amp;gt;getPortal() === $portal;
            }
        )-&amp;gt;first();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Up to now, this worked just fine. When upgrading from Symfony 2.2 to 2.3rc1, this code stopped working, the comparison will always be false. I also received a PHP error message in another place about the portal entity not being convertible to a string:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
PHP Catchable fatal error:  &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt; of class ...\\Entity\\Portal 
could not be converted to string in /.../vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php on line 1211
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I assume these problems are related. Since the code worked just fine from Symfony 2.0 to 2.2, I assume that this might be a regression. Could you kindly take a look at this and perhaps let me know if I did anything wrong?&lt;/p&gt;

&lt;p&gt;We use direct entity comparisons in many places in our code, rather than comparing the ids of the entities directly, and so far it worked just fine.&lt;/p&gt;

&lt;p&gt;Thanks a lot!&lt;/p&gt;</description>
                <environment>Mac OS, Symfony 2.3rc1</environment>
            <key id="15006">DDC-2480</key>
            <summary>Filter stops working after upgrade to Symfony 2.3rc1</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="mgruner">Martin Gruner</reporter>
                        <labels>
                        <label>orm</label>
                        <label>regression</label>
                    </labels>
                <created>Sat, 1 Jun 2013 12:12:35 +0000</created>
                <updated>Thu, 13 Jun 2013 15:30:32 +0000</updated>
                    <resolved>Thu, 13 Jun 2013 15:30:32 +0000</resolved>
                            <version>2.3.4</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20464" author="ocramius" created="Mon, 3 Jun 2013 08:26:30 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=mgruner&quot; class=&quot;user-hover&quot; rel=&quot;mgruner&quot;&gt;Martin Gruner&lt;/a&gt; the issue is incomplete - can you provide a failing example or even better a test case?&lt;/p&gt;</comment>
                    <comment id="20566" author="mgruner" created="Thu, 13 Jun 2013 15:30:32 +0000"  >&lt;p&gt;Sorry for the delay. This issue was caused by a bug about aliased services in symfony 2.3.0 and is fixed in 2.3.1. We likely had more than one instance of the entity manager present leading to the wrong behaviour.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2484] Lazy loaded associated entities do not trigger the postLoad event</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2484</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;An entity retrieved with $entity = $em-&amp;gt;find will correctly trigger the postLoad event but an entity associated with that entity $association = $entity-&amp;gt;association which is lazy loaded will retrieve and return the associated entity without triggering postLoad.  Eager loading does follow the lifecycle path of triggering postLoad.&lt;/p&gt;

&lt;p&gt;Functional Test:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/685&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/685&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15012">DDC-2484</key>
            <summary>Lazy loaded associated entities do not trigger the postLoad event</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="10000" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="tom_anderson">Tom Anderson</reporter>
                        <labels>
                        <label>event</label>
                        <label>orm</label>
                    </labels>
                <created>Mon, 3 Jun 2013 22:13:52 +0000</created>
                <updated>Thu, 13 Jun 2013 13:55:17 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20520" author="fabio.bat.silva" created="Mon, 10 Jun 2013 18:29:59 +0000"  >&lt;p&gt;Hi Tom,&lt;/p&gt;

&lt;p&gt;You CANNOT check the entity class by using get_class, doctrine uses the &lt;a href=&quot;http://en.wikipedia.org/wiki/Proxy_pattern&quot; class=&quot;external-link&quot;&gt;pattern proxy&lt;/a&gt; to delay the load from database.&lt;/p&gt;

&lt;p&gt;Then &lt;b&gt;$args-&amp;gt;getEntity()&lt;/b&gt; might be a different class that extends your entity&lt;br/&gt;
In this case you should always check using instanceof :&lt;/p&gt;

&lt;div class=&quot;code panel&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 = $args-&amp;gt;getEntity();

&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($entity &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; DDC2484_Car) {
    $entity-&amp;gt;setBrand(&apos;BMW&apos;);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Also when you try to load the same entity more than once :&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$eagerDriver-&amp;gt;getCar();
$lazyDriver-&amp;gt;getCar();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The entity will be cached at the first time, triggering onLoad just once.&lt;/p&gt;

&lt;p&gt;It means that the entity will be always the same instance, &lt;br/&gt;
it&apos;s not loaded from database untill you clean up the entity manager.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;assertSame($eagerDriver-&amp;gt;getCar(), $lazyDriver-&amp;gt;getCar());&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2492] [GH-688] Implement QuoteStrategy on SqlWalker walkRangeVariableDeclaration</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2492</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 johnbrown:&lt;/p&gt;

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

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

&lt;p&gt;Based on:&lt;br/&gt;
&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1845&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1845&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/cb72219b118c158c9b5344c4b81ff2b1a9149ab0&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/cb72219b118c158c9b5344c4b81ff2b1a9149ab0&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15026">DDC-2492</key>
            <summary>[GH-688] Implement QuoteStrategy on SqlWalker walkRangeVariableDeclaration</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Thu, 6 Jun 2013 22:13:32 +0000</created>
                <updated>Wed, 12 Jun 2013 19:05:56 +0000</updated>
                    <resolved>Wed, 12 Jun 2013 19:05:56 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20561" author="doctrinebot" created="Wed, 12 Jun 2013 19:03:30 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-688&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/688&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/688&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20563" author="ocramius" created="Wed, 12 Jun 2013 19:05:56 +0000"  >&lt;p&gt;Merged at &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/6ef48561baa6cd6e3da1304d7d815883be9a9af1&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/6ef48561baa6cd6e3da1304d7d815883be9a9af1&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2494] Proxy getId not invoke convertToPHPValue on custom type</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2494</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have a custom type tinyint:&lt;br/&gt;
&lt;a href=&quot;https://gist.github.com/entering/3503d7458e5fbe2f6e02&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/entering/3503d7458e5fbe2f6e02&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I was using it a lot and when I updated to doctrine 2.4 beta it break some stuff. At the time i turn all on smallint and solve the problem, now I had time to look into it. &lt;/p&gt;

&lt;p&gt;Example, entity Currency:&lt;/p&gt;

&lt;div class=&quot;code panel&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;var&lt;/span&gt; integer
     *
     * @ORM\Column(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;tinyint&quot;&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;, options={&lt;span class=&quot;code-quote&quot;&gt;&quot;unsigned&quot;&lt;/span&gt;: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;})
     * @ORM\Id
     * @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(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;temp&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;tinyint&quot;&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $temp;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Entity Campaign:&lt;/p&gt;
&lt;div class=&quot;code panel&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;var&lt;/span&gt; Currency
     *
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Currency&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;campaigns&quot;&lt;/span&gt;)
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;currency_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     * })
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $currency;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When i have this piece of code:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
var_dump($campaign-&amp;gt;getCurrency()-&amp;gt;getId());
var_dump($campaign-&amp;gt;getCurrency()-&amp;gt;getTemp());
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I get:&lt;br/&gt;
string(1) &quot;1&quot;&lt;br/&gt;
int(5)&lt;/p&gt;

&lt;p&gt;If I turn id into small int:&lt;br/&gt;
int(1)&lt;br/&gt;
int(5)&lt;/p&gt;

&lt;p&gt;If I switch the order to:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
var_dump($campaign-&amp;gt;getCurrency()-&amp;gt;getTemp());
var_dump($campaign-&amp;gt;getCurrency()-&amp;gt;getId());
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As expected:&lt;br/&gt;
int(5)&lt;br/&gt;
int(1)&lt;/p&gt;

&lt;p&gt;If I place a var_dump on convertToPHPValue I can see that is not being called on getId when getId is lazy.&lt;/p&gt;

&lt;p&gt;This looks like a bug introduced when getId started being lazy to save queries.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15028">DDC-2494</key>
            <summary>Proxy getId not invoke convertToPHPValue on custom type</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://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="entering">Eduardo Oliveira</reporter>
                        <labels>
                    </labels>
                <created>Sat, 8 Jun 2013 23:57:51 +0000</created>
                <updated>Wed, 12 Jun 2013 19:04:41 +0000</updated>
                    <resolved>Wed, 12 Jun 2013 19:04:41 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="20515" author="fabio.bat.silva" created="Mon, 10 Jun 2013 17:07:39 +0000"  >&lt;p&gt;Before &lt;a href=&quot;http://doctrine-project.org/jira/browse/DCOM-96&quot; title=&quot;Extract a common ProxyFactory&quot;&gt;&lt;del&gt;DCOM-96&lt;/del&gt;&lt;/a&gt; we ignore custom type fields while looking for &lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/2.3/lib/Doctrine/ORM/Proxy/ProxyFactory.php#L293&quot; class=&quot;external-link&quot;&gt;identifier getters&lt;/a&gt;. &lt;br/&gt;
It mean that, when an identifier getter is called the entity will be loaded from database, even though the identifier value is already known.&lt;br/&gt;
Then the Type#convertToPHPValue will be invoked.. &lt;/p&gt;

&lt;p&gt;After we move the proxy generation to &lt;a href=&quot;https://github.com/doctrine/common/blob/master/lib/Doctrine/Common/Proxy/ProxyGenerator.php#L847&quot; class=&quot;external-link&quot;&gt;common&lt;/a&gt; custom types are ignored and the database load its no longer triggered.&lt;/p&gt;</comment>
                    <comment id="20522" author="entering" created="Mon, 10 Jun 2013 19:14:01 +0000"  >&lt;p&gt;I understand the problem, because I was aware that getId() now doesn&apos;t load entity from DB, what is great in performance, I was expecting this for a while.&lt;/p&gt;

&lt;p&gt;For me is really bad I cannot have ID&apos;s as tinyint (custom type), i suppose Doctrine doesn&apos;t support tinyint because is not present in all DB&apos;s, but some DB&apos;s like MySQL support it, I agree that Doctrine doesn&apos;t need to support all types out the box, but custom types should work exactly like native types, shouldn&apos;t be second class citizens.&lt;/p&gt;

&lt;p&gt;If this is a limitation that is difficult to overpass and there are no plans to &quot;fix&quot; it, should be listed here: &lt;a href=&quot;http://docs.doctrine-project.org/en/latest/reference/limitations-and-known-issues.html&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/en/latest/reference/limitations-and-known-issues.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And should be listed as BC in here: &lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/UPGRADE.md&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/UPGRADE.md&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If there are plans to fix this problem and is just a case of someone put hands on the code I can give it a shot even I&apos;m not completely familiar with Doctrine code.&lt;/p&gt;</comment>
                    <comment id="20523" author="ocramius" created="Mon, 10 Jun 2013 19:23:02 +0000"  >&lt;p&gt;I don&apos;t think the bug is related with lazy loading. Identifiers are never hydrated into proxies anyway.&lt;/p&gt;

&lt;p&gt;What the problem here seems to be is that the type conversion is not applied to meta columns.&lt;/p&gt;

&lt;p&gt;You can check and see if there&apos;s code about type conversion in meta columns.&lt;/p&gt;</comment>
                    <comment id="20524" author="entering" created="Mon, 10 Jun 2013 20:34:37 +0000"  >&lt;p&gt;&quot;What the problem here seems to be is that the type conversion is not applied to meta columns.&quot;&lt;/p&gt;

&lt;p&gt;Marco I&apos;m not sure If I follow you.&lt;/p&gt;

&lt;p&gt;So when ID of entity Currency is a smallint a var_dump($campaign-&amp;gt;getCurrency()) give this: &lt;a href=&quot;https://gist.github.com/entering/5751908&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/entering/5751908&lt;/a&gt;&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
  &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id =&amp;gt;
  string(1) &lt;span class=&quot;code-quote&quot;&gt;&quot;1&quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Is a string, the cast is done on getId()&lt;/p&gt;

&lt;p&gt;Looking at the proxy created:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    /**
     * {@inheritDoc}
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getId()
    {
       	&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-object&quot;&gt;int&lt;/span&gt;)  parent::getId();
        }

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;__initializer__ &amp;amp;&amp;amp; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;__initializer__-&amp;gt;__invoke($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;, &apos;getId&apos;, array());

        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; parent::getId();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The cast is written here: &lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/2.3/lib/Doctrine/ORM/Proxy/ProxyFactory.php#L259&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/2.3/lib/Doctrine/ORM/Proxy/ProxyFactory.php#L259&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just to be sure I placed a var_dump inside convertToPHPValue of SmallIntType and on getId() is not called, but if I force the load of entity from DB (code below) converToPHPValue is called.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
var_dump($campaign-&amp;gt;getCurrency()-&amp;gt;getCode());
var_dump($campaign-&amp;gt;getCurrency()-&amp;gt;getId());
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So the problem here is that convertToPHPValue is never called on getId() on proxy when entity is not initialized, the problem is masked with the cast &quot;written on hand&quot; inside the getId().&lt;/p&gt;

&lt;p&gt;The way I see it the getId() on proxy should all the time call convertToPHPValue, that way it would be correct with all types (native and custom).&lt;/p&gt;

&lt;p&gt;The proxy with tinyint:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    /**
     * {@inheritDoc}
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getId()
    {
        &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;  parent::getId();
        }


        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;__initializer__ &amp;amp;&amp;amp; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;__initializer__-&amp;gt;__invoke($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;, &apos;getId&apos;, array());

        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; parent::getId();
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Before custom tinyint was working on Identifiers because getId() would need to load entity from DB, the entity would be hydrate and the convertToPHPValue called at that time, now getId() doesn&apos;t load entity from DB so is never called.&lt;/p&gt;

&lt;p&gt;To me a cast (int) on proxy that is decided according the name type is a ugly hack, inside if ($this-&amp;gt;_&lt;em&gt;isInitialized&lt;/em&gt;_ === false) it should call all the time convertToPHPValue.&lt;/p&gt;</comment>
                    <comment id="20538" author="fabio.bat.silva" created="Tue, 11 Jun 2013 18:01:41 +0000"  >&lt;p&gt;A possible solution : &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/690&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/690&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20562" author="fabio.bat.silva" created="Wed, 12 Jun 2013 19:04:41 +0000"  >&lt;p&gt;Fixed : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/6937061b23ec4de63081efac800415e09dcbcb4f&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/6937061b23ec4de63081efac800415e09dcbcb4f&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-2501] [GH-693] Adding failing test for DDC-2214</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2501</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Ocramius:&lt;/p&gt;

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

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

&lt;p&gt;Parameters being bound to an SQL query should have the same type as&lt;br/&gt;
the identifier of the objects being bound to the placeholders of a&lt;br/&gt;
DQL query - this is currently broken with proxies, as this test&lt;br/&gt;
demonstrates.&lt;/p&gt;

&lt;p&gt;This is a demonstration of &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-2214&quot; title=&quot;extra single quotation in sql when using EntityRepository::findBy&quot;&gt;&lt;del&gt;DDC-2214&lt;/del&gt;&lt;/a&gt;(&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2214&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2214&lt;/a&gt;)&lt;/p&gt;</description>
                <environment></environment>
            <key id="15042">DDC-2501</key>
            <summary>[GH-693] Adding failing test for DDC-2214</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Wed, 12 Jun 2013 17:55:26 +0000</created>
                <updated>Wed, 12 Jun 2013 19:00:41 +0000</updated>
                    <resolved>Wed, 12 Jun 2013 18:00:41 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20550" author="ocramius" created="Wed, 12 Jun 2013 18:00:41 +0000"  >&lt;p&gt;Duplicate of &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-2214&quot; title=&quot;extra single quotation in sql when using EntityRepository::findBy&quot;&gt;&lt;del&gt;DDC-2214&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20559" author="doctrinebot" created="Wed, 12 Jun 2013 19:00:41 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-693&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/693&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/693&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2498] [GH-690] [DDC-2494] Apply type conversion to meta columns</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2498</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of FabioBatSilva:&lt;/p&gt;

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

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

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2494&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2494&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15037">DDC-2498</key>
            <summary>[GH-690] [DDC-2494] Apply type conversion to meta columns</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Tue, 11 Jun 2013 17:59:46 +0000</created>
                <updated>Wed, 12 Jun 2013 18:59:07 +0000</updated>
                    <resolved>Wed, 12 Jun 2013 18:59:07 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20557" author="doctrinebot" created="Wed, 12 Jun 2013 18:47:39 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-690&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/690&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/690&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20558" author="ocramius" created="Wed, 12 Jun 2013 18:59:07 +0000"  >&lt;p&gt;Merged at &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/6937061b23ec4de63081efac800415e09dcbcb4f&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/6937061b23ec4de63081efac800415e09dcbcb4f&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2500] [GH-692] Query\Parser: support for functions in ORDER BY clause</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2500</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 Slamdunk:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="15040">DDC-2500</key>
            <summary>[GH-692] Query\Parser: support for functions in ORDER BY clause</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Wed, 12 Jun 2013 12:31:09 +0000</created>
                <updated>Wed, 12 Jun 2013 13:13:12 +0000</updated>
                    <resolved>Wed, 12 Jun 2013 13:13:12 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20547" author="doctrinebot" created="Wed, 12 Jun 2013 13:08:13 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-692&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/692&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/692&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20548" author="ocramius" created="Wed, 12 Jun 2013 13:13:12 +0000"  >&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;ORDER BY SOME_FUNC()&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt; is not portable across all vendors&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

<item>
            <title>[DDC-2499] [GH-691] IDENTITY function fix for Joined Inheritance</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2499</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 51systems:&lt;/p&gt;

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

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

&lt;p&gt;In a joined inheritance scenario, the identity function implementation assumed the foreign key column was on the table corresponding to the (sub)class named in the select statement. If the relation was on a super-class incorrect sql was generated.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15038">DDC-2499</key>
            <summary>[GH-691] IDENTITY function fix for Joined Inheritance</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Wed, 12 Jun 2013 00:15:11 +0000</created>
                <updated>Wed, 12 Jun 2013 08:03:17 +0000</updated>
                    <resolved>Wed, 12 Jun 2013 08:03:17 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20539" author="doctrinebot" created="Wed, 12 Jun 2013 04:04:36 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-691&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/691&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/691&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20545" author="ocramius" created="Wed, 12 Jun 2013 08:03:17 +0000"  >&lt;p&gt;Merged at &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/0248f743babbd9b8861ff744a25f006ce2b83f9d&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/0248f743babbd9b8861ff744a25f006ce2b83f9d&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2476] [GH-680] [wip] better reverse engineers the mapping metadata from a database</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2476</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 bronze1man:&lt;/p&gt;

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

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

&lt;ol&gt;
	&lt;li&gt;The problem:&lt;br/&gt;
1.use symfony2 doctrine:mapping:import from msyql database to annotation&lt;br/&gt;
2.use symfony2 doctrine:schema:update will see a lot of sql update about just import database schema.&lt;br/&gt;
3.this PR fix eliminate some of those sql update...&lt;/li&gt;
&lt;/ol&gt;


&lt;ol&gt;
	&lt;li&gt;has fixed problem:&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
	&lt;li&gt;column default&lt;/li&gt;
	&lt;li&gt;column unsigned (add test)&lt;/li&gt;
	&lt;li&gt;column comment&lt;/li&gt;
	&lt;li&gt;column type decimal with precision and scale&lt;/li&gt;
	&lt;li&gt;table with simple index&lt;/li&gt;
	&lt;li&gt;table with unique index&lt;/li&gt;
&lt;/ul&gt;

</description>
                <environment></environment>
            <key id="15000">DDC-2476</key>
            <summary>[GH-680] [wip] better reverse engineers the mapping metadata from a database</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Wed, 29 May 2013 02:51:45 +0000</created>
                <updated>Wed, 12 Jun 2013 05:56:36 +0000</updated>
                    <resolved>Wed, 12 Jun 2013 05:56:36 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20542" author="doctrinebot" created="Wed, 12 Jun 2013 05:56:27 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-680&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/680&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/680&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20543" author="guilhermeblanco" created="Wed, 12 Jun 2013 05:56:27 +0000"  >&lt;p&gt;Fixed: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/3d86c82a7fb51875d1b6c66b865134c9ccf1a878&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/3d86c82a7fb51875d1b6c66b865134c9ccf1a878&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20544" author="guilhermeblanco" created="Wed, 12 Jun 2013 05:56:36 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/3d86c82a7fb51875d1b6c66b865134c9ccf1a878&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/3d86c82a7fb51875d1b6c66b865134c9ccf1a878&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2433] [GH-659] [wip] Pr mapping import</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2433</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 bronze1man:&lt;/p&gt;

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

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

&lt;p&gt;fix 5 bug of command 1.doctrine:mapping:import then 2.doctrine:schema:update&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;column default&lt;/li&gt;
	&lt;li&gt;column unsigned&lt;/li&gt;
	&lt;li&gt;column type char&lt;/li&gt;
	&lt;li&gt;table without auto_increment&lt;/li&gt;
	&lt;li&gt;column comment&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;wip -&amp;gt; follow rule of contribute to doctrine&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;add patch on master&lt;/li&gt;
	&lt;li&gt;add test&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
            <key id="14837">DDC-2433</key>
            <summary>[GH-659] [wip] Pr mapping import</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Tue, 7 May 2013 13:40:30 +0000</created>
                <updated>Wed, 12 Jun 2013 04:32:20 +0000</updated>
                    <resolved>Thu, 9 May 2013 11:47:47 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20239" author="beberlei" created="Thu, 9 May 2013 11:47:47 +0000"  >&lt;p&gt;Pull Request was deleted.&lt;/p&gt;</comment>
                    <comment id="20541" author="doctrinebot" created="Wed, 12 Jun 2013 04:32:20 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-659&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/659&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/659&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2489] Missing semicolon in schema update tool, using dump-sql argument</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2489</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When executing the schema-tool update script, using the --dump-sql argument (e.g.  &quot;app/console  doctrine:schema:update --dump-sql&quot; in a symfony2 project), the semicolon behind the last query is missing.&lt;/p&gt;
</description>
                <environment></environment>
            <key id="15020">DDC-2489</key>
            <summary>Missing semicolon in schema update tool, using dump-sql argument</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="6" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="rj_bijl">Robert-Jan</reporter>
                        <labels>
                        <label>Cli</label>
                        <label>schematool</label>
                    </labels>
                <created>Wed, 5 Jun 2013 13:37:14 +0000</created>
                <updated>Wed, 12 Jun 2013 04:26:25 +0000</updated>
                    <resolved>Wed, 12 Jun 2013 04:26:25 +0000</resolved>
                                                            <component>ORM</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20540" author="guilhermeblanco" created="Wed, 12 Jun 2013 04:26:25 +0000"  >&lt;p&gt;Fixed in &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/0d834d0bd4015de2c103a03592c1543399f1b363&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/0d834d0bd4015de2c103a03592c1543399f1b363&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

<item>
            <title>[DDC-2486] Getting started does not work with current release</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2486</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The tutorial states: &quot;This tutorial assumes you work with Doctrine 2.3 and above. Some of the code will not work with lower versions.&quot;&lt;/p&gt;

&lt;p&gt;I&apos;m using 2.3.4&lt;/p&gt;

&lt;p&gt;When running &quot;php vendor/bin/doctrine orm:schema-tool:create&quot;&lt;/p&gt;

&lt;p&gt;this happens:&lt;/p&gt;

&lt;p&gt;PHP Fatal error:  Call to undefined method Doctrine\ORM\Tools\Console\ConsoleRunner::createHelperSet() in /var/www/project/cli-config.php on line 5&lt;br/&gt;
PHP Stack trace:&lt;br/&gt;
PHP   1. &lt;/p&gt;
{main}() /var/www/project/vendor/doctrine/orm/bin/doctrine:0&lt;br/&gt;
PHP   2. include() /var/www/project/vendor/doctrine/orm/bin/doctrine:4&lt;br/&gt;
PHP   3. require() /var/www/project/vendor/doctrine/orm/bin/doctrine.php:31&lt;br/&gt;
&lt;br/&gt;
Fatal error: Call to undefined method Doctrine\ORM\Tools\Console\ConsoleRunner::createHelperSet() in /var/www/project/cli-config.php on line 5&lt;br/&gt;
&lt;br/&gt;
Call Stack:&lt;br/&gt;
    0.0001     619840   1. {main}
&lt;p&gt;() /var/www/project/vendor/doctrine/orm/bin/doctrine:0&lt;br/&gt;
    0.0003     632072   2. include(&apos;/var/www/project/vendor/doctrine/orm/bin/doctrine.php&apos;) /var/www/project/vendor/doctrine/orm/bin/doctrine:4&lt;br/&gt;
    0.0012     730208   3. require(&apos;/var/www/project/cli-config.php&apos;) /var/www/project/vendor/doctrine/orm/bin/doctrine.php:31&lt;/p&gt;

&lt;p&gt;This is because some commits are not yet in the release. The current GIT version probably works but is not an option for me.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15015">DDC-2486</key>
            <summary>Getting started does not work with current release</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="haggi">Julian Picht</reporter>
                        <labels>
                    </labels>
                <created>Tue, 4 Jun 2013 10:57:42 +0000</created>
                <updated>Tue, 11 Jun 2013 17:02:36 +0000</updated>
                                    <version>2.3.4</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20536" author="goatrider" created="Tue, 11 Jun 2013 15:43:02 +0000"  >&lt;p&gt;I&apos;m seeing this problem too. Kinda hard to learn Doctrine when the tutorial is brain dead.&lt;/p&gt;</comment>
                    <comment id="20537" author="goatrider" created="Tue, 11 Jun 2013 17:02:36 +0000"  >&lt;p&gt;&quot;CreateHelperSet&quot; appears to be a method in 2.4. I adapted the &quot;2.3 configuring the command line&quot; code to make my &quot;cli-config.php&quot; file read like this, and it appears to work:&lt;/p&gt;

&lt;p&gt;&amp;lt;?php&lt;br/&gt;
// cli-config.php&lt;br/&gt;
require_once &quot;bootstrap.php&quot;;&lt;/p&gt;

&lt;p&gt;$em = $entityManager;&lt;/p&gt;

&lt;p&gt;$helperSet = new \Symfony\Component\Console\Helper\HelperSet(array(&lt;br/&gt;
    &apos;db&apos; =&amp;gt; new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em-&amp;gt;getConnection()),&lt;br/&gt;
    &apos;em&apos; =&amp;gt; new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)&lt;br/&gt;
));&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2387] convert-mapping not working correctly with composite primary keys/foreign keys in 2.4.0-RC1</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2387</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;(Apologies if this is somehow a Symfony-specific issue)&lt;/p&gt;

&lt;p&gt;I updated my application via Composer yesterday, and received Doctrine 2.4.0-RC1. After this update, generating entities has been problematic under certain circumstances.&lt;/p&gt;

&lt;p&gt;Here is an example table in MySQL:&lt;/p&gt;

&lt;div class=&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 `user_email` (
  `user_id` int(10) unsigned NOT NULL COMMENT &apos;FK to user&apos;,
  `email` varchar(254) NOT NULL,
  `email_datasource` smallint(1) unsigned NOT NULL COMMENT &apos;FK to datasource_code&apos;,
  `insert_date` datetime NOT NULL,
  PRIMARY KEY (`user_id`,`email`,`email_datasource`),
  KEY `FK_UserEmail_DataSourceCode` (`email_datasource`),
  CONSTRAINT `FK_UserEmail_User` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In Doctrine 2.3, the mapping works correctly, and you end up with a 3-part primary key, with a user property mapped to the User entity, and a datasourceCode property mapped to the DatasourceCode entity. All good.&lt;/p&gt;

&lt;p&gt;In 2.4, the following error is given: &lt;tt&gt;Single id is not allowed on composite primary key in entity UserEmail&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Removing one of the foreign keys in the table (either to User or DatasourceCode) but keeping the primary key set to all 3 columns allows the mapping to work. &lt;em&gt;But&lt;/em&gt;, if you then remove one of the columns from the primary key (say, email_datasource) it fails again.&lt;/p&gt;


</description>
                <environment>Symfony 2.2.0, MySQL 5.1</environment>
            <key id="14755">DDC-2387</key>
            <summary>convert-mapping not working correctly with composite primary keys/foreign keys in 2.4.0-RC1</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="4" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="succinct">Nicholas Van Dusen</reporter>
                        <labels>
                    </labels>
                <created>Wed, 3 Apr 2013 20:45:40 +0000</created>
                <updated>Tue, 11 Jun 2013 11:39:19 +0000</updated>
                                                    <fixVersion>2.3.4</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="19940" author="beberlei" created="Thu, 4 Apr 2013 20:53:11 +0000"  >&lt;p&gt;Can you provide the full stack trace to the exception please?&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$e-&amp;gt;getTraceAsString();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="19977" author="succinct" created="Thu, 11 Apr 2013 16:02:57 +0000"  >&lt;p&gt;Benjamin, I&apos;m not sure how to get the trace for you, since I&apos;m running from inside the Symfony2 doctrine:mapping:import command line item.&lt;/p&gt;</comment>
                    <comment id="19978" author="stof" created="Thu, 11 Apr 2013 16:11:56 +0000"  >&lt;p&gt;Use the &lt;tt&gt;--verbose&lt;/tt&gt; option when running the command&lt;/p&gt;</comment>
                    <comment id="19979" author="succinct" created="Thu, 11 Apr 2013 17:21:35 +0000"  >&lt;p&gt;I was able to get a trace 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;#0 /&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;/www/html/voxrepublic/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php(1571): Doctrine\ORM\Mapping\MappingException::singleIdNotAllowedOnCompositePrimaryKey(&apos;UserEmail&apos;)
#1 /&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;/www/html/voxrepublic/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php(422): Doctrine\ORM\Mapping\ClassMetadataInfo-&amp;gt;getSingleIdentifierFieldName()
#2 /&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;/www/html/voxrepublic/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php(136): Doctrine\ORM\Mapping\ClassMetadataFactory-&amp;gt;completeIdGeneratorMapping(&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;(Doctrine\ORM\Mapping\ClassMetadata))
#3 /&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;/www/html/voxrepublic/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php(302): Doctrine\ORM\Mapping\ClassMetadataFactory-&amp;gt;doLoadMetadata(&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;(Doctrine\ORM\Mapping\ClassMetadata), NULL, &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;, Array)
#4 /&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;/www/html/voxrepublic/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php(212): Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory-&amp;gt;loadMetadata(&apos;UserEmail&apos;)
#5 /&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;/www/html/voxrepublic/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php(112): Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory-&amp;gt;getMetadataFor(&apos;UserEmail&apos;)
#6 /&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;/www/html/voxrepublic/vendor/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle/Command/ImportMappingDoctrineCommand.php(108): Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory-&amp;gt;getAllMetadata()
#7 /&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;/www/html/voxrepublic/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php(240): Doctrine\Bundle\DoctrineBundle\Command\ImportMappingDoctrineCommand-&amp;gt;execute(&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;(Symfony\Component\Console\Input\ArgvInput), &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;(Symfony\Component\Console\Output\ConsoleOutput))
#8 /&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;/www/html/voxrepublic/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Command\Command-&amp;gt;run(&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;(Symfony\Component\Console\Input\ArgvInput), &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;(Symfony\Component\Console\Output\ConsoleOutput))
#9 /&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;/www/html/voxrepublic/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(78): Symfony\Component\Console\Application-&amp;gt;doRun(&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;(Symfony\Component\Console\Input\ArgvInput), &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;(Symfony\Component\Console\Output\ConsoleOutput))
#10 /&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;/www/html/voxrepublic/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(106): Symfony\Bundle\FrameworkBundle\Console\Application-&amp;gt;doRun(&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;(Symfony\Component\Console\Input\ArgvInput), &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;(Symfony\Component\Console\Output\ConsoleOutput))
#11 /&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;/www/html/voxrepublic/app/console(22): Symfony\Component\Console\Application-&amp;gt;run(&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;(Symfony\Component\Console\Input\ArgvInput))
#12 {main}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="19995" author="beberlei" created="Sun, 14 Apr 2013 09:31:07 +0000"  >&lt;p&gt;The problem is that Doctrine seems to detect that you only have on id field on this entity and then a new function of 2.4 throws this error. I will try to reproduce this with your table. Until then could you show me the var_dump() of the $class variable in Doctrine\ORM\ClassMetadataFactory#completeIdGeneratorMapping()? This would help very much already.&lt;/p&gt;</comment>
                    <comment id="20015" author="maximilian" created="Mon, 15 Apr 2013 14:48:07 +0000"  >&lt;p&gt;I have the same error when using &quot;doctrine:mapping:import&quot;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;CREATE  TABLE IF NOT EXISTS `dev_Recipe`.`step` (

  `recipe_id` INT NOT NULL ,

  `step_number` INT NOT NULL ,

  `description` TEXT NULL ,

  `timer` INT NULL ,

  `image` VARCHAR(100) NULL ,

  PRIMARY KEY (`recipe_id`, `step_number`) ,

  INDEX `recipe_id_idx` (`recipe_id` ASC) ,

  INDEX `step_number` (`step_number` ASC) ,

  CONSTRAINT `step_recipe_id`

    FOREIGN KEY (`recipe_id` )

    REFERENCES `dev_Recipe`.`recipe` (`recipe_id` )

    ON DELETE NO ACTION

    ON UPDATE NO ACTION)

ENGINE = InnoDB;&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;Exception trace:
 () at \htdocs\SF2\vendor\doctrine\orm\lib\Doctrine\ORM\Mapping\MappingException.php:258
 Doctrine\ORM\Mapping\MappingException::singleIdNotAllowedOnCompositePrimaryKey() at \htdocs\SF2\vendor\doctrine\orm\lib\Doctrine\ORM\Mapping\ClassMetadataInfo.php:1571
 Doctrine\ORM\Mapping\ClassMetadataInfo-&amp;gt;getSingleIdentifierFieldName() at \htdocs\SF2\vendor\doctrine\orm\lib\Doctrine\ORM\Mapping\ClassMetadataFactory.php:422
 Doctrine\ORM\Mapping\ClassMetadataFactory-&amp;gt;completeIdGeneratorMapping() at \htdocs\SF2\vendor\doctrine\orm\lib\Doctrine\ORM\Mapping\ClassMetadataFactory.php:136
 Doctrine\ORM\Mapping\ClassMetadataFactory-&amp;gt;doLoadMetadata() at \htdocs\SF2\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory.php:302
 Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory-&amp;gt;loadMetadata() at \htdocs\SF2\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory.php:212
 Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory-&amp;gt;getMetadataFor() at \htdocs\SF2\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory.php:112
 Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory-&amp;gt;getAllMetadata() at \htdocs\SF2\vendor\doctrine\orm\lib\Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand.php:126
 Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand-&amp;gt;execute() at \htdocs\SF2\vendor\doctrine\doctrine-bundle\Doctrine\Bundle\DoctrineBundle\Command\Proxy\ConvertMappingDoctrineCommand.php:59
 Doctrine\Bundle\DoctrineBundle\Command\Proxy\ConvertMappingDoctrineCommand-&amp;gt;execute() at \htdocs\SF2\vendor\symfony\symfony\src\Symfony\Component\Console\Command\Command.php:240
 Symfony\Component\Console\Command\Command-&amp;gt;run() at \htdocs\SF2\vendor\symfony\symfony\src\Symfony\Component\Console\Application.php:193
 Symfony\Component\Console\Application-&amp;gt;doRun() at \htdocs\SF2\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Console\Application.php:78
 Symfony\Bundle\FrameworkBundle\Console\Application-&amp;gt;doRun() at \htdocs\SF2\vendor\symfony\symfony\src\Symfony\Component\Console\Application.php:106
 Symfony\Component\Console\Application-&amp;gt;run() at \htdocs\SF2\app\console:22&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&quot;var_dump($class);&quot; returns:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;object(Doctrine\ORM\Mapping\ClassMetadata)#470 (36) {
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
  string(10) &lt;span class=&quot;code-quote&quot;&gt;&quot;Ingredient&quot;&lt;/span&gt;
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namespace&quot;&lt;/span&gt;]=&amp;gt;
  string(0) &quot;&quot;
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;rootEntityName&quot;&lt;/span&gt;]=&amp;gt;
  string(10) &lt;span class=&quot;code-quote&quot;&gt;&quot;Ingredient&quot;&lt;/span&gt;
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;customGeneratorDefinition&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;customRepositoryClassName&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isMappedSuperclass&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;parentClasses&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;subClasses&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namedQueries&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namedNativeQueries&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;sqlResultSetMappings&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;identifier&quot;&lt;/span&gt;]=&amp;gt;
  array(1) {
    [0]=&amp;gt;
    string(12) &lt;span class=&quot;code-quote&quot;&gt;&quot;ingredientId&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;inheritanceType&quot;&lt;/span&gt;]=&amp;gt;
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;generatorType&quot;&lt;/span&gt;]=&amp;gt;
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldMappings&quot;&lt;/span&gt;]=&amp;gt;
  array(4) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;ingredientId&quot;&lt;/span&gt;]=&amp;gt;
    array(6) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(12) &lt;span class=&quot;code-quote&quot;&gt;&quot;ingredientId&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnName&quot;&lt;/span&gt;]=&amp;gt;
      string(13) &lt;span class=&quot;code-quote&quot;&gt;&quot;ingredient_id&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      string(7) &lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;unsigned&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;nullable&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    }
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
    array(6) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnName&quot;&lt;/span&gt;]=&amp;gt;
      string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;length&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(45)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fixed&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;nullable&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    }
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;color&quot;&lt;/span&gt;]=&amp;gt;
    array(5) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(5) &lt;span class=&quot;code-quote&quot;&gt;&quot;color&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnName&quot;&lt;/span&gt;]=&amp;gt;
      string(5) &lt;span class=&quot;code-quote&quot;&gt;&quot;color&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      string(7) &lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;unsigned&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;nullable&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    }
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;img&quot;&lt;/span&gt;]=&amp;gt;
    array(6) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(3) &lt;span class=&quot;code-quote&quot;&gt;&quot;img&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnName&quot;&lt;/span&gt;]=&amp;gt;
      string(3) &lt;span class=&quot;code-quote&quot;&gt;&quot;img&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;length&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(45)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fixed&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;nullable&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
    }
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldNames&quot;&lt;/span&gt;]=&amp;gt;
  array(4) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;ingredient_id&quot;&lt;/span&gt;]=&amp;gt;
    string(12) &lt;span class=&quot;code-quote&quot;&gt;&quot;ingredientId&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
    string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;color&quot;&lt;/span&gt;]=&amp;gt;
    string(5) &lt;span class=&quot;code-quote&quot;&gt;&quot;color&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;img&quot;&lt;/span&gt;]=&amp;gt;
    string(3) &lt;span class=&quot;code-quote&quot;&gt;&quot;img&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnNames&quot;&lt;/span&gt;]=&amp;gt;
  array(4) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;ingredientId&quot;&lt;/span&gt;]=&amp;gt;
    string(13) &lt;span class=&quot;code-quote&quot;&gt;&quot;ingredient_id&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
    string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;color&quot;&lt;/span&gt;]=&amp;gt;
    string(5) &lt;span class=&quot;code-quote&quot;&gt;&quot;color&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;img&quot;&lt;/span&gt;]=&amp;gt;
    string(3) &lt;span class=&quot;code-quote&quot;&gt;&quot;img&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;discriminatorValue&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;discriminatorMap&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;discriminatorColumn&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;table&quot;&lt;/span&gt;]=&amp;gt;
  array(1) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
    string(10) &lt;span class=&quot;code-quote&quot;&gt;&quot;ingredient&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;lifecycleCallbacks&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;associationMappings&quot;&lt;/span&gt;]=&amp;gt;
  array(1) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;ingredientCategory&quot;&lt;/span&gt;]=&amp;gt;
    array(15) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(18) &lt;span class=&quot;code-quote&quot;&gt;&quot;ingredientCategory&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;targetEntity&quot;&lt;/span&gt;]=&amp;gt;
      string(18) &lt;span class=&quot;code-quote&quot;&gt;&quot;IngredientCategory&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;mappedBy&quot;&lt;/span&gt;]=&amp;gt;
      string(10) &lt;span class=&quot;code-quote&quot;&gt;&quot;ingredient&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(8)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;inversedBy&quot;&lt;/span&gt;]=&amp;gt;
      NULL
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isOwningSide&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;sourceEntity&quot;&lt;/span&gt;]=&amp;gt;
      string(10) &lt;span class=&quot;code-quote&quot;&gt;&quot;Ingredient&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fetch&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(2)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;cascade&quot;&lt;/span&gt;]=&amp;gt;
      array(0) {
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeRemove&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadePersist&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeRefresh&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeMerge&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeDetach&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;orphanRemoval&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    }
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isIdentifierComposite&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;containsForeignIdentifier&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;idGenerator&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;sequenceGeneratorDefinition&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;tableGeneratorDefinition&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;changeTrackingPolicy&quot;&lt;/span&gt;]=&amp;gt;
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isVersioned&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;versionField&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;reflClass&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isReadOnly&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namingStrategy&quot;&lt;/span&gt;:&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt;]=&amp;gt;
  object(Doctrine\ORM\Mapping\DefaultNamingStrategy)#258 (0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;reflFields&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;_prototype&quot;&lt;/span&gt;:&lt;span class=&quot;code-quote&quot;&gt;&quot;Doctrine\ORM\Mapping\ClassMetadataInfo&quot;&lt;/span&gt;:&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt;]=&amp;gt;
  NULL
}
object(Doctrine\ORM\Mapping\ClassMetadata)#472 (36) {
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
  string(18) &lt;span class=&quot;code-quote&quot;&gt;&quot;IngredientCategory&quot;&lt;/span&gt;
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namespace&quot;&lt;/span&gt;]=&amp;gt;
  string(0) &quot;&quot;
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;rootEntityName&quot;&lt;/span&gt;]=&amp;gt;
  string(18) &lt;span class=&quot;code-quote&quot;&gt;&quot;IngredientCategory&quot;&lt;/span&gt;
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;customGeneratorDefinition&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;customRepositoryClassName&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isMappedSuperclass&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;parentClasses&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;subClasses&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namedQueries&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namedNativeQueries&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;sqlResultSetMappings&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;identifier&quot;&lt;/span&gt;]=&amp;gt;
  array(1) {
    [0]=&amp;gt;
    string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;inheritanceType&quot;&lt;/span&gt;]=&amp;gt;
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;generatorType&quot;&lt;/span&gt;]=&amp;gt;
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldMappings&quot;&lt;/span&gt;]=&amp;gt;
  array(3) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;]=&amp;gt;
    array(6) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnName&quot;&lt;/span&gt;]=&amp;gt;
      string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      string(7) &lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;unsigned&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;nullable&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    }
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
    array(6) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnName&quot;&lt;/span&gt;]=&amp;gt;
      string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;length&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(255)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fixed&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;nullable&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    }
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;]=&amp;gt;
    array(4) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(11) &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnName&quot;&lt;/span&gt;]=&amp;gt;
      string(11) &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;text&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;nullable&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
    }
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldNames&quot;&lt;/span&gt;]=&amp;gt;
  array(3) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;]=&amp;gt;
    string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
    string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;]=&amp;gt;
    string(11) &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnNames&quot;&lt;/span&gt;]=&amp;gt;
  array(3) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;]=&amp;gt;
    string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
    string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;]=&amp;gt;
    string(11) &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;discriminatorValue&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;discriminatorMap&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;discriminatorColumn&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;table&quot;&lt;/span&gt;]=&amp;gt;
  array(1) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
    string(19) &lt;span class=&quot;code-quote&quot;&gt;&quot;ingredient_category&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;lifecycleCallbacks&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;associationMappings&quot;&lt;/span&gt;]=&amp;gt;
  array(2) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;ingredient&quot;&lt;/span&gt;]=&amp;gt;
    array(19) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(10) &lt;span class=&quot;code-quote&quot;&gt;&quot;ingredient&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;targetEntity&quot;&lt;/span&gt;]=&amp;gt;
      string(10) &lt;span class=&quot;code-quote&quot;&gt;&quot;Ingredient&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;inversedBy&quot;&lt;/span&gt;]=&amp;gt;
      string(18) &lt;span class=&quot;code-quote&quot;&gt;&quot;ingredientCategory&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;joinTable&quot;&lt;/span&gt;]=&amp;gt;
      array(3) {
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
        string(30) &lt;span class=&quot;code-quote&quot;&gt;&quot;ingredient_category_ingredient&quot;&lt;/span&gt;
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;joinColumns&quot;&lt;/span&gt;]=&amp;gt;
        array(1) {
          [0]=&amp;gt;
          array(2) {
            [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
            string(22) &lt;span class=&quot;code-quote&quot;&gt;&quot;ingredient_category_id&quot;&lt;/span&gt;
            [&lt;span class=&quot;code-quote&quot;&gt;&quot;referencedColumnName&quot;&lt;/span&gt;]=&amp;gt;
            string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
          }
        }
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;inverseJoinColumns&quot;&lt;/span&gt;]=&amp;gt;
        array(1) {
          [0]=&amp;gt;
          array(2) {
            [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
            string(13) &lt;span class=&quot;code-quote&quot;&gt;&quot;ingredient_id&quot;&lt;/span&gt;
            [&lt;span class=&quot;code-quote&quot;&gt;&quot;referencedColumnName&quot;&lt;/span&gt;]=&amp;gt;
            string(13) &lt;span class=&quot;code-quote&quot;&gt;&quot;ingredient_id&quot;&lt;/span&gt;
          }
        }
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(8)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;mappedBy&quot;&lt;/span&gt;]=&amp;gt;
      NULL
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isOwningSide&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;sourceEntity&quot;&lt;/span&gt;]=&amp;gt;
      string(18) &lt;span class=&quot;code-quote&quot;&gt;&quot;IngredientCategory&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fetch&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(2)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;cascade&quot;&lt;/span&gt;]=&amp;gt;
      array(0) {
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeRemove&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadePersist&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeRefresh&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeMerge&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeDetach&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;joinTableColumns&quot;&lt;/span&gt;]=&amp;gt;
      array(2) {
        [0]=&amp;gt;
        string(22) &lt;span class=&quot;code-quote&quot;&gt;&quot;ingredient_category_id&quot;&lt;/span&gt;
        [1]=&amp;gt;
        string(13) &lt;span class=&quot;code-quote&quot;&gt;&quot;ingredient_id&quot;&lt;/span&gt;
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;relationToSourceKeyColumns&quot;&lt;/span&gt;]=&amp;gt;
      array(1) {
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;ingredient_category_id&quot;&lt;/span&gt;]=&amp;gt;
        string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;relationToTargetKeyColumns&quot;&lt;/span&gt;]=&amp;gt;
      array(1) {
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;ingredient_id&quot;&lt;/span&gt;]=&amp;gt;
        string(13) &lt;span class=&quot;code-quote&quot;&gt;&quot;ingredient_id&quot;&lt;/span&gt;
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;orphanRemoval&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    }
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;parent&quot;&lt;/span&gt;]=&amp;gt;
    array(19) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;parent&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;targetEntity&quot;&lt;/span&gt;]=&amp;gt;
      string(18) &lt;span class=&quot;code-quote&quot;&gt;&quot;IngredientCategory&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;joinColumns&quot;&lt;/span&gt;]=&amp;gt;
      array(1) {
        [0]=&amp;gt;
        array(2) {
          [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
          string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;parent_id&quot;&lt;/span&gt;
          [&lt;span class=&quot;code-quote&quot;&gt;&quot;referencedColumnName&quot;&lt;/span&gt;]=&amp;gt;
          string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
        }
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(2)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;mappedBy&quot;&lt;/span&gt;]=&amp;gt;
      NULL
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;inversedBy&quot;&lt;/span&gt;]=&amp;gt;
      NULL
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isOwningSide&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;sourceEntity&quot;&lt;/span&gt;]=&amp;gt;
      string(18) &lt;span class=&quot;code-quote&quot;&gt;&quot;IngredientCategory&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fetch&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(2)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;cascade&quot;&lt;/span&gt;]=&amp;gt;
      array(0) {
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeRemove&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadePersist&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeRefresh&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeMerge&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeDetach&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;sourceToTargetKeyColumns&quot;&lt;/span&gt;]=&amp;gt;
      array(1) {
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;parent_id&quot;&lt;/span&gt;]=&amp;gt;
        string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;joinColumnFieldNames&quot;&lt;/span&gt;]=&amp;gt;
      array(1) {
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;parent_id&quot;&lt;/span&gt;]=&amp;gt;
        string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;parent_id&quot;&lt;/span&gt;
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;targetToSourceKeyColumns&quot;&lt;/span&gt;]=&amp;gt;
      array(1) {
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;]=&amp;gt;
        string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;parent_id&quot;&lt;/span&gt;
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;orphanRemoval&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    }
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isIdentifierComposite&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;containsForeignIdentifier&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;idGenerator&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;sequenceGeneratorDefinition&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;tableGeneratorDefinition&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;changeTrackingPolicy&quot;&lt;/span&gt;]=&amp;gt;
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isVersioned&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;versionField&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;reflClass&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isReadOnly&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namingStrategy&quot;&lt;/span&gt;:&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt;]=&amp;gt;
  object(Doctrine\ORM\Mapping\DefaultNamingStrategy)#258 (0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;reflFields&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;_prototype&quot;&lt;/span&gt;:&lt;span class=&quot;code-quote&quot;&gt;&quot;Doctrine\ORM\Mapping\ClassMetadataInfo&quot;&lt;/span&gt;:&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt;]=&amp;gt;
  NULL
}
object(Doctrine\ORM\Mapping\ClassMetadata)#474 (36) {
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
  string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;Recipe&quot;&lt;/span&gt;
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namespace&quot;&lt;/span&gt;]=&amp;gt;
  string(0) &quot;&quot;
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;rootEntityName&quot;&lt;/span&gt;]=&amp;gt;
  string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;Recipe&quot;&lt;/span&gt;
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;customGeneratorDefinition&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;customRepositoryClassName&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isMappedSuperclass&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;parentClasses&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;subClasses&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namedQueries&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namedNativeQueries&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;sqlResultSetMappings&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;identifier&quot;&lt;/span&gt;]=&amp;gt;
  array(1) {
    [0]=&amp;gt;
    string(8) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipeId&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;inheritanceType&quot;&lt;/span&gt;]=&amp;gt;
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;generatorType&quot;&lt;/span&gt;]=&amp;gt;
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldMappings&quot;&lt;/span&gt;]=&amp;gt;
  array(3) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;recipeId&quot;&lt;/span&gt;]=&amp;gt;
    array(6) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(8) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipeId&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnName&quot;&lt;/span&gt;]=&amp;gt;
      string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_id&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      string(7) &lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;unsigned&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;nullable&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    }
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
    array(6) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnName&quot;&lt;/span&gt;]=&amp;gt;
      string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;length&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(255)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fixed&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;nullable&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    }
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;]=&amp;gt;
    array(4) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(11) &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnName&quot;&lt;/span&gt;]=&amp;gt;
      string(11) &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;text&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;nullable&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
    }
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldNames&quot;&lt;/span&gt;]=&amp;gt;
  array(3) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_id&quot;&lt;/span&gt;]=&amp;gt;
    string(8) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipeId&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
    string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;]=&amp;gt;
    string(11) &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnNames&quot;&lt;/span&gt;]=&amp;gt;
  array(3) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;recipeId&quot;&lt;/span&gt;]=&amp;gt;
    string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_id&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
    string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;]=&amp;gt;
    string(11) &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;discriminatorValue&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;discriminatorMap&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;discriminatorColumn&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;table&quot;&lt;/span&gt;]=&amp;gt;
  array(1) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
    string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;lifecycleCallbacks&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;associationMappings&quot;&lt;/span&gt;]=&amp;gt;
  array(2) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;recipeCategory&quot;&lt;/span&gt;]=&amp;gt;
    array(15) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(14) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipeCategory&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;targetEntity&quot;&lt;/span&gt;]=&amp;gt;
      string(14) &lt;span class=&quot;code-quote&quot;&gt;&quot;RecipeCategory&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;mappedBy&quot;&lt;/span&gt;]=&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(8)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;inversedBy&quot;&lt;/span&gt;]=&amp;gt;
      NULL
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isOwningSide&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;sourceEntity&quot;&lt;/span&gt;]=&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;Recipe&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fetch&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(2)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;cascade&quot;&lt;/span&gt;]=&amp;gt;
      array(0) {
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeRemove&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadePersist&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeRefresh&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeMerge&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeDetach&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;orphanRemoval&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    }
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;users&quot;&lt;/span&gt;]=&amp;gt;
    array(19) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(5) &lt;span class=&quot;code-quote&quot;&gt;&quot;users&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;targetEntity&quot;&lt;/span&gt;]=&amp;gt;
      string(5) &lt;span class=&quot;code-quote&quot;&gt;&quot;Users&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;inversedBy&quot;&lt;/span&gt;]=&amp;gt;
      string(12) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipeRecipe&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;joinTable&quot;&lt;/span&gt;]=&amp;gt;
      array(3) {
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
        string(13) &lt;span class=&quot;code-quote&quot;&gt;&quot;users_recipes&quot;&lt;/span&gt;
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;joinColumns&quot;&lt;/span&gt;]=&amp;gt;
        array(1) {
          [0]=&amp;gt;
          array(2) {
            [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
            string(16) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_recipe_id&quot;&lt;/span&gt;
            [&lt;span class=&quot;code-quote&quot;&gt;&quot;referencedColumnName&quot;&lt;/span&gt;]=&amp;gt;
            string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_id&quot;&lt;/span&gt;
          }
        }
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;inverseJoinColumns&quot;&lt;/span&gt;]=&amp;gt;
        array(1) {
          [0]=&amp;gt;
          array(2) {
            [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
            string(8) &lt;span class=&quot;code-quote&quot;&gt;&quot;users_id&quot;&lt;/span&gt;
            [&lt;span class=&quot;code-quote&quot;&gt;&quot;referencedColumnName&quot;&lt;/span&gt;]=&amp;gt;
            string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
          }
        }
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(8)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;mappedBy&quot;&lt;/span&gt;]=&amp;gt;
      NULL
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isOwningSide&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;sourceEntity&quot;&lt;/span&gt;]=&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;Recipe&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fetch&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(2)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;cascade&quot;&lt;/span&gt;]=&amp;gt;
      array(0) {
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeRemove&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadePersist&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeRefresh&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeMerge&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeDetach&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;joinTableColumns&quot;&lt;/span&gt;]=&amp;gt;
      array(2) {
        [0]=&amp;gt;
        string(16) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_recipe_id&quot;&lt;/span&gt;
        [1]=&amp;gt;
        string(8) &lt;span class=&quot;code-quote&quot;&gt;&quot;users_id&quot;&lt;/span&gt;
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;relationToSourceKeyColumns&quot;&lt;/span&gt;]=&amp;gt;
      array(1) {
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_recipe_id&quot;&lt;/span&gt;]=&amp;gt;
        string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_id&quot;&lt;/span&gt;
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;relationToTargetKeyColumns&quot;&lt;/span&gt;]=&amp;gt;
      array(1) {
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;users_id&quot;&lt;/span&gt;]=&amp;gt;
        string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;orphanRemoval&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    }
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isIdentifierComposite&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;containsForeignIdentifier&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;idGenerator&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;sequenceGeneratorDefinition&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;tableGeneratorDefinition&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;changeTrackingPolicy&quot;&lt;/span&gt;]=&amp;gt;
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isVersioned&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;versionField&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;reflClass&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isReadOnly&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namingStrategy&quot;&lt;/span&gt;:&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt;]=&amp;gt;
  object(Doctrine\ORM\Mapping\DefaultNamingStrategy)#258 (0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;reflFields&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;_prototype&quot;&lt;/span&gt;:&lt;span class=&quot;code-quote&quot;&gt;&quot;Doctrine\ORM\Mapping\ClassMetadataInfo&quot;&lt;/span&gt;:&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt;]=&amp;gt;
  NULL
}
object(Doctrine\ORM\Mapping\ClassMetadata)#476 (36) {
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
  string(14) &lt;span class=&quot;code-quote&quot;&gt;&quot;RecipeCategory&quot;&lt;/span&gt;
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namespace&quot;&lt;/span&gt;]=&amp;gt;
  string(0) &quot;&quot;
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;rootEntityName&quot;&lt;/span&gt;]=&amp;gt;
  string(14) &lt;span class=&quot;code-quote&quot;&gt;&quot;RecipeCategory&quot;&lt;/span&gt;
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;customGeneratorDefinition&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;customRepositoryClassName&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isMappedSuperclass&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;parentClasses&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;subClasses&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namedQueries&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namedNativeQueries&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;sqlResultSetMappings&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;identifier&quot;&lt;/span&gt;]=&amp;gt;
  array(1) {
    [0]=&amp;gt;
    string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;inheritanceType&quot;&lt;/span&gt;]=&amp;gt;
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;generatorType&quot;&lt;/span&gt;]=&amp;gt;
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldMappings&quot;&lt;/span&gt;]=&amp;gt;
  array(3) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;]=&amp;gt;
    array(6) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnName&quot;&lt;/span&gt;]=&amp;gt;
      string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      string(7) &lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;unsigned&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;nullable&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    }
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
    array(6) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnName&quot;&lt;/span&gt;]=&amp;gt;
      string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;length&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(45)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fixed&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;nullable&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    }
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;]=&amp;gt;
    array(6) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(11) &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnName&quot;&lt;/span&gt;]=&amp;gt;
      string(11) &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;length&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(45)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fixed&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;nullable&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
    }
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldNames&quot;&lt;/span&gt;]=&amp;gt;
  array(3) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;]=&amp;gt;
    string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
    string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;]=&amp;gt;
    string(11) &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnNames&quot;&lt;/span&gt;]=&amp;gt;
  array(3) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;]=&amp;gt;
    string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
    string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;]=&amp;gt;
    string(11) &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;discriminatorValue&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;discriminatorMap&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;discriminatorColumn&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;table&quot;&lt;/span&gt;]=&amp;gt;
  array(1) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
    string(15) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_category&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;lifecycleCallbacks&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;associationMappings&quot;&lt;/span&gt;]=&amp;gt;
  array(2) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;recipe&quot;&lt;/span&gt;]=&amp;gt;
    array(19) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;targetEntity&quot;&lt;/span&gt;]=&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;Recipe&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;inversedBy&quot;&lt;/span&gt;]=&amp;gt;
      string(14) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipeCategory&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;joinTable&quot;&lt;/span&gt;]=&amp;gt;
      array(3) {
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
        string(22) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_category_recipe&quot;&lt;/span&gt;
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;joinColumns&quot;&lt;/span&gt;]=&amp;gt;
        array(1) {
          [0]=&amp;gt;
          array(2) {
            [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
            string(18) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_category_id&quot;&lt;/span&gt;
            [&lt;span class=&quot;code-quote&quot;&gt;&quot;referencedColumnName&quot;&lt;/span&gt;]=&amp;gt;
            string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
          }
        }
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;inverseJoinColumns&quot;&lt;/span&gt;]=&amp;gt;
        array(1) {
          [0]=&amp;gt;
          array(2) {
            [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
            string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_id&quot;&lt;/span&gt;
            [&lt;span class=&quot;code-quote&quot;&gt;&quot;referencedColumnName&quot;&lt;/span&gt;]=&amp;gt;
            string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_id&quot;&lt;/span&gt;
          }
        }
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(8)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;mappedBy&quot;&lt;/span&gt;]=&amp;gt;
      NULL
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isOwningSide&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;sourceEntity&quot;&lt;/span&gt;]=&amp;gt;
      string(14) &lt;span class=&quot;code-quote&quot;&gt;&quot;RecipeCategory&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fetch&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(2)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;cascade&quot;&lt;/span&gt;]=&amp;gt;
      array(0) {
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeRemove&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadePersist&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeRefresh&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeMerge&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeDetach&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;joinTableColumns&quot;&lt;/span&gt;]=&amp;gt;
      array(2) {
        [0]=&amp;gt;
        string(18) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_category_id&quot;&lt;/span&gt;
        [1]=&amp;gt;
        string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_id&quot;&lt;/span&gt;
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;relationToSourceKeyColumns&quot;&lt;/span&gt;]=&amp;gt;
      array(1) {
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_category_id&quot;&lt;/span&gt;]=&amp;gt;
        string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;relationToTargetKeyColumns&quot;&lt;/span&gt;]=&amp;gt;
      array(1) {
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_id&quot;&lt;/span&gt;]=&amp;gt;
        string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_id&quot;&lt;/span&gt;
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;orphanRemoval&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    }
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;parent&quot;&lt;/span&gt;]=&amp;gt;
    array(19) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;parent&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;targetEntity&quot;&lt;/span&gt;]=&amp;gt;
      string(14) &lt;span class=&quot;code-quote&quot;&gt;&quot;RecipeCategory&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;joinColumns&quot;&lt;/span&gt;]=&amp;gt;
      array(1) {
        [0]=&amp;gt;
        array(2) {
          [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
          string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;parent_id&quot;&lt;/span&gt;
          [&lt;span class=&quot;code-quote&quot;&gt;&quot;referencedColumnName&quot;&lt;/span&gt;]=&amp;gt;
          string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
        }
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(2)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;mappedBy&quot;&lt;/span&gt;]=&amp;gt;
      NULL
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;inversedBy&quot;&lt;/span&gt;]=&amp;gt;
      NULL
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isOwningSide&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;sourceEntity&quot;&lt;/span&gt;]=&amp;gt;
      string(14) &lt;span class=&quot;code-quote&quot;&gt;&quot;RecipeCategory&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fetch&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(2)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;cascade&quot;&lt;/span&gt;]=&amp;gt;
      array(0) {
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeRemove&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadePersist&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeRefresh&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeMerge&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeDetach&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;sourceToTargetKeyColumns&quot;&lt;/span&gt;]=&amp;gt;
      array(1) {
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;parent_id&quot;&lt;/span&gt;]=&amp;gt;
        string(2) &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;joinColumnFieldNames&quot;&lt;/span&gt;]=&amp;gt;
      array(1) {
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;parent_id&quot;&lt;/span&gt;]=&amp;gt;
        string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;parent_id&quot;&lt;/span&gt;
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;targetToSourceKeyColumns&quot;&lt;/span&gt;]=&amp;gt;
      array(1) {
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;]=&amp;gt;
        string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;parent_id&quot;&lt;/span&gt;
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;orphanRemoval&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    }
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isIdentifierComposite&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;containsForeignIdentifier&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;idGenerator&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;sequenceGeneratorDefinition&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;tableGeneratorDefinition&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;changeTrackingPolicy&quot;&lt;/span&gt;]=&amp;gt;
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isVersioned&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;versionField&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;reflClass&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isReadOnly&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namingStrategy&quot;&lt;/span&gt;:&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt;]=&amp;gt;
  object(Doctrine\ORM\Mapping\DefaultNamingStrategy)#258 (0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;reflFields&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;_prototype&quot;&lt;/span&gt;:&lt;span class=&quot;code-quote&quot;&gt;&quot;Doctrine\ORM\Mapping\ClassMetadataInfo&quot;&lt;/span&gt;:&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt;]=&amp;gt;
  NULL
}
object(Doctrine\ORM\Mapping\ClassMetadata)#478 (36) {
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
  string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;Step&quot;&lt;/span&gt;
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namespace&quot;&lt;/span&gt;]=&amp;gt;
  string(0) &quot;&quot;
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;rootEntityName&quot;&lt;/span&gt;]=&amp;gt;
  string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;Step&quot;&lt;/span&gt;
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;customGeneratorDefinition&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;customRepositoryClassName&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isMappedSuperclass&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;parentClasses&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;subClasses&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namedQueries&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namedNativeQueries&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;sqlResultSetMappings&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;identifier&quot;&lt;/span&gt;]=&amp;gt;
  array(2) {
    [0]=&amp;gt;
    string(10) &lt;span class=&quot;code-quote&quot;&gt;&quot;stepNumber&quot;&lt;/span&gt;
    [1]=&amp;gt;
    string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;inheritanceType&quot;&lt;/span&gt;]=&amp;gt;
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;generatorType&quot;&lt;/span&gt;]=&amp;gt;
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldMappings&quot;&lt;/span&gt;]=&amp;gt;
  array(4) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;stepNumber&quot;&lt;/span&gt;]=&amp;gt;
    array(6) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(10) &lt;span class=&quot;code-quote&quot;&gt;&quot;stepNumber&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnName&quot;&lt;/span&gt;]=&amp;gt;
      string(11) &lt;span class=&quot;code-quote&quot;&gt;&quot;step_number&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      string(7) &lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;unsigned&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;nullable&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    }
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;]=&amp;gt;
    array(4) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(11) &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnName&quot;&lt;/span&gt;]=&amp;gt;
      string(11) &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;text&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;nullable&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
    }
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;timer&quot;&lt;/span&gt;]=&amp;gt;
    array(5) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(5) &lt;span class=&quot;code-quote&quot;&gt;&quot;timer&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnName&quot;&lt;/span&gt;]=&amp;gt;
      string(5) &lt;span class=&quot;code-quote&quot;&gt;&quot;timer&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      string(7) &lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;unsigned&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;nullable&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
    }
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;image&quot;&lt;/span&gt;]=&amp;gt;
    array(6) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(5) &lt;span class=&quot;code-quote&quot;&gt;&quot;image&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnName&quot;&lt;/span&gt;]=&amp;gt;
      string(5) &lt;span class=&quot;code-quote&quot;&gt;&quot;image&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;length&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(100)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fixed&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;nullable&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
    }
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldNames&quot;&lt;/span&gt;]=&amp;gt;
  array(4) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;step_number&quot;&lt;/span&gt;]=&amp;gt;
    string(10) &lt;span class=&quot;code-quote&quot;&gt;&quot;stepNumber&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;]=&amp;gt;
    string(11) &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;timer&quot;&lt;/span&gt;]=&amp;gt;
    string(5) &lt;span class=&quot;code-quote&quot;&gt;&quot;timer&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;image&quot;&lt;/span&gt;]=&amp;gt;
    string(5) &lt;span class=&quot;code-quote&quot;&gt;&quot;image&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;columnNames&quot;&lt;/span&gt;]=&amp;gt;
  array(4) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;stepNumber&quot;&lt;/span&gt;]=&amp;gt;
    string(11) &lt;span class=&quot;code-quote&quot;&gt;&quot;step_number&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;]=&amp;gt;
    string(11) &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;timer&quot;&lt;/span&gt;]=&amp;gt;
    string(5) &lt;span class=&quot;code-quote&quot;&gt;&quot;timer&quot;&lt;/span&gt;
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;image&quot;&lt;/span&gt;]=&amp;gt;
    string(5) &lt;span class=&quot;code-quote&quot;&gt;&quot;image&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;discriminatorValue&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;discriminatorMap&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;discriminatorColumn&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;table&quot;&lt;/span&gt;]=&amp;gt;
  array(1) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
    string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;step&quot;&lt;/span&gt;
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;lifecycleCallbacks&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;associationMappings&quot;&lt;/span&gt;]=&amp;gt;
  array(1) {
    [&lt;span class=&quot;code-quote&quot;&gt;&quot;recipe&quot;&lt;/span&gt;]=&amp;gt;
    array(20) {
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fieldName&quot;&lt;/span&gt;]=&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;targetEntity&quot;&lt;/span&gt;]=&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;Recipe&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;joinColumns&quot;&lt;/span&gt;]=&amp;gt;
      array(1) {
        [0]=&amp;gt;
        array(2) {
          [&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;]=&amp;gt;
          string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_id&quot;&lt;/span&gt;
          [&lt;span class=&quot;code-quote&quot;&gt;&quot;referencedColumnName&quot;&lt;/span&gt;]=&amp;gt;
          string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_id&quot;&lt;/span&gt;
        }
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;mappedBy&quot;&lt;/span&gt;]=&amp;gt;
      NULL
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;inversedBy&quot;&lt;/span&gt;]=&amp;gt;
      NULL
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isOwningSide&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;sourceEntity&quot;&lt;/span&gt;]=&amp;gt;
      string(4) &lt;span class=&quot;code-quote&quot;&gt;&quot;Step&quot;&lt;/span&gt;
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;fetch&quot;&lt;/span&gt;]=&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(2)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;cascade&quot;&lt;/span&gt;]=&amp;gt;
      array(0) {
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeRemove&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadePersist&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeRefresh&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeMerge&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;isCascadeDetach&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;sourceToTargetKeyColumns&quot;&lt;/span&gt;]=&amp;gt;
      array(1) {
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_id&quot;&lt;/span&gt;]=&amp;gt;
        string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_id&quot;&lt;/span&gt;
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;joinColumnFieldNames&quot;&lt;/span&gt;]=&amp;gt;
      array(1) {
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_id&quot;&lt;/span&gt;]=&amp;gt;
        string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_id&quot;&lt;/span&gt;
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;targetToSourceKeyColumns&quot;&lt;/span&gt;]=&amp;gt;
      array(1) {
        [&lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_id&quot;&lt;/span&gt;]=&amp;gt;
        string(9) &lt;span class=&quot;code-quote&quot;&gt;&quot;recipe_id&quot;&lt;/span&gt;
      }
      [&lt;span class=&quot;code-quote&quot;&gt;&quot;orphanRemoval&quot;&lt;/span&gt;]=&amp;gt;
      bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    }
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isIdentifierComposite&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;containsForeignIdentifier&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;idGenerator&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;sequenceGeneratorDefinition&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;tableGeneratorDefinition&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;changeTrackingPolicy&quot;&lt;/span&gt;]=&amp;gt;
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isVersioned&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;versionField&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;reflClass&quot;&lt;/span&gt;]=&amp;gt;
  NULL
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;isReadOnly&quot;&lt;/span&gt;]=&amp;gt;
  bool(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;namingStrategy&quot;&lt;/span&gt;:&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt;]=&amp;gt;
  object(Doctrine\ORM\Mapping\DefaultNamingStrategy)#258 (0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;reflFields&quot;&lt;/span&gt;]=&amp;gt;
  array(0) {
  }
  [&lt;span class=&quot;code-quote&quot;&gt;&quot;_prototype&quot;&lt;/span&gt;:&lt;span class=&quot;code-quote&quot;&gt;&quot;Doctrine\ORM\Mapping\ClassMetadataInfo&quot;&lt;/span&gt;:&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt;]=&amp;gt;
  NULL
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="20233" author="beberlei" created="Thu, 9 May 2013 10:11:52 +0000"  >&lt;p&gt;Fixed and merged back to 2.3&lt;/p&gt;</comment>
                    <comment id="20459" author="succinct" created="Wed, 29 May 2013 15:46:20 +0000"  >&lt;p&gt;I tested this again using 2.3.4 (the version which contains this fix) and it is still occurring. Attempting to import mapping for a table with 2 foreign keys in the primary key results in the error &quot;Database does not have any mapping information.&quot; Adding a third column on the primary key &quot;fixes&quot; the issue.&lt;/p&gt;

&lt;p&gt;Currently our developers are being asked to add a fake third part to the key to work around the issue, then delete that key once they get into the entity class. This is a bit tedious and I&apos;d love to see a fix!&lt;/p&gt;</comment>
                    <comment id="20460" author="succinct" created="Wed, 29 May 2013 15:46:42 +0000"  >&lt;p&gt;Issue still present in 2.3.4 and 2.4.0-RC1&lt;/p&gt;</comment>
                    <comment id="20535" author="guillermoespinoza" created="Tue, 11 Jun 2013 11:39:19 +0000"  >&lt;p&gt;The database engine I use is &lt;b&gt;PostgreSQL&lt;/b&gt;. I&apos;m having problems when mapping entities with composite primary keys in other tables. &lt;/p&gt;


    &lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;CREATE TABLE &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;.establecimiento
    (
      id_establecimiento integer NOT NULL,
      establecimiento character varying(100) NOT NULL,
      CONSTRAINT pk_establecimiento PRIMARY KEY (id_establecimiento )
    )
    WITH (
      OIDS=FALSE
    );
    CREATE TABLE &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;.establecimiento_sec
    (
      id_establecimiento_sec integer NOT NULL,
      id_establecimiento integer NOT NULL,
      det_seccion character varying(40) NOT NULL,
      plano character varying(100),
      sector_ingreso character varying(254),
      sponsor_imagen_sec character varying(96000),
      CONSTRAINT pk_establecimientos_sec PRIMARY KEY (id_establecimiento_sec , id_establecimiento ),
      CONSTRAINT fk_establec_reference_establec FOREIGN KEY (id_establecimiento)
          REFERENCES &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;.establecimiento (id_establecimiento) MATCH SIMPLE
          ON UPDATE RESTRICT ON DELETE RESTRICT
    )
    WITH (
      OIDS=TRUE
    );
    CREATE TABLE &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;.establecimiento_sec_plano
    (
      id_establecimiento_sec_plano integer NOT NULL,
      id_establecimiento_sec integer NOT NULL,
      id_establecimiento integer NOT NULL,
      det_plano character varying(512),
      cantidad integer NOT NULL,
      precio &lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt; precision,
      insert_charge &lt;span class=&quot;code-object&quot;&gt;double&lt;/span&gt; precision DEFAULT 0,
      descr character varying(254),
      CONSTRAINT pk_establecimiento_sec_plano PRIMARY KEY (id_establecimiento_sec_plano , id_establecimiento_sec , id_establecimiento ),
      CONSTRAINT fk_establecimiento_sec FOREIGN KEY (id_establecimiento, id_establecimiento_sec)
          REFERENCES &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;.establecimiento_sec (id_establecimiento, id_establecimiento_sec) MATCH SIMPLE
          ON UPDATE NO ACTION ON DELETE CASCADE
    )
    WITH (
      OIDS=FALSE
    );&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;Defining the entity establecimientoSecPlano, $establecimientoSec variable containing the keys $establecimiento and $id_establecimiento_sec&lt;/p&gt;

&lt;p&gt;//Entity/EstablecimientosSecPlano&lt;/p&gt;


    &lt;div class=&quot;code panel&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\Id
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Ticketway\PruebaBundle\Entity\EstablecimientosSec&quot;&lt;/span&gt;)
     * @ORM\JoinColumns(
     *      @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id_establecimiento_sec&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id_establecimiento_sec&quot;&lt;/span&gt;),
     *      @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id_establecimiento&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id_establecimiento&quot;&lt;/span&gt;)) 
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $establecimientoSec;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;//Entity/EstablecimientosSec&lt;/p&gt;

     &lt;div class=&quot;code panel&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\Id
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Ticketway\PruebaBundle\Entity\Establecimientos&quot;&lt;/span&gt;)
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id_establecimiento&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id_establecimiento&quot;&lt;/span&gt;) 
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $establecimiento;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;When executing the command doctrine: mapping: import I get the following error&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;Doctrine\ORM\Mapping\MappingException&amp;#93;&lt;/span&gt;&lt;/b&gt;&lt;br/&gt;
&lt;b&gt;It is not possible to map entity &apos;EstablecimientoSec&apos; with a composite primary key as part of the&lt;/b&gt; &lt;br/&gt;
&lt;b&gt;primary key of another entity &apos;EstablecimientoSecPlano#idEstablecimiento&apos;.&lt;/b&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2495] Partial objects not working with STI</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2495</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When I try to create a query retrieving partial objects of a root class in single table inheritance hierarchy, the resulting SQL includes all fields from the whole class hierarchy.&lt;/p&gt;

&lt;p&gt;DQL:&lt;br/&gt;
SELECT partial v.&lt;/p&gt;
{id, setupDate, flipDate}
&lt;p&gt; FROM VIB\FliesBundle\Entity\Vial v WHERE v.id IN (1,2,3,4,5,6,7,8,9,10)&lt;/p&gt;

&lt;p&gt;SQL:&lt;br/&gt;
SELECT v0_.setupDate AS setupDate0, v0_.flipDate AS flipDate1, v0_.id AS id2, v0_.type AS type3, v0_.parent_id AS parent_id4, v0_.position_id AS position_id5, v0_.prevPosition_id AS prevPosition_id6, v0_.incubator_id AS incubator_id7, v0_.stock_id AS stock_id8, v0_.male_id AS male_id9, v0_.virgin_id AS virgin_id10, v0_.targetStock_id AS targetStock_id11, v0_.targetStockVial_id AS targetStockVial_id12 FROM Vial v0_ WHERE (v0_.id IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) AND v0_.type IN (&apos;vial&apos;, &apos;stock&apos;, &apos;cross&apos;, &apos;injection&apos;)&lt;/p&gt;</description>
                <environment>Symfony2 project, Doctrine ORM with MySQL database backend</environment>
            <key id="15030">DDC-2495</key>
            <summary>Partial objects not working with STI</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="rejsmont">Radoslaw Ejsmont</reporter>
                        <labels>
                        <label>STI</label>
                        <label>dql</label>
                        <label>orm</label>
                        <label>partial</label>
                    </labels>
                <created>Mon, 10 Jun 2013 13:28:21 +0000</created>
                <updated>Tue, 11 Jun 2013 09:17:09 +0000</updated>
                                    <version>2.3.4</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20521" author="fabio.bat.silva" created="Mon, 10 Jun 2013 18:50:01 +0000"  >&lt;p&gt;Could you please provide your entities ?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                    <comment id="20532" author="rejsmont" created="Tue, 11 Jun 2013 09:03:44 +0000"  >&lt;p&gt;This is the whole class hierarchy.&lt;/p&gt;</comment>
                    <comment id="20533" author="rejsmont" created="Tue, 11 Jun 2013 09:13:49 +0000"  >&lt;p&gt;I have actually noticed, that the &quot;partial&quot; keyword is ignored even for entities that are not using any inheritance schema. So it seems that this keyword is generally ignored.&lt;/p&gt;

&lt;p&gt;Right now the following query:&lt;/p&gt;

&lt;p&gt;SELECT e, partial p.&lt;/p&gt;
{id}
&lt;p&gt;, o, s FROM VIB\FliesBundle\Entity\StockVial e LEFT JOIN e.parent p LEFT JOIN e.position o LEFT JOIN e.stock s WHERE e.setupDate &amp;gt; :date AND e.trashed = false ORDER BY e.setupDate DESC ORDER BY e.id DESC&lt;/p&gt;

&lt;p&gt;would result in the following SQL:&lt;/p&gt;

&lt;p&gt;SELECT v0_.setupDate AS setupDate0, v0_.flipDate AS flipDate1, v0_.notes AS notes2, v0_.size AS size3, v0_.labelPrinted AS labelPrinted4, v0_.trashed AS trashed5, v0_.temperature AS temperature6, v0_.id AS id7, v1_.id AS id8, r2_.rackRow AS rackRow9, r2_.rackColumn AS rackColumn10, r2_.id AS id11, s3_.name AS name12, s3_.genotype AS genotype13, s3_.notes AS notes14, s3_.vendor AS vendor15, s3_.infoURL AS infoURL16, s3_.verified AS verified17, s3_.id AS id18, v0_.type AS type19, v0_.parent_id AS parent_id20, v0_.position_id AS position_id21, v0_.prevPosition_id AS prevPosition_id22, v0_.incubator_id AS incubator_id23, v0_.stock_id AS stock_id24, v1_.type AS type25, v1_.parent_id AS parent_id26, v1_.position_id AS position_id27, v1_.prevPosition_id AS prevPosition_id28, v1_.incubator_id AS incubator_id29, v1_.stock_id AS stock_id30, v1_.male_id AS male_id31, v1_.virgin_id AS virgin_id32, v1_.targetStock_id AS targetStock_id33, v1_.targetStockVial_id AS targetStockVial_id34, r2_.rack_id AS rack_id35, s3_.sourceCross_id AS sourceCross_id36 FROM Vial v0_ LEFT JOIN Vial v1_ ON v0_.parent_id = v1_.id AND v1_.type IN (&apos;vial&apos;, &apos;stock&apos;, &apos;cross&apos;, &apos;injection&apos;) LEFT JOIN RackPosition r2_ ON v0_.position_id = r2_.id LEFT JOIN Stock s3_ ON v0_.stock_id = s3_.id WHERE (v0_.setupDate &amp;gt; &apos;2013-04-11&apos; AND v0_.trashed = 0) AND v0_.type IN (&apos;stock&apos;) ORDER BY v0_.setupDate DESC, v0_.id DESC&lt;/p&gt;

&lt;p&gt;Please note that ALL properties of parent have been included in the generated SQL.&lt;/p&gt;

&lt;p&gt;You can find the whole project (Symfony2) on github: &lt;a href=&quot;https://github.com/rejsmont/LabDB&quot; class=&quot;external-link&quot;&gt;https://github.com/rejsmont/LabDB&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Best,&lt;/p&gt;

&lt;p&gt;R.&lt;/p&gt;</comment>
                    <comment id="20534" author="rejsmont" created="Tue, 11 Jun 2013 09:16:16 +0000"  >&lt;p&gt;I have noticed that using the setHint(Doctrine\ORM\Query::HINT_FORCE_PARTIAL_LOAD, 1) forces partial load, however then even the entities I want loaded entirely (with proxied references) are partially loaded (i.e. all the references are forced to null, unless explicitly loaded via join). &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11612" name="CrossVial.php" size="12320" author="rejsmont" created="Tue, 11 Jun 2013 09:03:44 +0000" />
                    <attachment id="11617" name="Entity.php" size="1384" author="rejsmont" created="Tue, 11 Jun 2013 09:03:44 +0000" />
                    <attachment id="11613" name="InjectionVial.php" size="12621" author="rejsmont" created="Tue, 11 Jun 2013 09:03:44 +0000" />
                    <attachment id="11614" name="Stock.php" size="7145" author="rejsmont" created="Tue, 11 Jun 2013 09:03:44 +0000" />
                    <attachment id="11615" name="StockVial.php" size="3301" author="rejsmont" created="Tue, 11 Jun 2013 09:03:44 +0000" />
                    <attachment id="11616" name="Vial.php" size="15161" author="rejsmont" created="Tue, 11 Jun 2013 09:03:44 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

&lt;p&gt;I would vote +1 for supporting it&lt;/p&gt;</comment>
                    <comment id="20510" author="bitone" created="Mon, 10 Jun 2013 14:00:48 +0000"  >&lt;p&gt;@Benjamin Eberlei&lt;br/&gt;
The EBNF seems to indicate that any search condition is valid on the HAVING clause:&lt;br/&gt;
&lt;a href=&quot;http://savage.net.au/SQL/sql-99.bnf.html#having%20clause&quot; class=&quot;external-link&quot;&gt;http://savage.net.au/SQL/sql-99.bnf.html#having%20clause&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you look at the Search condition ( &lt;a href=&quot;http://savage.net.au/SQL/sql-99.bnf.html#search%20condition&quot; class=&quot;external-link&quot;&gt;http://savage.net.au/SQL/sql-99.bnf.html#search%20condition&lt;/a&gt; ), the NULL predictate ( &lt;a href=&quot;http://savage.net.au/SQL/sql-99.bnf.html#null%20predicate&quot; class=&quot;external-link&quot;&gt;http://savage.net.au/SQL/sql-99.bnf.html#null%20predicate&lt;/a&gt; ) seems to be a part of it.&lt;/p&gt;

&lt;p&gt;Maybe I&apos;m misinterpreting the BNF ?&lt;/p&gt;

&lt;p&gt;And if not, any idea of a targeted release for the fix ?&lt;/p&gt;</comment>
                    <comment id="20530" author="guilhermeblanco" created="Tue, 11 Jun 2013 04:46:40 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=beberlei&quot; class=&quot;user-hover&quot; rel=&quot;beberlei&quot;&gt;Benjamin Eberlei&lt;/a&gt; it seems to be SQL-92 compatible. The improvement is valid.&lt;br/&gt;
We should support it. I&apos;ll take a look into this. =)&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                    <comment id="20531" author="guilhermeblanco" created="Tue, 11 Jun 2013 05:20:51 +0000"  >&lt;p&gt;Functionality is already implemented in master as per coverage added in here:&lt;/p&gt;

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

&lt;p&gt;Closing the ticket.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2235] Single table inheritance discriminator in WHERE when using arbitrary join syntax</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2235</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The condition on the discriminator column is placed in the WHERE clause when using arbitrary join syntax, which renders LEFT JOINs useless.&lt;/p&gt;

&lt;p&gt;Given these classes:&lt;br/&gt;
A - no inheritance&lt;br/&gt;
B1 - abstract, root of a hierarchy, discriminator column is named &apos;type&apos;&lt;br/&gt;
I setup a query builder 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;
$qb-&amp;gt;select(&apos;a.id AS idA, b.id AS idB&apos;)
    -&amp;gt;from(&apos;\Entity\A&apos;, &apos;a&apos;)
    -&amp;gt;leftJoin(&apos;\Entity\B1&apos;, &apos;b&apos;, \Doctrine\ORM\Query\Expr\Join::WITH, &apos;a.something=b.something&apos;);
And the SQL Doctrine generates is something like &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;:
SELECT a.id, b.id FROM a LEFT JOIN b ON (a.something=b.something) WHERE b.type IN (&apos;1&apos;, &apos;2&apos;, &apos;3&apos;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The problems is that the WHERE condition makes the left join useless.&lt;/p&gt;

&lt;p&gt;The condition on the discriminator column should be placed in the JOIN clause to avoid the problem.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14374">DDC-2235</key>
            <summary>Single table inheritance discriminator in WHERE when using arbitrary join syntax</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="4" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="asm89">Alexander</assignee>
                                <reporter username="jay.eff">Jordi Forns</reporter>
                        <labels>
                    </labels>
                <created>Fri, 11 Jan 2013 12:45:37 +0000</created>
                <updated>Tue, 11 Jun 2013 00:56:23 +0000</updated>
                                    <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>6</votes>
                        <watches>10</watches>
                        <comments>
                    <comment id="19526" author="aearsis" created="Sun, 10 Feb 2013 21:33:15 +0000"  >&lt;p&gt;Can this be somehow worked around? If not, it is really serious problem... &lt;/p&gt;</comment>
                    <comment id="19560" author="jay.eff" created="Mon, 18 Feb 2013 16:30:42 +0000"  >&lt;p&gt;I couldn&apos;t find any workaround.&lt;br/&gt;
Trying to force the &apos;type&apos; condition in the join clause resulted useless as Doctrine would add the &apos;where&apos; condition regardless.&lt;/p&gt;</comment>
                    <comment id="19883" author="michelsalib" created="Fri, 22 Mar 2013 10:09:18 +0000"  >&lt;p&gt;Easier way to workaround right now, is to declare a OneToMany from class A to class B on a protected field (no need of getter or setter). That way you can do classic join via relationship transversing and then the condition will be placed in the ON part of the query.&lt;/p&gt;</comment>
                    <comment id="19926" author="kmusiclife" created="Mon, 1 Apr 2013 22:40:03 +0000"  >&lt;p&gt;I could access with below codes. You should use RAW SQL it is easy solution I guess. good luck.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$qb = $em-&amp;gt;createQueryBuilder();

$qb-&amp;gt;select(&apos;a, b&apos;)
-&amp;gt;from(&apos;YourEntity1&apos;, &apos;a&apos;)
-&amp;gt;leftJoin(&apos;YourEntity2&apos;, &apos;b&apos;, \Doctrine\ORM\Query\Expr\Join::WITH, &apos;a.id = b.relationId&apos;);

$raw_sql = $qb-&amp;gt;where( 
	$qb-&amp;gt;expr()-&amp;gt;in(&apos;a.relationId&apos;, $ids)
)
-&amp;gt;orderBy(&apos;a.updatedAt&apos;, &apos;DESC&apos;)
-&amp;gt;setMaxResults(10)
-&amp;gt;getQuery()-&amp;gt;getSQL();

$conn = $em-&amp;gt;getConnection();
$stmt = $conn-&amp;gt;query($raw_sql);

/* $stmt-&amp;gt;fetchAll(); &lt;span class=&quot;code-comment&quot;&gt;// access as Array */&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="19939" author="beberlei" created="Thu, 4 Apr 2013 18:37:35 +0000"  >&lt;p&gt;Assigned to Alexander&lt;/p&gt;</comment>
                    <comment id="19997" author="beberlei" created="Sun, 14 Apr 2013 09:56:47 +0000"  >&lt;p&gt;Duplicate of &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1940&quot; title=&quot;Doctrine DQL: erroneous sql generation from dql join with &amp;quot;WITH&amp;quot; or &amp;quot;WHERE&amp;quot; clause&quot;&gt;DDC-1940&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20087" author="jay.eff" created="Mon, 22 Apr 2013 09:38:15 +0000"  >&lt;p&gt;Benjamin: this bug doesn&apos;t seem to be a dupe of &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1940&quot; title=&quot;Doctrine DQL: erroneous sql generation from dql join with &amp;quot;WITH&amp;quot; or &amp;quot;WHERE&amp;quot; clause&quot;&gt;DDC-1940&lt;/a&gt;. Actually that issue doesn&apos;t seem to be a bug at all.&lt;/p&gt;

&lt;p&gt;As a reminder, the problem in this issue is that when performing arbitrary left joins on entities that are part of a class hierarchy, the discriminator condition is placed in the where clause instead of the join clause. This means that rows that could not be joined will have null values in the discriminator column and thus will not be returned because of the where condition (which will contain something like &quot; where x.discriminator in (1,2,3) &quot;).&lt;/p&gt;</comment>
                    <comment id="20120" author="tarnfeld" created="Sat, 27 Apr 2013 17:43:18 +0000"  >&lt;p&gt;Has this issue been resolved elsewhere? From reading over &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1940&quot; title=&quot;Doctrine DQL: erroneous sql generation from dql join with &amp;quot;WITH&amp;quot; or &amp;quot;WHERE&amp;quot; clause&quot;&gt;DDC-1940&lt;/a&gt; it doesn&apos;t seem to be a duplicate at all. I&apos;m experiencing the same problem as Jordi and can&apos;t seem to find a solution. Is there any particular reason the `IN ()` predicate is not a part of the join, but instead placed in the main `WHERE` clause?&lt;/p&gt;</comment>
                    <comment id="20122" author="tarnfeld" created="Sun, 28 Apr 2013 17:13:11 +0000"  >&lt;p&gt;I&apos;ve been looking into the root cause of this bug (or feature..) to try and understand why it&apos;s happening, and after trying various possible fixes (a little hard without full understanding of the Doctrine/Query internals) I&apos;ve ended up with a fix that seems to work well for my use case, at least. I&apos;ve not run any of the unit tests (I plan to, and may adjust my fix based on that) but the top revision is my change... &lt;a href=&quot;https://gist.github.com/tarnfeld/a6bb50ec707c7af1c5dc/revisions&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/tarnfeld/a6bb50ec707c7af1c5dc/revisions&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Would love some feedback.&lt;/p&gt;

&lt;p&gt;Pull request here: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/656&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/656&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20127" author="jay.eff" created="Mon, 29 Apr 2013 14:56:54 +0000"  >&lt;p&gt;Tom&apos;s fix moves the condition of the discriminator column to the LEFT JOIN, which is exactly what was needed.&lt;/p&gt;

&lt;p&gt;Alexander: could you please give it a look?&lt;/p&gt;</comment>
                    <comment id="20429" author="jay.eff" created="Thu, 23 May 2013 16:01:36 +0000"  >&lt;p&gt;Tom&apos;s proposal seems to fix the issue.&lt;/p&gt;</comment>
                    <comment id="20529" author="baohx2000" created="Tue, 11 Jun 2013 00:56:23 +0000"  >&lt;p&gt;Agree, Tom&apos;s pull request looks like it fixes the issue. Is there a reason this hasn&apos;t been merged yet?&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                <outwardlinks description="duplicates">
                            <issuelink>
            <issuekey id="13875">DDC-1940</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2497] When trying to join single-table inheritance classes in DQL or QueryBuilder, Doctrine creates incorrect SQL</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2497</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When writing a DQL query joining to inherited subclasses, Doctrine incorrectly injects the discriminator in the WHERE clause instead of in the JOIN, where it should be.&lt;br/&gt;
Example:  2 classes extend Person via JOINED table inheritance: EmployedPerson and UnemployedPerson.  I want to create a query where I pull separate class-specific properties form each class:&lt;/p&gt;

&lt;p&gt;SELECT p FROM Person p &lt;br/&gt;
LEFT JOIN EmployedPerson ep WITH ep=p&lt;br/&gt;
LEFT JOIN UnemployedPerson up WITH up=p&lt;/p&gt;

&lt;p&gt;The SQL from this will look something like:&lt;br/&gt;
SELECT .... FROM person p&lt;br/&gt;
LEFT JOIN person ep ON(ep.id=p.id)&lt;br/&gt;
LEFT JOIN person up ON(up.id=p.id)&lt;br/&gt;
WHERE ep.discrim IN(&apos;employed&apos;) AND up.discrim IN(&apos;unemployed&apos;)&lt;/p&gt;

&lt;p&gt;The problem is this query will produce no results if one of the subclasses have no results.&lt;/p&gt;

&lt;p&gt;The fix would be putting the discriminator in the JOIN so the sql would be:&lt;/p&gt;

&lt;p&gt;SELECT .... FROM person p&lt;br/&gt;
LEFT JOIN person ep ON(ep.id=p.id AND ep.discrim IN(&apos;employed&apos;))&lt;br/&gt;
LEFT JOIN person up ON(up.id=p.id AND up.discrim IN(&apos;unemployed&apos;))&lt;/p&gt;


&lt;p&gt;I will try to create a unit test based on the current ones and upload it.&lt;/p&gt;</description>
                <environment>PHP5.4, Mysql stable, ubuntu 12.04</environment>
            <key id="15035">DDC-2497</key>
            <summary>When trying to join single-table inheritance classes in DQL or QueryBuilder, Doctrine creates incorrect SQL</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="baohx2000">Gordon Forsythe</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Jun 2013 23:25:22 +0000</created>
                <updated>Tue, 11 Jun 2013 00:09:10 +0000</updated>
                    <resolved>Tue, 11 Jun 2013 00:09:10 +0000</resolved>
                            <version>2.3.4</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20526" author="baohx2000" created="Mon, 10 Jun 2013 23:32:13 +0000"  >&lt;p&gt;Sorry, this is a duplicate of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2235&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2235&lt;/a&gt;&lt;br/&gt;
I don&apos;t see where to mark as dupe...&lt;/p&gt;</comment>
                    <comment id="20528" author="ocramius" created="Tue, 11 Jun 2013 00:09:10 +0000"  >&lt;p&gt;Duplicate of &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-2235&quot; title=&quot;Single table inheritance discriminator in WHERE when using arbitrary join syntax&quot;&gt;DDC-2235&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2483] [GH-684] Cancel load entity exception</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2483</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 TomHAnderson:&lt;/p&gt;

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

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

&lt;p&gt;Gives the developer an exception to throw in postLoad which will cancel the loading of the entity into the EntityManager&lt;/p&gt;</description>
                <environment></environment>
            <key id="15011">DDC-2483</key>
            <summary>[GH-684] Cancel load entity exception</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Mon, 3 Jun 2013 21:50:57 +0000</created>
                <updated>Mon, 10 Jun 2013 17:09:23 +0000</updated>
                    <resolved>Mon, 10 Jun 2013 17:09:23 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20506" author="doctrinebot" created="Sat, 8 Jun 2013 16:30:23 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-684&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/684&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/684&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20516" author="fabio.bat.silva" created="Mon, 10 Jun 2013 17:09:23 +0000"  >&lt;p&gt;See &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/684&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/684&lt;/a&gt; for more information&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2493] [GH-689] [WIP][DDC-1995 ] Support metadata class as parameter for instance of expression</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2493</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of FabioBatSilva:&lt;/p&gt;

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

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

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

&lt;p&gt;This is a possible solution for &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1995&quot; title=&quot;&amp;quot;Query Exception: Invalid parameter number: number of bound variables does not match number of tokens&amp;quot; when using an &amp;quot;Instance Of&amp;quot; expression&quot;&gt;&lt;del&gt;DDC-1995&lt;/del&gt;&lt;/a&gt;(&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1995&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1995&lt;/a&gt;),&lt;/p&gt;

&lt;p&gt;I&apos;ve attempted some diferent ways to fix this problem without success.&lt;br/&gt;
Anyway, RSM still looks like the wrong place to parameters mapping.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15027">DDC-2493</key>
            <summary>[GH-689] [WIP][DDC-1995 ] Support metadata class as parameter for instance of expression</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Fri, 7 Jun 2013 21:33:21 +0000</created>
                <updated>Fri, 7 Jun 2013 22:02:03 +0000</updated>
                    <resolved>Fri, 7 Jun 2013 22:02:03 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20500" author="doctrinebot" created="Fri, 7 Jun 2013 21:43:06 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-689&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/689&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/689&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20505" author="fabio.bat.silva" created="Fri, 7 Jun 2013 22:02:03 +0000"  >&lt;p&gt;Merged : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/462173ad71ae63cd9877e1e642f7968ed1f9971b&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/462173ad71ae63cd9877e1e642f7968ed1f9971b&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1995] &quot;Query Exception: Invalid parameter number: number of bound variables does not match number of tokens&quot; when using an &quot;Instance Of&quot; expression</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1995</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Similar to &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1848&quot; class=&quot;external-link&quot;&gt;this issue&lt;/a&gt; I think, but triggered when performing a query on entities modelled with Class Table Inheritance, e.g.&lt;/p&gt;

&lt;p&gt;$qb = $repository-&amp;gt;createQueryBuilder(&apos;entity&apos;);&lt;br/&gt;
$metadata = $em-&amp;gt;getClassMetadata($class);&lt;br/&gt;
$qb-&amp;gt;where(&apos;entity INSTANCE OF :type&apos;)-&amp;gt;setParameter(&apos;type&apos;, $metadata);&lt;br/&gt;
$qb-&amp;gt;getQuery()-&amp;gt;execute();&lt;/p&gt;

&lt;p&gt;Seems that there isn&apos;t a corresponding entry in the parameter mapping array for this clause, which triggers the exception at line 254 of Doctrine\ORM\Query:&lt;/p&gt;

&lt;p&gt;if (count($paramMappings) != count($this-&amp;gt;parameters)) &lt;/p&gt;
{
    throw QueryException::invalidParameterNumber();
}</description>
                <environment></environment>
            <key id="13982">DDC-1995</key>
            <summary>&quot;Query Exception: Invalid parameter number: number of bound variables does not match number of tokens&quot; when using an &quot;Instance Of&quot; expression</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="craigmarvelley">Craig Marvelley</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 Aug 2012 14:13:39 +0000</created>
                <updated>Fri, 7 Jun 2013 21:59:04 +0000</updated>
                    <resolved>Fri, 7 Jun 2013 21:59:04 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.4</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="18532" author="craigmarvelley" created="Wed, 22 Aug 2012 14:24:48 +0000"  >&lt;p&gt;Pull request with a potential fix: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/429&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/429&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18566" author="beberlei" created="Wed, 29 Aug 2012 11:53:15 +0000"  >&lt;p&gt;Assigned to Guilherme&lt;/p&gt;</comment>
                    <comment id="20504" author="fabio.bat.silva" created="Fri, 7 Jun 2013 21:59:04 +0000"  >&lt;p&gt;Fixed : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/462173ad71ae63cd9877e1e642f7968ed1f9971b&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/462173ad71ae63cd9877e1e642f7968ed1f9971b&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

&lt;p&gt;Cheers,&lt;br/&gt;
Craig&lt;/p&gt;</description>
                <environment></environment>
            <key id="13983">DDC-1996</key>
            <summary>[GH-429] Ensure a parameter mapping entry exists for InstanceOf DQL expressions</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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, 22 Aug 2012 14:23:10 +0000</created>
                <updated>Fri, 7 Jun 2013 21:58:03 +0000</updated>
                    <resolved>Fri, 7 Jun 2013 21:58:03 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20502" author="doctrinebot" created="Fri, 7 Jun 2013 21:55:52 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-429&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/429&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/429&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20503" author="fabio.bat.silva" created="Fri, 7 Jun 2013 21:58:03 +0000"  >&lt;p&gt;Fixed by : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/462173ad71ae63cd9877e1e642f7968ed1f9971b&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/462173ad71ae63cd9877e1e642f7968ed1f9971b&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

&lt;p&gt;Same query works fine in Doctrine 2.3&lt;/p&gt;</description>
                <environment>Using Doctrine in Symfony 2.2.1 on Windows Platform</environment>
            <key id="14847">DDC-2441</key>
            <summary>Incorrect SQL Query being generated</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://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="manseuk">Paul Mansell</reporter>
                        <labels>
                    </labels>
                <created>Thu, 9 May 2013 16:31:03 +0000</created>
                <updated>Fri, 7 Jun 2013 21:36:32 +0000</updated>
                    <resolved>Fri, 7 Jun 2013 21:35:21 +0000</resolved>
                            <version>2.4</version>
                                <fixVersion>2.4</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="20478" author="guilhermeblanco" created="Wed, 5 Jun 2013 05:13:10 +0000"  >&lt;p&gt;Which version of SQL Server are you using?&lt;/p&gt;</comment>
                    <comment id="20479" author="guilhermeblanco" created="Wed, 5 Jun 2013 05:14:08 +0000"  >&lt;p&gt;Seems to be related to &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-2470&quot; title=&quot;Sql Server error in createQuery using ORDER BY and setMaxResults&quot;&gt;&lt;del&gt;DDC-2470&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20483" author="manseuk" created="Wed, 5 Jun 2013 17:23:12 +0000"  >&lt;p&gt;Im using SQL Server 2008 ... yes does seem the same / similar error&lt;/p&gt;</comment>
                    <comment id="20493" author="fabio.bat.silva" created="Fri, 7 Jun 2013 00:25:08 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=manseuk&quot; class=&quot;user-hover&quot; rel=&quot;manseuk&quot;&gt;Paul Mansell&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Could you please test this branch &lt;a href=&quot;https://github.com/FabioBatSilva/dbal/tree/DDC-2470&quot; class=&quot;external-link&quot;&gt;DDC-2470&lt;/a&gt; with this &lt;a href=&quot;https://github.com/FabioBatSilva/dbal/commit/72670d263fd35ca30a2d90afb85838a9795bd9b8&quot; class=&quot;external-link&quot;&gt;fix&lt;/a&gt; in your environment ?&lt;/p&gt;

&lt;p&gt;Thanks..&lt;/p&gt;</comment>
                    <comment id="20497" author="fabio.bat.silva" created="Fri, 7 Jun 2013 21:35:21 +0000"  >&lt;p&gt;Merged : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/753d63c2d48facdecba5d84f6ed2450024de2867&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/753d63c2d48facdecba5d84f6ed2450024de2867&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20498" author="fabio.bat.silva" created="Fri, 7 Jun 2013 21:36:32 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=manseuk&quot; class=&quot;user-hover&quot; rel=&quot;manseuk&quot;&gt;Paul Mansell&lt;/a&gt;, please let us know if the problem continues after update&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2470] Sql Server error in createQuery using ORDER BY and setMaxResults</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2470</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;h4&gt;&lt;a name=&quot;Important%3AThisissueonlyaffectto2.4.%5Cversions&quot;&gt;&lt;/a&gt;Important: This issue only affect to 2.4.&amp;#42; versions&lt;/h4&gt;


&lt;p&gt;When executing&lt;/p&gt;

&lt;div class=&quot;code panel&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 m.nombre
     , m.fechainicio
     , m.fechafin 
  FROM Bundle:Medicion m
  JOIN m.estudio e
  JOIN e.cliente c
  JOIN c.usuarios u
 WHERE u.id = :id
 ORDER BY m.fechainicio DESC
&apos;)
-&amp;gt;setMaxResults(12);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Get 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;
An exception occurred &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; executing &apos;
SELECT * 
  FROM (
           SELECT m0_.NOMBRE AS NOMBRE0
                , m0_.FECHAINICIO AS FECHAINICIO1
                , m0_.FECHAFIN AS FECHAFIN2
                , ROW_NUMBER() OVER (ORDER BY FECHAINICIO1 DESC) AS doctrine_rownum 
             FROM MEDICION m0_ WITH (NOLOCK) 
            INNER JOIN ESTUDIO e1_ 
               ON m0_.ESTUDIO_ID = e1_.ID 
            INNER JOIN CLIENTE c2_ 
               ON e1_.CLIENTE_ID = c2_.ID 
            INNER JOIN USUARIO u3_ 
               ON c2_.ID = u3_.CLIENTE_ID WHERE u3_.ID = ?
       ) AS doctrine_tbl 
 WHERE doctrine_rownum BETWEEN 1 AND 12
&apos; with params [2]:
&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;
SQLSTATE[42S22]: [Microsoft][SQL Server Native Client 11.0][SQL Server]El nombre de columna &apos;FECHAINICIO1&apos; no es v&#225;lido.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Attached the BD model&lt;/p&gt;

&lt;p&gt;Added extra info!&lt;/p&gt;

&lt;p&gt;Engine version: Sql server 2008 R2&lt;/p&gt;

&lt;p&gt;When executing this SQL (returned by doctrine error) on Management Studio&lt;/p&gt;
&lt;div class=&quot;code panel&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 m0_.NOMBRE AS NOMBRE0, m0_.FECHAINICIO AS FECHAINICIO1, m0_.FECHAFIN AS FECHAFIN2, ROW_NUMBER() OVER (ORDER BY FECHAINICIO1 DESC) AS doctrine_rownum FROM MEDICION m0_ WITH (NOLOCK) INNER JOIN ESTUDIO e1_ ON m0_.ESTUDIO_ID = e1_.ID INNER JOIN CLIENTE c2_ ON e1_.CLIENTE_ID = c2_.ID INNER JOIN USUARIO u3_ ON c2_.ID = u3_.CLIENTE_ID WHERE u3_.ID = 12) AS doctrine_tbl WHERE doctrine_rownum BETWEEN 1 AND 12
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Get 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;
El nombre de columna &apos;FECHAINICIO1&apos; no es v&#225;lido. (&apos;FECHAINICIO1&apos; is invalid)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But if change &quot;FECHAINICIO1&quot;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
... OVER (ORDER BY FECHAINICIO1 DESC) AS doctrine_rownum FROM...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;by 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;
... OVER (ORDER BY m0_.FECHAINICIO DESC) AS doctrine_rownum FROM...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Don&apos;t get error&lt;/p&gt;


&lt;p&gt;regards&lt;br/&gt;
Jonnatan Oyarz&#250;n&lt;/p&gt;</description>
                <environment>Windows 7,  Apache 2 (xampp 1.8.1), PHP 5.4.7, Symfony 2.2.1</environment>
            <key id="14989">DDC-2470</key>
            <summary>Sql Server error in createQuery using ORDER BY and setMaxResults</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="1" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/blocker.png">Blocker</priority>
                    <status id="5" iconUrl="http://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="jonsxaero">Jonnatan Oyarz&#250;n</reporter>
                        <labels>
                        <label>dql</label>
                        <label>sqlserver</label>
                    </labels>
                <created>Fri, 24 May 2013 16:27:41 +0000</created>
                <updated>Fri, 7 Jun 2013 21:34:56 +0000</updated>
                    <resolved>Fri, 7 Jun 2013 21:34:56 +0000</resolved>
                            <version>2.4</version>
                                <fixVersion>2.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="20477" author="guilhermeblanco" created="Wed, 5 Jun 2013 05:11:27 +0000"  >&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Which version of SQL Server are you working on?&lt;/li&gt;
	&lt;li&gt;Also, could you please verify 2 queries for us?&lt;br/&gt;
This one should not work:&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&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; m0_.NOMBRE AS NOMBRE0
     , m0_.FECHAINICIO AS FECHAINICIO1
     , m0_.FECHAFIN AS FECHAFIN2 
  &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; MEDICION m0_ 
 ORDER &lt;span class=&quot;code-keyword&quot;&gt;BY&lt;/span&gt; FECHAINICIO1 DESC
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This one 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-sql&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; m0_.NOMBRE AS NOMBRE0
     , m0_.FECHAINICIO AS FECHAINICIO1
     , m0_.FECHAFIN AS FECHAFIN2 
  &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; MEDICION m0_ 
 ORDER &lt;span class=&quot;code-keyword&quot;&gt;BY&lt;/span&gt; m0_.FECHAINICIO DESC
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As soon as you get this it may define the approach on how we&apos;re gonna fix the issue. =)&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;

&lt;p&gt;Guilherme Blanco&lt;/p&gt;</comment>
                    <comment id="20480" author="jonsxaero" created="Wed, 5 Jun 2013 13:04:48 +0000"  >&lt;p&gt;Add extra info&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;

&lt;p&gt;Jonnatan Oyarz&#250;n&lt;/p&gt;</comment>
                    <comment id="20484" author="fabio.bat.silva" created="Wed, 5 Jun 2013 18:07:53 +0000"  >&lt;p&gt;Hi Jonnatan&lt;/p&gt;

&lt;p&gt;There is a possible &lt;a href=&quot;https://github.com/FabioBatSilva/dbal/commit/72670d263fd35ca30a2d90afb85838a9795bd9b8&quot; class=&quot;external-link&quot;&gt;fix&lt;/a&gt; in this branch : &lt;a href=&quot;https://github.com/FabioBatSilva/dbal/tree/DDC-2470&quot; class=&quot;external-link&quot;&gt;DDC-2470&lt;/a&gt;,&lt;br/&gt;
but i&apos;m not able to test it right now..&lt;/p&gt;

&lt;p&gt;Could you please test it in your environment ?&lt;/p&gt;

&lt;p&gt;Thanks..&lt;/p&gt;</comment>
                    <comment id="20485" author="jonsxaero" created="Wed, 5 Jun 2013 18:49:12 +0000"  >&lt;p&gt;Hi Fabio&lt;/p&gt;

&lt;p&gt;Thank you very much for posting this fix.&lt;br/&gt;
From your &lt;a href=&quot;https://github.com/FabioBatSilva/dbal/tree/DDC-2470&quot; class=&quot;external-link&quot;&gt;DDC-2470&lt;/a&gt;, I downloaded and pasted files in vendor\doctrine\dbal.&lt;br/&gt;
Fix is working for me!.&lt;/p&gt;

&lt;p&gt;The question is, when this fix could be merged to dbal/master branch?&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Jonnatan Oyarz&#250;n&lt;/p&gt;</comment>
                    <comment id="20486" author="fabio.bat.silva" created="Wed, 5 Jun 2013 21:01:24 +0000"  >&lt;p&gt;Thanks Jonnatan,&lt;/p&gt;

&lt;p&gt;I&apos;ve created a pull request : &lt;a href=&quot;https://github.com/doctrine/dbal/pull/332&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/332&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20496" author="fabio.bat.silva" created="Fri, 7 Jun 2013 21:34:56 +0000"  >&lt;p&gt;Fixed : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/753d63c2d48facdecba5d84f6ed2450024de2867&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/753d63c2d48facdecba5d84f6ed2450024de2867&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11611" name="BD.png" size="320773" author="jonsxaero" created="Fri, 24 May 2013 16:27:41 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-54] Trigger postLoad events and callbacks after associations have been initialized</title>
                <link>http://doctrine-project.org/jira/browse/DDC-54</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Currently the postLoad events and callbacks are triggered after the entity has been created and filled with its &quot;primitive&quot; state but before associations are available. The postLoad events and callbacks should be postponed so that they are triggered after associations have been initialized.&lt;/p&gt;</description>
                <environment></environment>
            <key id="10198">DDC-54</key>
            <summary>Trigger postLoad events and callbacks after associations have been initialized</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/inprogress.png">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="romanb">Roman S. Borschel</reporter>
                        <labels>
                    </labels>
                <created>Thu, 15 Oct 2009 18:34:38 +0000</created>
                <updated>Fri, 7 Jun 2013 19:27:05 +0000</updated>
                                    <version>2.0-ALPHA2</version>
                                <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>6</votes>
                        <watches>7</watches>
                        <comments>
                    <comment id="14159" author="romanb" created="Mon, 30 Aug 2010 06:36:48 +0000"  >&lt;p&gt;If this is to be included in 2.0 it needs to happen for RC1. However, it is not clear yet whether it will be done in time.&lt;/p&gt;</comment>
                    <comment id="14454" author="beberlei" created="Thu, 23 Sep 2010 17:57:07 +0000"  >&lt;p&gt;How would you solve this Roman? I thought of adding a query hint so that the postLoad inside unit of work is not triggered and gathering all the entities that have a post load event in an array inside the object hydrator, then iterating it after taking the snapshots of all collections inside hydrateAll&lt;/p&gt;</comment>
                    <comment id="14461" author="romanb" created="Fri, 24 Sep 2010 14:37:25 +0000"  >&lt;p&gt;@Benjamin: Not sure what you would use the query hint for but in general that is the approach I had in mind, yes. You can&apos;t get around iterating over the entities after the actual hydration.&lt;/p&gt;</comment>
                    <comment id="14477" author="beberlei" created="Mon, 27 Sep 2010 16:45:30 +0000"  >&lt;p&gt;The query hint would do something like:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;        &lt;span class=&quot;code-comment&quot;&gt;//TODO: These should be invoked later, after hydration, because associations may not yet be loaded here.
&lt;/span&gt;        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($class-&amp;gt;lifecycleCallbacks[Events::postLoad]) &amp;amp;&amp;amp; !isset($hints[&apos;hydrationPostLoad&apos;])) {
            $class-&amp;gt;invokeLifecycleCallbacks(Events::postLoad, $entity);
        }
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;evm-&amp;gt;hasListeners(Events::postLoad) &amp;amp;&amp;amp; !isset($hints[&apos;hydrationPostLoad&apos;])) {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;evm-&amp;gt;dispatchEvent(Events::postLoad, &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; LifecycleEventArgs($entity, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em));
        }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;another way would be to move that code out of UoW::createEntity completly and have the persisters call it when they use that method.&lt;/p&gt;</comment>
                    <comment id="14486" author="romanb" created="Tue, 28 Sep 2010 16:11:38 +0000"  >&lt;p&gt;Leaving that code in UoW does not make sense to me, if it is moved, it needs to be moved completely. Why do you think the persisters should do it? Initially I thought collecting the affected entities during hydration and then when hydration is done iterating over them and triggering the postLoad events.&lt;/p&gt;</comment>
                    <comment id="14488" author="beberlei" created="Tue, 28 Sep 2010 16:30:04 +0000"  >&lt;p&gt;Yes but postLoad has to be triggered for non Hydrated entities (i.e. Persister) also&lt;/p&gt;</comment>
                    <comment id="14620" author="beberlei" created="Sat, 30 Oct 2010 11:36:57 +0000"  >&lt;p&gt;Moved back&lt;/p&gt;</comment>
                    <comment id="17849" author="cakper" created="Sun, 15 Apr 2012 19:51:18 +0000"  >&lt;p&gt;Hi Gyus, I need access to associations in postLoad or similar event, and my idea is to dispatch new event after full initialisation of object, what do You think about it? If I can help please let me know &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; It&apos;s important for me.&lt;/p&gt;</comment>
                    <comment id="18731" author="brizzz" created="Tue, 25 Sep 2012 21:41:06 +0000"  >&lt;p&gt;Now in my PostLoad access to associations is work fine. Why this issue is still in Unresolved status?&lt;/p&gt;</comment>
                    <comment id="18822" author="chives" created="Thu, 11 Oct 2012 10:37:46 +0000"  >&lt;p&gt;What do you (Roman and Benjamin) think about adding postHydrate event which would be called within ObjectHydrator::hydrateAllData() on every entity collected during hydration? I could prepare a patch for this. I personally think this would be better than adding a hint that changes behaviour of postLoad event.&lt;/p&gt;</comment>
                    <comment id="20495" author="slavik2121" created="Fri, 7 Jun 2013 18:58:10 +0000"  >&lt;p&gt;Just stumbled upon this issue. Seems like my associated entities aren&apos;t yet loaded in PostLoad event handler.&lt;br/&gt;
Doctrine version &quot;doctrine/orm&quot;: &quot;2.3.1&quot;&lt;/p&gt;

&lt;p&gt;I&apos;ve noticed that I have two different paths of execution: &lt;br/&gt;
1. When the find() method is used to retrieve the entity, SimpleObjectHydrator is used to perform a hydration and the associations are made available in PostLoad event:&lt;br/&gt;
	bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php.Doctrine\ORM\Mapping\ClassMetadataInfo-&amp;gt;invokeLifecycleCallbacks : lineno 2312() bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 2312	&lt;br/&gt;
	bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php.Doctrine\ORM\UnitOfWork-&amp;gt;createEntity : lineno 2610() bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php at line 2610	&lt;br/&gt;
	bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php.Doctrine\ORM\Internal\Hydration\SimpleObjectHydrator-&amp;gt;hydrateRowData : lineno 135() bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php at line 135	&lt;br/&gt;
	bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php.Doctrine\ORM\Internal\Hydration\SimpleObjectHydrator-&amp;gt;hydrateAllData : lineno 50() bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php at line 50	&lt;br/&gt;
	bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php.Doctrine\ORM\Internal\Hydration\AbstractHydrator-&amp;gt;hydrateAll : lineno 111() bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php at line 111	&lt;br/&gt;
	bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php.Doctrine\ORM\Persisters\BasicEntityPersister-&amp;gt;load : lineno 678() bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php at line 678	&lt;br/&gt;
	bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php.Doctrine\ORM\EntityManager-&amp;gt;find : lineno 413() bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php at line 413	&lt;br/&gt;
	bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php.Doctrine\ORM\EntityRepository-&amp;gt;find : lineno 131() bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php at line 131&lt;/p&gt;

&lt;p&gt;2. When the DQL is used, ObjectHydrator is used to perform a hydration, and the associations aren&apos;t made ready in PostLoad event:&lt;br/&gt;
	bvdpetroleum/src/BVD/PetroleumBundle/Entity/FuelCard.php.BVD\PetroleumBundle\Entity\FuelCard-&amp;gt;retrieveNumbers : lineno 304() bvdpetroleum/src/BVD/PetroleumBundle/Entity/FuelCard.php at line 304	&lt;br/&gt;
	bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php.Doctrine\ORM\Mapping\ClassMetadataInfo-&amp;gt;invokeLifecycleCallbacks : lineno 2312() bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 2312	&lt;br/&gt;
	bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php.Doctrine\ORM\UnitOfWork-&amp;gt;createEntity : lineno 2610() bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php at line 2610	&lt;br/&gt;
	bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php.Doctrine\ORM\Internal\Hydration\ObjectHydrator-&amp;gt;_getEntity : lineno 245() bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php at line 245	&lt;br/&gt;
	bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php.Doctrine\ORM\Internal\Hydration\ObjectHydrator-&amp;gt;hydrateRowData : lineno 478() bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php at line 478	&lt;br/&gt;
	bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php.Doctrine\ORM\Internal\Hydration\ObjectHydrator-&amp;gt;hydrateAllData : lineno 149() bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php at line 149	&lt;br/&gt;
	bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php.Doctrine\ORM\Internal\Hydration\AbstractHydrator-&amp;gt;hydrateAll : lineno 111() bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php at line 111	&lt;br/&gt;
	bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php.Doctrine\ORM\AbstractQuery-&amp;gt;execute : lineno 747() bvdpetroleum/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php at line 747	&lt;/p&gt;

&lt;p&gt;Hope this helps to solve the issue.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2491] [GH-687] Fixed rendering</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2491</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 mnapoli:&lt;/p&gt;

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

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

&lt;p&gt;Fixed some broken rendering on &lt;a href=&quot;http://docs.doctrine-project.org/en/latest/reference/yaml-mapping.html&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/en/latest/reference/yaml-mapping.html&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15024">DDC-2491</key>
            <summary>[GH-687] Fixed rendering</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Thu, 6 Jun 2013 08:36:34 +0000</created>
                <updated>Thu, 6 Jun 2013 08:53:19 +0000</updated>
                    <resolved>Thu, 6 Jun 2013 08:53:19 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20488" author="doctrinebot" created="Thu, 6 Jun 2013 08:51:57 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-687&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/687&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/687&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20489" author="ocramius" created="Thu, 6 Jun 2013 08:53:19 +0000"  >&lt;p&gt;Merged at &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/5c7b98b2a990a1d7a6140e2c875f5ab6c3dc6f9f&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/5c7b98b2a990a1d7a6140e2c875f5ab6c3dc6f9f&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2490] EAGER associations are sometimes fetched through a Proxy non-eagerly</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2490</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In the UOW deferred eager load only works for single identifier classes.  But the implementation of deferred eager load uses a Proxy which lazy loads.  A boolean condition must be added to only use this deferred approach for non-EAGER relationships.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15021">DDC-2490</key>
            <summary>EAGER associations are sometimes fetched through a Proxy non-eagerly</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="tom_anderson">Tom Anderson</reporter>
                        <labels>
                    </labels>
                <created>Wed, 5 Jun 2013 17:13:28 +0000</created>
                <updated>Thu, 6 Jun 2013 03:43:24 +0000</updated>
                    <resolved>Thu, 6 Jun 2013 03:43:24 +0000</resolved>
                            <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20487" author="tom_anderson" created="Thu, 6 Jun 2013 03:43:13 +0000"  >&lt;p&gt;This was caused because I was changing entities in postLoad based on == $entityClass vs instanceOf $entityClass so Proxies were not being processed in my function.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2488] [GH-686] [DDC-2475] Replace OrderBy mapping when OrderByClause is given</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2488</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of FabioBatSilva:&lt;/p&gt;

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

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

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2475&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2475&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15019">DDC-2488</key>
            <summary>[GH-686] [DDC-2475] Replace OrderBy mapping when OrderByClause is given</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Wed, 5 Jun 2013 03:59:56 +0000</created>
                <updated>Wed, 5 Jun 2013 14:10:44 +0000</updated>
                    <resolved>Wed, 5 Jun 2013 14:10:44 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20476" author="doctrinebot" created="Wed, 5 Jun 2013 05:04:01 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-686&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/686&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/686&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20482" author="fabio.bat.silva" created="Wed, 5 Jun 2013 14:10:44 +0000"  >&lt;p&gt;Merged : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/753d63c2d48facdecba5d84f6ed2450024de2867&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/753d63c2d48facdecba5d84f6ed2450024de2867&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2475] ORDER BY on existing column is added, not replaced</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2475</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It seems that if an entity has an existing ORDER BY clause on a relation that any subsequent ORDER BYs on that field are added instead of replaced.&lt;/p&gt;

&lt;p&gt;For example, I have two entities: Person and Membership. Person.Memberships has the following clause specified:&lt;/p&gt;

&lt;p&gt;@ORM\OrderBy(&lt;/p&gt;
{&quot;createDate&quot; = &quot;DESC&quot;}
&lt;p&gt;)&lt;/p&gt;

&lt;p&gt;I also have a repository method that uses this relationship and sets the following DQL:&lt;/p&gt;

&lt;p&gt;SELECT person, m&lt;br/&gt;
FROM \Company\Person person&lt;br/&gt;
JOIN person.memberships m&lt;br/&gt;
ORDER BY m.createDate ASC&lt;/p&gt;

&lt;p&gt;I would expect this query to replace the existing ORDER BY with ORDER BY m.createDate ASC. Instead, it adds the ORDER BY to the existing one, which makes the end result: ORDER BY m.createDate ASC, m.createDate DESC.&lt;/p&gt;

&lt;p&gt;This is obviously causing an issue since you can&apos;t sort by the same column in different order. Is this behavior by design? If so, is there a way to override the existing ORDER BY setting?&lt;/p&gt;</description>
                <environment></environment>
            <key id="14999">DDC-2475</key>
            <summary>ORDER BY on existing column is added, not replaced</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="jeremylivingston">Jeremy Livingston</reporter>
                        <labels>
                    </labels>
                <created>Tue, 28 May 2013 18:24:17 +0000</created>
                <updated>Wed, 5 Jun 2013 14:09:12 +0000</updated>
                    <resolved>Wed, 5 Jun 2013 14:09:12 +0000</resolved>
                            <version>2.3</version>
                                <fixVersion>2.4</fixVersion>
                                <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20481" author="fabio.bat.silva" created="Wed, 5 Jun 2013 14:09:12 +0000"  >&lt;p&gt;Fixed : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/753d63c2d48facdecba5d84f6ed2450024de2867&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/753d63c2d48facdecba5d84f6ed2450024de2867&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2487] UnitOfWork::getEntityIdentifier() contains objects when custom mapping types are part of an entity&apos;s identity</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2487</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;m using a custom mapping type for a &lt;tt&gt;LocalDate&lt;/tt&gt; class (mapped to a &lt;tt&gt;DATE&lt;/tt&gt; field in the MySQL database).&lt;/p&gt;

&lt;p&gt;Given the following entity:&lt;/p&gt;

&lt;div class=&quot;code panel&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 Timeslot
{
    /**
     * @Id
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Restaurant&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $restaurant;

    /**
     * @Id
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;localdate&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $date;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When &lt;tt&gt;var_export()&lt;/tt&gt; -ing the result of &lt;tt&gt;UnitOfWork::getEntityIdentifier()&lt;/tt&gt; on an instance of this class, the result is similar to:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
array(
	&apos;restaurant&apos; =&amp;gt; &apos;5&apos;,
	&apos;date&apos; =&amp;gt; LocalDate::__set_state(array(&apos;year&apos; =&amp;gt; 2013, &apos;month&apos; =&amp;gt; 6, &apos;day&apos; =&amp;gt; 26))
)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is a bit weird, because as far as I understand it, it should return the identity as it maps to database fields: &lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
array(
	&apos;restaurant&apos; =&amp;gt; &apos;5&apos;,
	&apos;date&apos; =&amp;gt; &apos;2013-06-26&apos;
)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If we take the &lt;tt&gt;$restaurant&lt;/tt&gt; example, it returns the restaurant ID, and not the &lt;tt&gt;Restaurant&lt;/tt&gt; entity, so my opinion is that it should be the same for &lt;tt&gt;$date&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Shouldn&apos;t the &lt;tt&gt;UnitOfWork&lt;/tt&gt; use &lt;tt&gt;Type::convertToDatabaseValue()&lt;/tt&gt; on custom mapping types to infer their value, when computing the identity of an entity?&lt;/p&gt;
</description>
                <environment></environment>
            <key id="15016">DDC-2487</key>
            <summary>UnitOfWork::getEntityIdentifier() contains objects when custom mapping types are part of an entity&apos;s identity</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="benjamin">Benjamin Morel</reporter>
                        <labels>
                        <label>identity</label>
                    </labels>
                <created>Tue, 4 Jun 2013 13:35:55 +0000</created>
                <updated>Tue, 4 Jun 2013 14:42:17 +0000</updated>
                                    <version>2.3.4</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20472" author="ocramius" created="Tue, 4 Jun 2013 14:13:37 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=benjamin&quot; class=&quot;user-hover&quot; rel=&quot;benjamin&quot;&gt;Benjamin Morel&lt;/a&gt; why would getEntityIdentifier convert types? The UoW doesn&apos;t worry about the DBAL representation of the objects - actually, the UoW doesn&apos;t know of the DBAL at all.&lt;/p&gt;</comment>
                    <comment id="20473" author="benjamin" created="Tue, 4 Jun 2013 14:33:49 +0000"  >&lt;p&gt;Your point is valid, but that&apos;s still annoying. Why would getEntityIdentifier() return objects?&lt;br/&gt;
By the way, &lt;tt&gt;UnitOfWork&lt;/tt&gt; is aware of &lt;tt&gt;EntityManager&lt;/tt&gt;, and thus the &lt;tt&gt;Connection&lt;/tt&gt;, and thus the &lt;tt&gt;Platform&lt;/tt&gt;!&lt;br/&gt;
It does use the &lt;tt&gt;Connection&lt;/tt&gt; in &lt;tt&gt;commit()&lt;/tt&gt;.&lt;/p&gt;</comment>
                    <comment id="20474" author="ocramius" created="Tue, 4 Jun 2013 14:38:28 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=benjamin&quot; class=&quot;user-hover&quot; rel=&quot;benjamin&quot;&gt;Benjamin Morel&lt;/a&gt; that is because that is the identifier in your object. It&apos;s composed by the identifier of an associated entity and a datetime object (scalar)&lt;/p&gt;</comment>
                    <comment id="20475" author="benjamin" created="Tue, 4 Jun 2013 14:42:17 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=ocramius&quot; class=&quot;user-hover&quot; rel=&quot;ocramius&quot;&gt;Marco Pivetta&lt;/a&gt; Then why does it return the restaurant ID, and not the &lt;tt&gt;Restaurant&lt;/tt&gt; object?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2485] [GH-685] Functional ticket for DDC-2484</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2485</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 TomHAnderson:&lt;/p&gt;

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

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

&lt;p&gt;This shows how the postLoad can change an entity but associations are not passed through postLoad&lt;/p&gt;</description>
                <environment></environment>
            <key id="15013">DDC-2485</key>
            <summary>[GH-685] Functional ticket for DDC-2484</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Mon, 3 Jun 2013 22:58:57 +0000</created>
                <updated>Mon, 3 Jun 2013 22:58:57 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2481] [GH-682] onLoad Event</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2481</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 TomHAnderson:&lt;/p&gt;

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

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

&lt;p&gt;This PR implements the onLoad event which provides a mutable entity and entity load cancellation.  &lt;/p&gt;</description>
                <environment></environment>
            <key id="15008">DDC-2481</key>
            <summary>[GH-682] onLoad Event</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="4">Incomplete</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Mon, 3 Jun 2013 06:36:57 +0000</created>
                <updated>Mon, 3 Jun 2013 20:26:27 +0000</updated>
                    <resolved>Mon, 3 Jun 2013 20:26:27 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20470" author="doctrinebot" created="Mon, 3 Jun 2013 19:21:39 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-682&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/682&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/682&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20471" author="ocramius" created="Mon, 3 Jun 2013 20:26:27 +0000"  >&lt;p&gt;Closed in favour of another approach.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2482] [GH-683] Explicitely state what the problem is</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2482</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 greg0ire:&lt;/p&gt;

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

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

&lt;p&gt;People like me think the problem is that there is no association&lt;br/&gt;
mapping, when the problem in fact could be that there also is a field&lt;br/&gt;
mapping on the property.&lt;br/&gt;
This message makes it clearer why we are getting an error message.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15009">DDC-2482</key>
            <summary>[GH-683] Explicitely state what the problem is</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Mon, 3 Jun 2013 10:15:19 +0000</created>
                <updated>Mon, 3 Jun 2013 10:38:08 +0000</updated>
                    <resolved>Mon, 3 Jun 2013 10:37:57 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20467" author="doctrinebot" created="Mon, 3 Jun 2013 10:37:45 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-683&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/683&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/683&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20468" author="ocramius" created="Mon, 3 Jun 2013 10:37:57 +0000"  >&lt;p&gt;Merged at &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/3d6436c2f337d9e276c232e81a0e444edca98c8f&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/3d6436c2f337d9e276c232e81a0e444edca98c8f&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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


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

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

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

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

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

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

<item>
            <title>[DDC-2477] [GH-681] Sequence generator fix</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2477</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 lighthart:&lt;/p&gt;

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

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

&lt;p&gt;$this-&amp;gt;_sequenceName=$em-&amp;gt;getClassMetadata(get_class($entity))-&amp;gt;sequenceGeneratorDefinition&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;sequenceName&amp;#39;&amp;#93;&lt;/span&gt;;&lt;/p&gt;

&lt;p&gt;The sequence generator does not read the class metadata, so if there is table remapping via event listeners, any new entity won&apos;t have the appropriate changes in table names.&lt;/p&gt;

&lt;p&gt;This pull request adds a remap the Sequence Generator to read the class metadata to determine the sequence name if there is an entity passed to the generate function.&lt;/p&gt;

&lt;p&gt;Tests: 1854, Assertions: 6224, Skipped: 96.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15002">DDC-2477</key>
            <summary>[GH-681] Sequence generator fix</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Wed, 29 May 2013 17:41:46 +0000</created>
                <updated>Wed, 29 May 2013 17:41:46 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2131] Fetch join not working on class table inheritance</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2131</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have an entity Appointment, that is associated with application forms.&lt;br/&gt;
I have an abstract class AbstractApplicationForm that has multiple (6) child classes.&lt;/p&gt;

&lt;p&gt;The mapping info for the abstract application form looks like this:&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;AbstractApplicationForm.php&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * @ORM\Entity()
 * @ORM\Table(&lt;span class=&quot;code-quote&quot;&gt;&quot;applicationform&quot;&lt;/span&gt;)
 * @ORM\InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;JOINED&quot;&lt;/span&gt;)
 * @ORM\DiscriminatorColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;discr&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
 * @ORM\DiscriminatorMap({
 *     &lt;span class=&quot;code-quote&quot;&gt;&quot;slc&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;SlcApplicationForm&quot;&lt;/span&gt;,
 *     &lt;span class=&quot;code-quote&quot;&gt;&quot;vsdb&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;VsdbApplicationForm&quot;&lt;/span&gt;,
 *     &lt;span class=&quot;code-quote&quot;&gt;&quot;vss&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;VssApplicationForm&quot;&lt;/span&gt;,
 *     &lt;span class=&quot;code-quote&quot;&gt;&quot;opzd&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;OpzdApplicationForm&quot;&lt;/span&gt;,
 *     &lt;span class=&quot;code-quote&quot;&gt;&quot;vzu&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;VzuApplicationForm&quot;&lt;/span&gt;,
 *     &lt;span class=&quot;code-quote&quot;&gt;&quot;opzdvzu&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;OpzdVzuApplicationForm&quot;&lt;/span&gt;
 * })
 */
&lt;span class=&quot;code-keyword&quot;&gt;abstract&lt;/span&gt; class AbstractApplicationForm
...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I have an OneToMany connection from Appointment to AbstractApplicationForm.&lt;br/&gt;
When i construct an DQL, to get an appointment with only specific application forms it gets wrong translated into SQL.&lt;/p&gt;

&lt;p&gt;For instance if the query builder 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;
$qb-&amp;gt;select(&apos;ap, af&apos;)
   -&amp;gt;from(Appointment::getClass(), &apos;ap&apos;)
   -&amp;gt;leftJoin(&apos;ap.applicationForms&apos;, &apos;af&apos;, &apos;WITH&apos;, &apos;af.id = 123456789&apos;)
   -&amp;gt;andWhere(&apos;ap.id = :appointment&apos;)
   -&amp;gt;setParameter(&apos;appointment&apos;, $appointment);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So with this dql i should get an appointment with filtered application forms. In this case it whould return an appointment with only one application form (that with the id 123456789).&lt;br/&gt;
But it returns all associated application form instead on only that with the id 123456789, because it ignores the with clause.&lt;/p&gt;

&lt;p&gt;Here is the SQL that gets generated from the 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 ...
FROM program_execution_activity_appointment p8_, program_execution_activity_appointment p0_
LEFT JOIN applicationform a1_ ON p0_.id = a1_.appointment_id 
LEFT JOIN applicationform_slc a2_ ON a1_.id = a2_.id 
LEFT JOIN applicationform_vsdb a3_ ON a1_.id = a3_.id 
LEFT JOIN applicationform_vss a4_ ON a1_.id = a4_.id 
LEFT JOIN applicationform_opzd a5_ ON a1_.id = a5_.id 
LEFT JOIN applicationform_vzu a6_ ON a1_.id = a6_.id 
LEFT JOIN applicationform_opzdvzu a7_ ON a1_.id = a7_.id AND (a1_.id = 123456789) 
WHERE p0_.id = 1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The problem i see here is that the AND is added to the last join (applicationform_opzdvzu). But it should added to the first join (applicationform). Because the first join represents the parent entity (AbstractApplicationForm).&lt;br/&gt;
There is also a problem in the FROM clause. The problem is that &lt;b&gt;program_execution_activity_appointment p8_&lt;/b&gt; is never used anywhere else, except in the from clause.&lt;/p&gt;

&lt;p&gt;The generated query should look 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 program_execution_activity_appointment p0_
LEFT JOIN applicationform a1_ ON p0_.id = a1_.appointment_id AND (a1_.id = 123456789) 
LEFT JOIN applicationform_slc a2_ ON a1_.id = a2_.id
LEFT JOIN applicationform_vsdb a3_ ON a1_.id = a3_.id
LEFT JOIN applicationform_vss a4_ ON a1_.id = a4_.id
LEFT JOIN applicationform_opzd a5_ ON a1_.id = a5_.id
LEFT JOIN applicationform_vzu a6_ ON a1_.id = a6_.id
LEFT JOIN applicationform_opzdvzu a7_ ON a1_.id = a7_.id
WHERE p0_.id = 1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This sql works as expected.&lt;/p&gt;

&lt;p&gt;I hope i was clear enough what the problem is.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14202">DDC-2131</key>
            <summary>Fetch join not working on class table inheritance</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="alsar">alsar</reporter>
                        <labels>
                    </labels>
                <created>Wed, 7 Nov 2012 08:44:53 +0000</created>
                <updated>Wed, 29 May 2013 10:33:04 +0000</updated>
                    <resolved>Mon, 12 Nov 2012 14:25:43 +0000</resolved>
                            <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="18969" author="beberlei" created="Mon, 12 Nov 2012 14:25:43 +0000"  >&lt;p&gt;This is a duplicate of &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1256&quot; title=&quot;Generated SQL error with DQL WITH and JOINED inheritance&quot;&gt;&lt;del&gt;DDC-1256&lt;/del&gt;&lt;/a&gt;	&lt;/p&gt;</comment>
                    <comment id="18970" author="beberlei" created="Mon, 12 Nov 2012 14:27:21 +0000"  >&lt;p&gt;This is not easy to fix as you can see &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1256&quot; title=&quot;Generated SQL error with DQL WITH and JOINED inheritance&quot;&gt;&lt;del&gt;DDC-1256&lt;/del&gt;&lt;/a&gt;	is open for a while. However in your case there is an easy solution, why not fetch the appointment form by id, and then go the association to the appointment? This is the inverse operation on that relation, but suits your needs perfectly.&lt;/p&gt;</comment>
                    <comment id="20458" author="gseric" created="Wed, 29 May 2013 10:30:13 +0000"  >&lt;p&gt;Benjamin, this issue is duplicate of duplicate (according to your status changes). So original issues is &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-349&quot; title=&quot;Add support for specifying precedence in joins in DQL&quot;&gt;DDC-349&lt;/a&gt;, but this error was introduced in 2.3. &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-349&quot; title=&quot;Add support for specifying precedence in joins in DQL&quot;&gt;DDC-349&lt;/a&gt; was created way back in 2010 so it can&apos;t be the same problem.&lt;/p&gt;

&lt;p&gt;As far as I can tell, the problem was introduced with &quot;Arbitrary join support&quot; feature:&lt;br/&gt;
  &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/368&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/368&lt;/a&gt; (SqlWalker.php changes)&lt;br/&gt;
Basically, in version 2.3 and later WITH statement is wrongly handled &lt;b&gt;after&lt;/b&gt; SqlWalker::_generateClassTableInheritanceJoins()&lt;br/&gt;
Before 2.3 it was handled before.&lt;/p&gt;

&lt;p&gt;You can see it clearly in this issue&apos;s description:&lt;br/&gt;
should be (&amp;lt; 2.3):&lt;br/&gt;
  LEFT JOIN &amp;lt;CTI parent entity&amp;gt; ON &amp;lt;auto condition&amp;gt; AND &amp;lt;my custom WITH part&amp;gt; &amp;lt;CTI child left joins&amp;gt;&lt;br/&gt;
but we get (&amp;gt;= 2.3):&lt;br/&gt;
  LEFT JOIN &amp;lt;CTI parent entity&amp;gt; ON &amp;lt;auto condition&amp;gt; &amp;lt;CTI child left joins&amp;gt; AND &amp;lt;my custom WITH part&amp;gt;&lt;/p&gt;

&lt;p&gt;This issue can&apos;t be easily avoided in situation where you want to SELECT only one child row per parent row (based on some condition). WITH is natural and fastest option.&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                <outwardlinks description="duplicates">
                            <issuelink>
            <issuekey id="12797">DDC-1256</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2467] Incorrect work with default values, indexes, autoincrement (patch attached)</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2467</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;If you use in your MySQL database default values, indexes or string primary key, you get incorrect mapping by mapping generator. For get it - just use in database one or more from listed abilities, generate mapping for that and then try to dump-sql with schema-tool:update.&lt;/p&gt;

&lt;p&gt;Hope you fix it. Tnx! &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/wink.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14982">DDC-2467</key>
            <summary>Incorrect work with default values, indexes, autoincrement (patch attached)</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="and">And</reporter>
                        <labels>
                    </labels>
                <created>Thu, 23 May 2013 07:18:52 +0000</created>
                <updated>Tue, 28 May 2013 17:02:36 +0000</updated>
                                    <version>2.3.4</version>
                                                <component>Mapping Drivers</component>
                <component>ORM</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20425" author="ocramius" created="Thu, 23 May 2013 07:33:00 +0000"  >&lt;p&gt;Marked as minor improvement - thank you for the patch!&lt;/p&gt;</comment>
                    <comment id="20454" author="and" created="Tue, 28 May 2013 16:06:30 +0000"  >&lt;p&gt;When it will be merged? Maybe, planned version?&lt;/p&gt;</comment>
                    <comment id="20455" author="ocramius" created="Tue, 28 May 2013 16:15:24 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=and&quot; class=&quot;user-hover&quot; rel=&quot;and&quot;&gt;And&lt;/a&gt; such a patch requires failing tests before being applied - that&apos;s up to whoever picks it up.&lt;/p&gt;</comment>
                    <comment id="20456" author="and" created="Tue, 28 May 2013 16:18:48 +0000"  >&lt;p&gt;So if I add patch with tests - it will be merged? =)&lt;/p&gt;</comment>
                    <comment id="20457" author="ocramius" created="Tue, 28 May 2013 17:02:36 +0000"  >&lt;p&gt;Most probably - you can open a pull request against the current ORM master for that&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11610" name="ORM.patch" size="5763" author="and" created="Thu, 23 May 2013 07:18:52 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2474] [GH-679] Fix getting started doc to work with current version</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2474</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 ajgarlag:&lt;/p&gt;

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

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

&lt;p&gt;The `cli-config.php` example provided at the getting started tutorial does not work with doctrine 2.4.&lt;/p&gt;

</description>
                <environment></environment>
            <key id="14997">DDC-2474</key>
            <summary>[GH-679] Fix getting started doc to work with current version</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Tue, 28 May 2013 06:54:49 +0000</created>
                <updated>Tue, 28 May 2013 07:38:03 +0000</updated>
                    <resolved>Tue, 28 May 2013 07:36:51 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20451" author="doctrinebot" created="Tue, 28 May 2013 07:36:25 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-679&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/679&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/679&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20452" author="ocramius" created="Tue, 28 May 2013 07:36:51 +0000"  >&lt;p&gt;Merged at &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/4e8b787d072fe48e798a1bd5cd05f08e9a083525&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/4e8b787d072fe48e798a1bd5cd05f08e9a083525&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2472] [GH-677] Type fix in ORM\PersistentCollection</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2472</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 michaldudek:&lt;/p&gt;

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

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

&lt;p&gt;The ```ORM\PersistentCollection``` class accepts anything as 3rd argument to its constructor while it should be either array or ```Collection``` object. The ```$this-&amp;gt;coll``` phpdoc says that it&apos;s a ```Collection``` while the constructor&apos;s phpdoc says it&apos;s an array.&lt;/p&gt;

&lt;p&gt;The class assumes ```Collection``` but there isn&apos;t any type check at all. I have added conversion of array into ```ArrayCollection``` in the constructor as in some (very unclear) cases it likes to die with a fatal error:&lt;/p&gt;

&lt;p&gt;```Fatal error: Call to a member function add() on a non-object in Doctrine/ORM/PersistentCollection.php on line 169```&lt;/p&gt;</description>
                <environment></environment>
            <key id="14993">DDC-2472</key>
            <summary>[GH-677] Type fix in ORM\PersistentCollection</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Mon, 27 May 2013 15:01:39 +0000</created>
                <updated>Mon, 27 May 2013 15:52:26 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20449" author="doctrinebot" created="Mon, 27 May 2013 15:52:26 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-677&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/677&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/677&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2473] [GH-678] Fix an instance of doubled words in the docs</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2473</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 jbafford:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="14995">DDC-2473</key>
            <summary>[GH-678] Fix an instance of doubled words in the docs</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Mon, 27 May 2013 15:40:08 +0000</created>
                <updated>Mon, 27 May 2013 15:52:18 +0000</updated>
                    <resolved>Mon, 27 May 2013 15:52:18 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20447" author="doctrinebot" created="Mon, 27 May 2013 15:51:44 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-678&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/678&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/678&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20448" author="ocramius" created="Mon, 27 May 2013 15:52:18 +0000"  >&lt;p&gt;merged&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

&lt;p&gt;This is the required implementation for &apos;IsNotNull&apos;-Filters in Collection-Filtering.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14972">DDC-2463</key>
            <summary>[GH-675] Implementation for &apos;IsNot&apos;-Comparison</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="2">Won&apos;t Fix</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Mon, 20 May 2013 11:19:03 +0000</created>
                <updated>Sun, 26 May 2013 07:17:57 +0000</updated>
                    <resolved>Sun, 26 May 2013 07:17:57 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20443" author="asm89" created="Sun, 26 May 2013 07:17:57 +0000"  >&lt;p&gt;Already fixed with:&lt;br/&gt;
&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2471&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2471&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2471] Incorrect EQ/NEQ null handling of criteria</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2471</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="14990">DDC-2471</key>
            <summary>Incorrect EQ/NEQ null handling of criteria</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="asm89">Alexander</reporter>
                        <labels>
                    </labels>
                <created>Sun, 26 May 2013 05:46:23 +0000</created>
                <updated>Sun, 26 May 2013 07:17:03 +0000</updated>
                    <resolved>Sun, 26 May 2013 07:16:39 +0000</resolved>
                            <version>2.3</version>
                                <fixVersion>2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20442" author="asm89" created="Sun, 26 May 2013 07:17:03 +0000"  >&lt;p&gt;Fixed in &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/e5de0dad7ef502037a6f45eded0e02e8b5ebdf47&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/e5de0dad7ef502037a6f45eded0e02e8b5ebdf47&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2429&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2429&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14944">DDC-2446</key>
            <summary>[GH-666] [DDC-2429] Fix xsd definition</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Mon, 13 May 2013 14:14:11 +0000</created>
                <updated>Sun, 26 May 2013 06:02:03 +0000</updated>
                    <resolved>Sun, 26 May 2013 06:02:03 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20441" author="doctrinebot" created="Sun, 26 May 2013 06:01:19 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-666&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/666&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/666&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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



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

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

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


&lt;p&gt;Could someone explain me the errors that show up? The first error doesn&apos;t seem to disturb Symfony2 but the second messes around the console commands. But it still generates the database.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14831">DDC-2429</key>
            <summary>Association-Override Problem in XSD Mapping?</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 5 May 2013 16:44:40 +0000</created>
                <updated>Sun, 26 May 2013 06:01:51 +0000</updated>
                    <resolved>Sun, 26 May 2013 06:01:51 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

&lt;p&gt;createQueryBuilder() and createQuery() have exactly the same functionality. Just a different API. You can do the same with both.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

</description>
                <environment></environment>
            <key id="14964">DDC-2456</key>
            <summary>[GH-669] Fixed generating column names for self referencing entity.</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Fri, 17 May 2013 10:11:02 +0000</created>
                <updated>Sun, 26 May 2013 05:17:06 +0000</updated>
                    <resolved>Sun, 26 May 2013 05:17:06 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20437" author="doctrinebot" created="Sun, 26 May 2013 05:16:54 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-669&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/669&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/669&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

&lt;p&gt;Remove doctrine class loader, one bootstrap file&lt;/p&gt;</description>
                <environment></environment>
            <key id="14968">DDC-2460</key>
            <summary>[GH-672] Simplification example</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Fri, 17 May 2013 21:46:17 +0000</created>
                <updated>Sun, 26 May 2013 05:01:04 +0000</updated>
                    <resolved>Sun, 26 May 2013 05:00:56 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20436" author="doctrinebot" created="Sun, 26 May 2013 05:01:04 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-672&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/672&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/672&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-2468] xml schema incomplete</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2468</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;while writing the schema for phpcr-odm i noticed that the orm schema seems to miss some things. not sure if they are just missing in the schema but supported by the xml driver or if the xml driver also misses those:&lt;/p&gt;

&lt;p&gt;cascade-type is missing&lt;/p&gt;

&lt;p&gt;            &amp;lt;xs:element name=&quot;cascade-detach&quot; type=&quot;phpcr:emptyType&quot; minOccurs=&quot;0&quot;/&amp;gt;&lt;/p&gt;

&lt;p&gt;lifecycle-callback-type is missing a bunch of callbacks:&lt;/p&gt;

&lt;p&gt;            &amp;lt;xs:enumeration value=&quot;onFlush&quot;/&amp;gt;&lt;br/&gt;
            &amp;lt;xs:enumeration value=&quot;postFlush&quot;/&amp;gt;&lt;br/&gt;
            &amp;lt;xs:enumeration value=&quot;onClear&quot;/&amp;gt;&lt;br/&gt;
            &amp;lt;xs:enumeration value=&quot;loadClassMetadata&quot;/&amp;gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14985">DDC-2468</key>
            <summary>xml schema incomplete</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="dbu">David Buchmann</reporter>
                        <labels>
                    </labels>
                <created>Thu, 23 May 2013 15:48:27 +0000</created>
                <updated>Sun, 26 May 2013 04:44:59 +0000</updated>
                    <resolved>Sun, 26 May 2013 04:44:59 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20433" author="beberlei" created="Sun, 26 May 2013 04:41:37 +0000"  >&lt;p&gt;These are not lifecycle events? I am not sure they are necessary here.&lt;/p&gt;</comment>
                    <comment id="20434" author="beberlei" created="Sun, 26 May 2013 04:44:59 +0000"  >&lt;p&gt;Fixed cascade-detach missing&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2469] SQLite handling for ENUM-Fields</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2469</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;SQLite doesn&apos;t support ENUMS!&lt;/p&gt;

&lt;p&gt;But when I try create the schema of the following Entity Doctrine generates this &quot;CREATE TABLE&quot; - Statement:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
CREATE TABLE Entity ([...] NOT NULL, taxation ENUM(&apos;incl&apos;, &apos;excl&apos;), maxNumbe[...]
&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;
class Entity {
...

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     *
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, columnDefinition=&lt;span class=&quot;code-quote&quot;&gt;&quot;ENUM(&apos;incl&apos;, &apos;excl&apos;)&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $taxation = self::TAXATION_INCL;

...
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;hr /&gt;
&lt;p&gt;Produces this error:&lt;/p&gt;

&lt;p&gt;&lt;font color=&quot;red&quot;&gt;&lt;b&gt;SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;HY000&amp;#93;&lt;/span&gt;: General error: 1 near &quot;&apos;incl&apos;&quot;: syntax error&apos;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14986">DDC-2469</key>
            <summary>SQLite handling for ENUM-Fields</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="rosslau@my-hammer.de">Andy Rosslau</reporter>
                        <labels>
                        <label>query</label>
                        <label>schematool</label>
                        <label>sqlite</label>
                    </labels>
                <created>Fri, 24 May 2013 06:45:46 +0000</created>
                <updated>Fri, 24 May 2013 07:35:54 +0000</updated>
                    <resolved>Fri, 24 May 2013 07:35:54 +0000</resolved>
                            <version>Git Master</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20431" author="ocramius" created="Fri, 24 May 2013 07:35:45 +0000"  >&lt;p&gt;Usage 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;columnDefinition&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt; in annotations or generally metadata mappings is all about vendor specific syntax. `columnDefinition` is designed to allow overriding the default ORM column generated DDL to build vendor specific syntax/types, therefore the issue is invalid&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2465] ProxyClass load, and empty ids</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2465</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;If you have lazy association (example many-to-one) that have empty id (for empty i mean empty string and not null) you (correctly) get EntityNotFoundException.&lt;/p&gt;

&lt;p&gt;But i&apos;m working with a system that sometimes put an empty string instead of null in fk fields.&lt;/p&gt;

&lt;p&gt;So i&apos;ve add this little snipped of code __load method in $_proxyClassTemplate, ProxyFactory:&lt;/p&gt;

&lt;div class=&quot;code panel&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;// GT, 2013-05-21 If all identifier are empty you not need to &lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; load
&lt;/span&gt;
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (is_array($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_identifier)) {
            $isEmpty = &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;
            foreach($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_identifier as $iK =&amp;gt; $iV) {
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!empty($iV))
                    $isEmpty = &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;
            }

            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($isEmpty)
                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt;;
        }
        &lt;span class=&quot;code-comment&quot;&gt;// END GT EDIT&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>Osx</environment>
            <key id="14976">DDC-2465</key>
            <summary>ProxyClass load, and empty ids</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                                <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="lele19871">Gabriele Tondi</reporter>
                        <labels>
                    </labels>
                <created>Tue, 21 May 2013 15:05:57 +0000</created>
                <updated>Wed, 22 May 2013 15:50:15 +0000</updated>
                    <resolved>Tue, 21 May 2013 15:17:56 +0000</resolved>
                            <version>2.3.4</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20407" author="ocramius" created="Tue, 21 May 2013 15:09:03 +0000"  >&lt;p&gt;What does `$this-&amp;gt;_identifier` contain in your failing case?&lt;/p&gt;</comment>
                    <comment id="20408" author="lele19871" created="Tue, 21 May 2013 15:10:04 +0000"  >&lt;p&gt;It contains 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;
array(
[id] =&amp;gt;
);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Because on db you find an empty string and not a null value.&lt;/p&gt;</comment>
                    <comment id="20409" author="ocramius" created="Tue, 21 May 2013 15:13:25 +0000"  >&lt;p&gt;If I get it correctly, you are using empty strings to emulate NULL references, which is invalid in SQL ( I&apos;ve explained it extensively at &lt;a href=&quot;http://stackoverflow.com/questions/15502408/doctrine-2-use-default-0-values-instead-of-null-for-relation/15511715#15511715&quot; class=&quot;external-link&quot;&gt;http://stackoverflow.com/questions/15502408/doctrine-2-use-default-0-values-instead-of-null-for-relation/15511715#15511715&lt;/a&gt; )&lt;/p&gt;

&lt;p&gt;Is this what you are doing? Because for any identifier that is not NULL an attempt to load it should be run, regardless of its content.&lt;/p&gt;</comment>
                    <comment id="20410" author="lele19871" created="Tue, 21 May 2013 15:16:32 +0000"  >&lt;p&gt;That&apos;s not me &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;It&apos;s the system by which i&apos;m sharing the db.&lt;br/&gt;
It uses MyIsam engine with no fk or index, so i&apos;ve found this way to skip load when on db i&apos;ve empty strings.&lt;/p&gt;

&lt;p&gt;Are there other (maybe cleaner) ways?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Gabriele&lt;/p&gt;</comment>
                    <comment id="20411" author="ocramius" created="Tue, 21 May 2013 15:17:44 +0000"  >&lt;p&gt;No, the only correct way to handle this is to set NULL values for the association meta-columns. Marking as invalid&lt;/p&gt;</comment>
                    <comment id="20412" author="lele19871" created="Tue, 21 May 2013 15:20:51 +0000"  >&lt;p&gt;I can&apos;t find doc about it: &lt;a href=&quot;https://doctrine-orm.readthedocs.org/en/latest/reference/annotations-reference.html?highlight=column#annref-column&quot; class=&quot;external-link&quot;&gt;https://doctrine-orm.readthedocs.org/en/latest/reference/annotations-reference.html?highlight=column#annref-column&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Can you give an example?&lt;/p&gt;</comment>
                    <comment id="20413" author="ocramius" created="Tue, 21 May 2013 15:40:50 +0000"  >&lt;p&gt;`$this-&amp;gt;someAssociation = NULL;`. That&apos;s basically what I mean.&lt;/p&gt;</comment>
                    <comment id="20421" author="lele19871" created="Wed, 22 May 2013 15:38:32 +0000"  >&lt;p&gt;Mmm, didn&apos;t understand.&lt;/p&gt;

&lt;p&gt;Anyway, we&apos;ve tried to fix the old Delphi Monster witch store empty strings instead of nulls... with no results.&lt;/p&gt;

&lt;p&gt;So, here is my workaround, maybe this can be useful for other developers who will be in troubles in the future..&lt;/p&gt;

&lt;p&gt;In &quot;UnitOfWork&quot; class, public method &quot;createEntity&quot;.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt;&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;UnitOfWork.php&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-comment&quot;&gt;// TODO: Is &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; even computed right in all cases of composite keys?
&lt;/span&gt;                    foreach ($assoc[&apos;targetToSourceKeyColumns&apos;] as $targetColumn =&amp;gt; $srcColumn) {
                        $joinColumnValue = isset($data[$srcColumn]) ? $data[$srcColumn] : &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;

                        &lt;span class=&quot;code-comment&quot;&gt;// START-EDIT
&lt;/span&gt;
                        &lt;span class=&quot;code-comment&quot;&gt;// GT: our moas store empty string instead of &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; in fk columns.
&lt;/span&gt;                        &lt;span class=&quot;code-comment&quot;&gt;// So, let&apos;s check and handle it as &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;!
&lt;/span&gt;
                        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (empty($joinColumnValue))
                            $joinColumnValue = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;

                        &lt;span class=&quot;code-comment&quot;&gt;// END-EDIT
&lt;/span&gt;
                        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($joinColumnValue !== &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;) {
                            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($targetClass-&amp;gt;containsForeignIdentifier) {
                                $associatedId[$targetClass-&amp;gt;getFieldForColumn($targetColumn)] = $joinColumnValue;
                            } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
                                $associatedId[$targetClass-&amp;gt;fieldNames[$targetColumn]] = $joinColumnValue;
                            }
                        }
                    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Gabriele&lt;/p&gt;</comment>
                    <comment id="20422" author="ocramius" created="Wed, 22 May 2013 15:50:15 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=lele19871&quot; class=&quot;user-hover&quot; rel=&quot;lele19871&quot;&gt;Gabriele Tondi&lt;/a&gt; the ORM does not deal with such architectures (nor with generally invalid usage of RDBMS systems). The only acceptable solution in ORM is with correct NULL values, as it should be, so this patch is invalid.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2208] CASE WHEN ... WHEN doesn&apos;t work</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2208</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Having the following part in select DQL throws an 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-sql&quot;&gt;
SUM(CASE
            WHEN c.startDate &amp;lt;= :start THEN c.endDate - :start
            WHEN c.endDate &amp;gt;= :end THEN :end - c.startDate
            ELSE 0
            END) 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;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;
[Syntax Error] line 0, col 124: Error: Expected Doctrine\ORM\Query\Lexer::T_ELSE, got &apos;-&apos; 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It seems that it&apos;s failing inside the second THEN&lt;/p&gt;

&lt;p&gt;This one also seems to fail:&lt;/p&gt;
&lt;div class=&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;
SUM(CASE
            WHEN c.startDate &amp;lt;= :start THEN (c.endDate - :start)
            WHEN c.endDate &amp;gt;= :end THEN (:end - c.startDate)
            ELSE 0
            END) 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;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;
[Syntax Error] line 0, col 60: Error: Unexpected &apos;(&apos; 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Another 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-sql&quot;&gt;
SUM(CASE
                WHEN c.startDate &amp;lt;= :start THEN c.endDate - :start
                WHEN c.endDate &amp;gt;= :end THEN :end - c.startDate
                ELSE 0
                END) = :result &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; ...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;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;
[Syntax Error] line 0, col 60: Error: Expected Doctrine\ORM\Query\Lexer::T_FROM, got &apos;=&apos; 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14325">DDC-2208</key>
            <summary>CASE WHEN ... WHEN doesn&apos;t work</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="2">Won&apos;t Fix</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="mvrhov">Miha Vrhovnik</reporter>
                        <labels>
                    </labels>
                <created>Wed, 19 Dec 2012 23:44:17 +0000</created>
                <updated>Wed, 22 May 2013 06:35:37 +0000</updated>
                    <resolved>Wed, 22 May 2013 04:21:42 +0000</resolved>
                            <version>2.3.1</version>
                                <fixVersion>2.4</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="19160" author="mvrhov" created="Thu, 20 Dec 2012 17:19:55 +0000"  >&lt;p&gt;I&apos;ve added two more cases where the parsing fails. Do you want a separate tickets for that?&lt;/p&gt;</comment>
                    <comment id="19161" author="fabio.bat.silva" created="Thu, 20 Dec 2012 17:51:25 +0000"  >&lt;p&gt;Don&apos;t worry, I&apos;ll spend some time over this...&lt;br/&gt;
But I&apos;m not sure about the last one. &lt;/p&gt;</comment>
                    <comment id="19162" author="mvrhov" created="Thu, 20 Dec 2012 18:09:40 +0000"  >&lt;p&gt;The 3rd case seems work just fine as a part of a HAVING clause.&lt;br/&gt;
I haven&apos;t tried it but It might be that it fails with something simpler like SELECT COUNT( * ) = :foo FROM ... or SELECT COUNT( * ) = 2 FROM ...&lt;/p&gt;</comment>
                    <comment id="19259" author="mvrhov" created="Tue, 8 Jan 2013 20:04:28 +0000"  >&lt;p&gt;Fabio I have two more...&lt;br/&gt;
It doesn&apos;t like NULL and subselect after then part&lt;/p&gt;

&lt;div class=&quot;code panel&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;addSelect(&apos;CASE
    WHEN po.quantity IS NULL THEN NULL
    ELSE po.quantity -
            COALESCE(0, (
                SELECT COUNT(rd.product) FROM xxxx rd
                    WHERE (rd.startDate &amp;lt;= :end) AND (rd.endDate &amp;gt;= :start) AND
                        rd.product = c.product)))
    END
    AS po.quantity
&apos;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;:edit replaced with real query &lt;/p&gt;</comment>
                    <comment id="19260" author="mvrhov" created="Tue, 8 Jan 2013 20:13:42 +0000"  >&lt;p&gt;addon: well the subquery part can be full query with joins ....&lt;/p&gt;</comment>
                    <comment id="20417" author="guilhermeblanco" created="Wed, 22 May 2013 04:21:42 +0000"  >&lt;p&gt;After further investigation, JPA 2.0 and 2.1 do not support NULL as part of ScalarExpression.&lt;br/&gt;
There are many underlying problems by adding this straight to ScalarExpression, such as the example I showed.&lt;br/&gt;
I don&apos;t think supporting this will bring benefits, but too many headaches.&lt;br/&gt;
As a workaround, create your own function that generates &quot;NULL&quot; as SQL. It would work perfectly here.&lt;br/&gt;
Closing the PR as we will not support it.&lt;/p&gt;</comment>
                    <comment id="20419" author="mvrhov" created="Wed, 22 May 2013 06:35:37 +0000"  >&lt;p&gt;Not to sound rude but, the answer is far fetched. So what if JPA is not supporting it. Yes I understand that the Doctrine is modeled after JPA but this shouldn&apos;t mean that it&apos;s not better in some regards.&lt;/p&gt;

&lt;p&gt;This is really a low blow especially if there is a need to use a query builder to build the queries. And as I said it&apos;s not only the IS NULL but the CASE statement can contain a whole subquery with it&apos;s own CASE statements etc...&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2444] NULL IN CASE WHEN</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2444</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi&lt;br/&gt;
In DQL when i use NULL  IN  &quot;CASE WHEN&quot; like this&lt;br/&gt;
&quot;AVG(CASE WHEN g.speed &amp;gt; 0 THEN g.speed ELSE NULL END)&quot;&lt;br/&gt;
 Throw this expestion&lt;br/&gt;
Unexpected &apos;NULL&apos;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14941">DDC-2444</key>
            <summary>NULL IN CASE WHEN</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="2">Won&apos;t Fix</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="vahid4134">vahid sohrabloo</reporter>
                        <labels>
                    </labels>
                <created>Sun, 12 May 2013 07:56:49 +0000</created>
                <updated>Wed, 22 May 2013 04:21:59 +0000</updated>
                    <resolved>Wed, 22 May 2013 04:21:59 +0000</resolved>
                            <version>2.3.3</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20376" author="mvrhov" created="Tue, 14 May 2013 08:21:23 +0000"  >&lt;p&gt;We could say a duplicate of: &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-2208&quot; title=&quot;CASE WHEN ... WHEN doesn&amp;#39;t work&quot;&gt;&lt;del&gt;DDC-2208&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20418" author="guilhermeblanco" created="Wed, 22 May 2013 04:21:59 +0000"  >&lt;p&gt;After further investigation, JPA 2.0 and 2.1 do not support NULL as part of ScalarExpression.&lt;br/&gt;
There are many underlying problems by adding this straight to ScalarExpression, such as the example I showed.&lt;br/&gt;
I don&apos;t think supporting this will bring benefits, but too many headaches.&lt;br/&gt;
As a workaround, create your own function that generates &quot;NULL&quot; as SQL. It would work perfectly here.&lt;br/&gt;
Closing the PR as we will not support it.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2466] [GH-676] Update UnitOfWork.php</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2466</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 Kynareth62:&lt;/p&gt;

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

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

&lt;p&gt;Here, if a field (type date or datetime) is defined as id, I have an error because it&apos;s an object and not a string...&lt;/p&gt;

&lt;p&gt;Can you please fix this bug ? Thank you.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14977">DDC-2466</key>
            <summary>[GH-676] Update UnitOfWork.php</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 May 2013 00:08:39 +0000</created>
                <updated>Wed, 22 May 2013 00:44:28 +0000</updated>
                    <resolved>Wed, 22 May 2013 00:43:59 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20414" author="doctrinebot" created="Wed, 22 May 2013 00:43:26 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-676&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/676&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/676&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20415" author="ocramius" created="Wed, 22 May 2013 00:44:28 +0000"  >&lt;p&gt;Related: &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1209&quot; title=&quot;DateTime (and other custom object types) cannot be used in primary key (singular or composite)&quot;&gt;&lt;del&gt;DDC-1209&lt;/del&gt;&lt;/a&gt;, &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1780&quot; title=&quot;Function createEntity does&amp;#39;t support DateTime identifier&quot;&gt;&lt;del&gt;DDC-1780&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

&lt;p&gt;the schema of middle table stations_have_funs:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
CREATE TABLE `stations_have_funs` (
  `fun_id` &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(11) NOT NULL,
  `station_id` &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(11) NOT NULL,
  PRIMARY KEY (`fun_id`,`station_id`),
  KEY `IDX_45C921911CA4BE49` (`fun_id`),
  KEY `IDX_45C9219121BDB235` (`station_id`),
  CONSTRAINT `FK_45C921911CA4BE49` FOREIGN KEY (`fun_id`) REFERENCES `funs` (`id`) ON DELETE CASCADE,
  CONSTRAINT `FK_45C9219121BDB235` FOREIGN KEY (`station_id`) REFERENCES `stations` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


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

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

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

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

</description>
                <environment></environment>
            <key id="14970">DDC-2462</key>
            <summary>[GH-674] Shortcut for force</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Mon, 20 May 2013 08:07:09 +0000</created>
                <updated>Mon, 20 May 2013 15:44:48 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

&lt;p&gt;The implementation would be something like :&lt;/p&gt;


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

<item>
            <title>[DDC-2458] [GH-671] [DDC-2435] Fix column name with numbers and non alphanumeric characters.</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2458</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of FabioBatSilva:&lt;/p&gt;

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

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

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2435&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2435&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14966">DDC-2458</key>
            <summary>[GH-671] [DDC-2435] Fix column name with numbers and non alphanumeric characters.</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Fri, 17 May 2013 16:19:38 +0000</created>
                <updated>Fri, 17 May 2013 16:41:03 +0000</updated>
                    <resolved>Fri, 17 May 2013 16:41:03 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20394" author="doctrinebot" created="Fri, 17 May 2013 16:34:09 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-671&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/671&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/671&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20396" author="fabio.bat.silva" created="Fri, 17 May 2013 16:41:03 +0000"  >&lt;p&gt;Merged : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/c9d9b68fa9937218aad05dfca4b3f96b409cfc8e&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/c9d9b68fa9937218aad05dfca4b3f96b409cfc8e&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2435] Column name with number and reserved character creates invalid query</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2435</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have a column name called 1:1 which i map like so&lt;br/&gt;
@Column(type=&quot;string&quot;, name=&quot;`1:1`&quot;)&lt;br/&gt;
Unfortunately, the SQL that get generated does not work in mysql:&lt;br/&gt;
SELECT t0.`1:1` AS 112 FROM `table` t0&lt;br/&gt;
the problem is with the &apos;AS 112&apos;, if it contained a letter eg. 11a, or was escaped eg. `112` it wound work.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14841">DDC-2435</key>
            <summary>Column name with number and reserved character creates invalid query</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="dane77hz">Dane Lipscombe</reporter>
                        <labels>
                    </labels>
                <created>Wed, 8 May 2013 02:18:44 +0000</created>
                <updated>Fri, 17 May 2013 16:40:30 +0000</updated>
                    <resolved>Fri, 17 May 2013 16:40:30 +0000</resolved>
                            <version>2.3.3</version>
                                <fixVersion>2.4</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20395" author="fabio.bat.silva" created="Fri, 17 May 2013 16:40:30 +0000"  >&lt;p&gt;Fixed : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/c9d9b68fa9937218aad05dfca4b3f96b409cfc8e&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/c9d9b68fa9937218aad05dfca4b3f96b409cfc8e&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2451&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2451&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14965">DDC-2457</key>
            <summary>[GH-670] [DDC-2451] Fix entity listeners serialization</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Fri, 17 May 2013 15:05:02 +0000</created>
                <updated>Fri, 17 May 2013 15:13:24 +0000</updated>
                    <resolved>Fri, 17 May 2013 15:13:24 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20391" author="doctrinebot" created="Fri, 17 May 2013 15:09:36 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-670&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/670&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/670&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20393" author="fabio.bat.silva" created="Fri, 17 May 2013 15:13:24 +0000"  >&lt;p&gt;merged : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/65886fdfeaf38692be5196a59530f56fc3e6ab56&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/65886fdfeaf38692be5196a59530f56fc3e6ab56&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2451] Entity listeners class don&apos;t work when metadatas are stored in cache</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2451</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;m using entity listeners class to make PostPersist and PostLoad actions per entity and use memcached as the metadata cache. Before the metadatas are in cache, the methods of the entity listeners are properly called but when the metadatas are in cache, they are no longer called. I&apos;ve also made the test with APC and the result is the same.&lt;/p&gt;</description>
                <environment>Ubuntu / PHP 5.4.9</environment>
            <key id="14957">DDC-2451</key>
            <summary>Entity listeners class don&apos;t work when metadatas are stored in cache</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="jedi_bc">Bruno CHALOPIN</reporter>
                        <labels>
                        <label>event</label>
                        <label>orm</label>
                    </labels>
                <created>Thu, 16 May 2013 13:52:40 +0000</created>
                <updated>Fri, 17 May 2013 15:12:12 +0000</updated>
                    <resolved>Fri, 17 May 2013 15:12:12 +0000</resolved>
                            <version>2.4</version>
                                <fixVersion>2.4</fixVersion>
                                <component>Mapping Drivers</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20392" author="fabio.bat.silva" created="Fri, 17 May 2013 15:12:12 +0000"  >&lt;p&gt;Fixed : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/65886fdfeaf38692be5196a59530f56fc3e6ab56&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/65886fdfeaf38692be5196a59530f56fc3e6ab56&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

<item>
            <title>[DDC-2452] Additional `WITH` condition in joins between JTI roots cause invalid SQL to be produced</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2452</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Given a simple Joined Table Inheritance like following:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * @Entity @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;foo&quot;&lt;/span&gt;) @InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;JOINED&quot;&lt;/span&gt;)
 * @DiscriminatorColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;discr&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
 * @DiscriminatorMap({&lt;span class=&quot;code-quote&quot;&gt;&quot;foo&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;DDC2452Foo&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;bar&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;DDC2452Bar&quot;&lt;/span&gt;})
 */
class DDC2452Foo
{
    /** @Id @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;) @GeneratedValue */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $id;
}

/** @Entity @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;bar&quot;&lt;/span&gt;) */
class DDC2452Bar &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; DDC2452Foo
{
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Following DQL&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT foo1 FROM DDC2452Foo foo1 JOIN DDC2452Foo foo2 WITH 1=1&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Will produce broken SQL:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT
    f0_.id AS id0, f0_.discr AS discr1 
FROM 
    foo f0_ 
LEFT JOIN bar b1_ 
    ON f0_.id = b1_.id 
LEFT JOIN foo f2_ 
LEFT JOIN bar b3_ 
    ON f2_.id = b3_.id 
    ON (1 = 1)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

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

<item>
            <title>[DDC-2453] [GH-668] [WIP] Adding failing test for DDC-2452</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2453</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Ocramius:&lt;/p&gt;

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

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

&lt;p&gt;DQL joins between JTI entities produce invalid SQL when additional conditions are inserted via WITH clause&lt;/p&gt;

&lt;p&gt;Still working on a fix&lt;/p&gt;</description>
                <environment></environment>
            <key id="14959">DDC-2453</key>
            <summary>[GH-668] [WIP] Adding failing test for DDC-2452</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="3">Duplicate</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Thu, 16 May 2013 14:31:41 +0000</created>
                <updated>Thu, 16 May 2013 14:36:08 +0000</updated>
                    <resolved>Thu, 16 May 2013 14:36:08 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20389" author="ocramius" created="Thu, 16 May 2013 14:36:08 +0000"  >&lt;p&gt;Duplicate of &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-2452&quot; title=&quot;Additional `WITH` condition in joins between JTI roots cause invalid SQL to be produced&quot;&gt;DDC-2452&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2450] Exception throwen when use --dump-sql</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2450</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;
php app/console doctrine:schema:update --dump-sql &amp;gt; a.sql



  [Doctrine\DBAL\Schema\SchemaException]
  The table with name &apos;xxx.message76&apos; already exists.



doctrine:schema:update [--complete] [--dump-sql] [--force] [--em[=&lt;span class=&quot;code-quote&quot;&gt;&quot;...&quot;&lt;/span&gt;]]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>symfony 2.3-dev</environment>
            <key id="14956">DDC-2450</key>
            <summary>Exception throwen when use --dump-sql</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="7">Can&apos;t Fix</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="koc">Konstantin</reporter>
                        <labels>
                    </labels>
                <created>Thu, 16 May 2013 09:41:46 +0000</created>
                <updated>Thu, 16 May 2013 11:34:45 +0000</updated>
                    <resolved>Thu, 16 May 2013 10:34:10 +0000</resolved>
                            <version>2.3.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20386" author="ocramius" created="Thu, 16 May 2013 10:34:10 +0000"  >&lt;p&gt;The DBAL can only extract schema definitions from the current DB, so it won&apos;t know if there are tables in other databases that are already existing&lt;/p&gt;</comment>
                    <comment id="20387" author="koc" created="Thu, 16 May 2013 11:04:39 +0000"  >&lt;p&gt;I haven&apos;t this exception week ago. What I&apos;d changed? How can I fix it?&lt;/p&gt;</comment>
                    <comment id="20388" author="ocramius" created="Thu, 16 May 2013 11:34:45 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=koc&quot; class=&quot;user-hover&quot; rel=&quot;koc&quot;&gt;Konstantin&lt;/a&gt; what platform are you currently on? Can you provide the mappings to reproduce the problem?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

&lt;p&gt;A solution might probably implement an object holding all the QueryComponent, implementing ArrayAccess. So that way the state can be shared.&lt;/p&gt;</comment>
                    <comment id="20379" author="ocramius" created="Tue, 14 May 2013 18:02:22 +0000"  >&lt;p&gt;Just hit this while developing an ast walker... Will look into it too since I need it more than soon.&lt;/p&gt;</comment>
                    <comment id="20380" author="ocramius" created="Tue, 14 May 2013 18:17:26 +0000"  >&lt;p&gt;As a VERY UGLY workaround, I used a static variable and a custom sql walker in combination with my AST walker.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;

namespace Comcom\Versioning\ORM\Query;


use Doctrine\ORM\Query\SqlWalker;

class WorkaroundSqlWalker &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; SqlWalker
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __construct($query, $parserResult, array $queryComponents)
    {
        parent::__construct($query, $parserResult, $queryComponents);

        foreach (VersionWalker::$additionalAliases as $alias =&amp;gt; $value) {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;setQueryComponent($alias, $value);
        }
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

<item>
            <title>[DDC-2447] [GH-667] DQL: Allow parameter name to start with any allowed character</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2447</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 juzna:&lt;/p&gt;

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

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

&lt;p&gt;Especially, do not require it to start with a letter. A *&lt;b&gt;number&lt;/b&gt;* is good enough as well. Why is was it not enabled anyway?&lt;/p&gt;

&lt;p&gt;It&apos;s most useful when parameter names are auto generated, e.g. using sha1 or md5. &lt;/p&gt;</description>
                <environment></environment>
            <key id="14946">DDC-2447</key>
            <summary>[GH-667] DQL: Allow parameter name to start with any allowed character</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Mon, 13 May 2013 19:55:24 +0000</created>
                <updated>Mon, 13 May 2013 20:08:16 +0000</updated>
                    <resolved>Mon, 13 May 2013 20:08:16 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20373" author="doctrinebot" created="Mon, 13 May 2013 19:59:08 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-667&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/667&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/667&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2045] Unit of work use all columns for insert</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2045</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I use MySQL. And I&apos;m OK with default values that will be assigned by DB for columns which values I don&apos;t set explicitly. But Doctrine seems to unable to skip some columns when building insert SQL query.&lt;/p&gt;

&lt;p&gt;People suggest to use nullable flag to enable desired behaviour. And I don&apos;t see how it could help. I checked UnitOfWork.php and BasicEntityPersister.php. There is nothing about nullable.&lt;br/&gt;
And doc &lt;a href=&quot;http://docs.doctrine-project.org/en/latest/reference/limitations-and-known-issues.html&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/en/latest/reference/limitations-and-known-issues.html&lt;/a&gt; says that you cannot use custom persisters so far.&lt;/p&gt;

&lt;p&gt;So why not track changes for unsaved entities as well, and don&apos;t force applications to generate more traffic with more SQL text and developers to set default values in entity constructors?&lt;/p&gt;

&lt;p&gt;I would be glad if I&apos;m mistaken and this feature is already implemented and you describe how to resolve the issue. Thanks&lt;/p&gt;</description>
                <environment>PHP 5.4.7--pl0-gentoo mysql  Ver 14.14 Distrib 5.5.22, for Linux (x86_64)&lt;br/&gt;
</environment>
            <key id="14072">DDC-2045</key>
            <summary>Unit of work use all columns for insert</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="2">Won&apos;t Fix</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="coviex">Covie X</reporter>
                        <labels>
                    </labels>
                <created>Thu, 27 Sep 2012 11:12:49 +0000</created>
                <updated>Mon, 13 May 2013 10:08:37 +0000</updated>
                    <resolved>Wed, 23 Jan 2013 22:03:59 +0000</resolved>
                            <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19379" author="ocramius" created="Wed, 23 Jan 2013 22:03:59 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=coviex&quot; class=&quot;user-hover&quot; rel=&quot;coviex&quot;&gt;Covie X&lt;/a&gt; the `nullable` flag is a mapping used in columns. See &lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/annotations-reference.html#annref-column&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/annotations-reference.html#annref-column&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, Doctrine does not skip columns since default DB-side values are not supported by the ORM. To have default values, you usually set them in the entity&apos;s constructor.&lt;/p&gt;</comment>
                    <comment id="20372" author="coviex" created="Mon, 13 May 2013 10:08:37 +0000"  >&lt;p&gt;Marco, you should be ashamed of the way you treat issues.&lt;br/&gt;
RTFM answer when there is real and huge problem, seriously?!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2436] Inheritance on mappedSuperClass</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2436</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Sometimes is necessary some associations(many to many) in the mappedSuperClass. This associations should not be lost (inversedBy side and mappedBy ). The only one way to get this, was to implement an abstract class as Single Inheritance Table and then the mappedSuperClass inherit of this. But this is not optimum, because we are losing the OOP, creating classes which should not exist.&lt;/p&gt;

&lt;p&gt;I realized of this when i was creating my bundle to be used for some projects, but I needed each project could extends from my class and add some properties or methods according their needs.&lt;/p&gt;

&lt;p&gt;This is the link where you can see more details of this:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/16405556/mapped-super-class-symfony2-2&quot; class=&quot;external-link&quot;&gt;http://stackoverflow.com/questions/16405556/mapped-super-class-symfony2-2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for your attention.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14842">DDC-2436</key>
            <summary>Inheritance on mappedSuperClass</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="pcastrotigre">Petter Castro</reporter>
                        <labels>
                        <label>mappedsuperclass</label>
                    </labels>
                <created>Wed, 8 May 2013 21:25:43 +0000</created>
                <updated>Fri, 10 May 2013 16:55:33 +0000</updated>
                    <resolved>Fri, 10 May 2013 01:12:25 +0000</resolved>
                                                            <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20264" author="ocramius" created="Fri, 10 May 2013 01:12:25 +0000"  >&lt;p&gt;Mapped superclasses cannot be referenced as they are only meant to provide some simplification by allowing inherited mappings in child classes.&lt;/p&gt;

&lt;p&gt;If you want to enforce some kind of association in third party libraries, you can define interfaces and reference those: then, with a listener (during the onLoadMetadata event), replace the interfaces in mappings with (configured) concrete class names.&lt;/p&gt;</comment>
                    <comment id="20268" author="pcastrotigre" created="Fri, 10 May 2013 16:08:54 +0000"  >&lt;p&gt;I did it, and everything worked perfectly. However, is there a way to dynamically change the &quot;resolve_target_entities&quot; inside my LoadClassMetadata or inside my php code?. &lt;br/&gt;
I would like the user makes this configurations with params from my bundle. In background, my bundle will configure these params for doctrine.&lt;br/&gt;
Could i do that?&lt;/p&gt;

&lt;p&gt;Thanks again for your attention.&lt;/p&gt;</comment>
                    <comment id="20269" author="pcastrotigre" created="Fri, 10 May 2013 16:25:10 +0000"  >&lt;p&gt;I was thinking in duplicate some code of yours. Exactly this 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;
$def = $container-&amp;gt;findDefinition(&apos;doctrine.orm.listeners.resolve_target_entity&apos;);
foreach ($config[&apos;resolve_target_entities&apos;] as $name =&amp;gt; $implementation) {
     $def-&amp;gt;addMethodCall(&apos;addResolveTargetEntity&apos;, array(
     $name, $implementation, array()
     ));
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="20270" author="ocramius" created="Fri, 10 May 2013 16:42:22 +0000"  >&lt;p&gt;That&apos;s exactly how this has to be done.&lt;/p&gt;</comment>
                    <comment id="20271" author="pcastrotigre" created="Fri, 10 May 2013 16:47:55 +0000"  >&lt;p&gt;I did but there is a problem.... The service doctrine.orm.listeners.resolve_target_entity is not public. So i can&apos;t use it in my bundle. I wouldn&apos;t like to duplicate all code from this Service. How could I do?&lt;/p&gt;</comment>
                    <comment id="20272" author="ocramius" created="Fri, 10 May 2013 16:49:44 +0000"  >&lt;p&gt;That&apos;s an issue for the DoctrineBundle, not for the ORM.&lt;/p&gt;</comment>
                    <comment id="20273" author="pcastrotigre" created="Fri, 10 May 2013 16:55:33 +0000"  >&lt;p&gt;Ok thanks a lot for your help. I will redirect my question to them.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1970] DiscriminatorMap recursion when using self-reference</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1970</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;ve ran into a problem with self-referencing entity. When fetching an entity, recursion occurs, fetching every related entity defined by ManyToOne relation&lt;br/&gt;
(in this example $sponsor), ignoring LAZY or EXTRA_LAZY fetch mode - it executes numerous queries.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * @ORM\Entity(repositoryClass=&lt;span class=&quot;code-quote&quot;&gt;&quot;Acme\Bundle\UserBundle\Entity\Repository\UserRepository&quot;&lt;/span&gt;)
 * @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;f_user&quot;&lt;/span&gt;)
 * @ORM\InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;JOINED&quot;&lt;/span&gt;)
 * @ORM\DiscriminatorColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
 * @ORM\DiscriminatorMap({&lt;span class=&quot;code-quote&quot;&gt;&quot;user_person&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;UserPerson&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;user_company&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;UserCompany&quot;&lt;/span&gt;})
 */
&lt;span class=&quot;code-keyword&quot;&gt;abstract&lt;/span&gt; class UserBase &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; FOSUser

/* .... */

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; UserBase
     *
     * @ORM\OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;UserBase&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;sponsor&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $referrals;

    /**
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;UserBase&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;referrals&quot;&lt;/span&gt;)
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;sponsor_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $sponsor;

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13942">DDC-1970</key>
            <summary>DiscriminatorMap recursion when using self-reference</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="kolah">Krzysztof Kolasiak</reporter>
                        <labels>
                    </labels>
                <created>Mon, 6 Aug 2012 18:54:11 +0000</created>
                <updated>Fri, 10 May 2013 15:29:53 +0000</updated>
                                    <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="18504" author="asm89" created="Tue, 14 Aug 2012 20:17:31 +0000"  >&lt;p&gt;I have changed this into a feature request because you have hit the limitations of using inheritance and self referencing entities.&lt;/p&gt;

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

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

<item>
            <title>[DDC-2442] [GH-663] Adding failing test to demonstrate DDC-2432</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2442</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Ocramius:&lt;/p&gt;

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

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

&lt;p&gt;Attempt to fix &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-2432&quot; title=&quot;Entity can be initialized even if not found&quot;&gt;&lt;del&gt;DDC-2432&lt;/del&gt;&lt;/a&gt; ( &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2432&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2432&lt;/a&gt; )&lt;/p&gt;

&lt;p&gt;Loading proxies with invalid identifiers will currently mark them as initialized regardless of the failure&lt;/p&gt;</description>
                <environment></environment>
            <key id="14849">DDC-2442</key>
            <summary>[GH-663] Adding failing test to demonstrate DDC-2432</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Thu, 9 May 2013 19:14:25 +0000</created>
                <updated>Fri, 10 May 2013 06:55:52 +0000</updated>
                    <resolved>Fri, 10 May 2013 06:55:52 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20257" author="doctrinebot" created="Thu, 9 May 2013 21:38:00 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-663&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/663&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/663&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2384] [GH-639] Added abillity to use metacolumn as indexBy</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2384</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 goetas:&lt;/p&gt;

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

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

&lt;p&gt;Added ability to use meta column as indexBy. Useful if association entities is widely used. &lt;br/&gt;
Replace #204 PR&lt;/p&gt;</description>
                <environment></environment>
            <key id="14749">DDC-2384</key>
            <summary>[GH-639] Added abillity to use metacolumn as indexBy</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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, 2 Apr 2013 08:08:59 +0000</created>
                <updated>Fri, 10 May 2013 06:53:44 +0000</updated>
                    <resolved>Fri, 10 May 2013 06:53:44 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20265" author="doctrinebot" created="Fri, 10 May 2013 06:53:32 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-639&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/639&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/639&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2443] [GH-664] ClassMetadaInfo rename setIdentifierValues() to assignIdentifier()</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2443</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 entering:&lt;/p&gt;

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

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

&lt;p&gt;I saw this @todo so i changed name of method and occurrences on code and documentation.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14850">DDC-2443</key>
            <summary>[GH-664] ClassMetadaInfo rename setIdentifierValues() to assignIdentifier()</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 May 2013 00:51:49 +0000</created>
                <updated>Fri, 10 May 2013 00:58:15 +0000</updated>
                    <resolved>Fri, 10 May 2013 00:58:15 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20262" author="doctrinebot" created="Fri, 10 May 2013 00:57:04 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-664&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/664&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/664&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20263" author="ocramius" created="Fri, 10 May 2013 00:58:15 +0000"  >&lt;p&gt;Cannot fix in 2.x&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

&lt;p&gt;And want to query for Cars that a Driver drove in:
&lt;br class=&quot;atl-forced-newline&quot; /&gt;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$qb = $em-&amp;gt;createQueryBuilder();

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

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

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

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

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

&lt;p&gt;Some test data you might want to use:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;INSERT INTO `car` (`brand`, `model`) VALUES
(&apos;BMW&apos;, &apos;7 Series&apos;),
(&apos;Crysler&apos;, &apos;300&apos;),
(&apos;Mercedes&apos;, &apos;C-&lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt;&apos;),
(&apos;Volvo&apos;, &apos;XC90&apos;);

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

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

&lt;p&gt;BTW I was adding said testcase on master and got an error similar to &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-979&quot; title=&quot;ArrayHydrator::updateResultPointer() must be an array, string given&quot;&gt;&lt;del&gt;DDC-979&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20261" author="beberlei" created="Thu, 9 May 2013 22:14:27 +0000"  >&lt;p&gt;I upgraded the testcase to master locally, and it seems to fail on Array hydration only now, with a notice:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Exception: [PHPUnit_Framework_Error] Argument 1 passed to Doctrine\ORM\Internal\Hydration\ArrayHydrator::updateResultPointer() must be of the type array, string given, called in /home/benny/code/php/workspace/doctrine2/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php on line 196 and defined
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

<item>
            <title>[DDC-2440] composer.json is wrong</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2440</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In composer.json for doctrine/doctrine-orm-module there is the following require:&lt;br/&gt;
&quot;doctrine/doctrine-module&quot;: &quot;0.8.*&quot;&lt;/p&gt;

&lt;p&gt;However &quot;0.8.*&quot; does not exist, it should be &quot;0.8.x-dev&quot; or &quot;dev-master&quot;. The later would then use the branch alias. Either way this needs changing, because it&apos;s stopping the package from being installed or updated.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14846">DDC-2440</key>
            <summary>composer.json is wrong</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="1" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/blocker.png">Blocker</priority>
                    <status id="6" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="r-nicol">Richard Nicol</reporter>
                        <labels>
                    </labels>
                <created>Thu, 9 May 2013 15:37:15 +0000</created>
                <updated>Thu, 9 May 2013 22:06:31 +0000</updated>
                    <resolved>Thu, 9 May 2013 16:01:39 +0000</resolved>
                            <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="20249" author="beberlei" created="Thu, 9 May 2013 16:01:39 +0000"  >&lt;p&gt;Please open the ticket on the Doctrine ORM Module, this is the ORM bug tracker.&lt;/p&gt;</comment>
                    <comment id="20250" author="r-nicol" created="Thu, 9 May 2013 16:07:24 +0000"  >&lt;p&gt;Sorry my mistake! I have opened an issue on github here: &lt;a href=&quot;https://github.com/doctrine/DoctrineORMModule/issues/219&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/DoctrineORMModule/issues/219&lt;/a&gt; in case anyone ends up here.&lt;/p&gt;

&lt;p&gt;Cheers.&lt;/p&gt;</comment>
                    <comment id="20260" author="ocramius" created="Thu, 9 May 2013 22:06:31 +0000"  >&lt;p&gt;DoctrineModule has a 0.8.x branch. Closing&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2432] Entity can be initialized even if not found</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2432</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have some data in loose consistency, trying to load a field from a certain entity will yield a EntityNotFoundException. Trying it again, for example if the group is reused in a set that gets iterated, will work but provide an empty/dirty Entity.&lt;/p&gt;
&lt;div class=&quot;code panel&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;try&lt;/span&gt; {
  echo $item-&amp;gt;getGroup()-&amp;gt;getName();
} &lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; (\Doctrine\ORM\EntityNotFoundException $enfe) {
  &lt;span class=&quot;code-comment&quot;&gt;// meh
&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Thats probably because the proxies internal methods set _&lt;em&gt;isInitialized&lt;/em&gt;_ to true on the first try. Without reverting it in case of the 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;
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __load()
    {
        &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__ &amp;amp;&amp;amp; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_entityPersister) {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;__isInitialized__ = &lt;span class=&quot;code-keyword&quot;&gt;true&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;_entityPersister-&amp;gt;load($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_identifier, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;) === &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;) {
                &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\ORM\EntityNotFoundException();
            }
            unset($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_entityPersister, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_identifier);
        }
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Is there any reason to do that?&lt;/p&gt;</description>
                <environment></environment>
            <key id="14836">DDC-2432</key>
            <summary>Entity can be initialized even if not found</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="croensch">Christoph Roensch</reporter>
                        <labels>
                    </labels>
                <created>Mon, 6 May 2013 13:01:09 +0000</created>
                <updated>Thu, 9 May 2013 21:38:43 +0000</updated>
                    <resolved>Thu, 9 May 2013 21:38:43 +0000</resolved>
                            <version>2.3.3</version>
                                <fixVersion>2.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20223" author="ocramius" created="Mon, 6 May 2013 13:35:12 +0000"  >&lt;p&gt;That is specifically there to disallow recursive load operations that may occur - did you already try this with latest master?&lt;/p&gt;</comment>
                    <comment id="20224" author="croensch" created="Tue, 7 May 2013 16:15:37 +0000"  >&lt;p&gt;I did not exactly use an &quot;Doctrine Proxy&quot;. A colleque of me implemented his own proxies, wich instead of loading from an entity manager, load stuff from a webservice. He simply used the template that a normal proxy provided and thats where i found this case, throw exception - return initialized. Wich i found would be valid for real proxies too.&lt;/p&gt;

&lt;p&gt;Now i tried to use &lt;a href=&quot;http://www.doctrine-project.org/blog/doctrine-2-4-beta.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/blog/doctrine-2-4-beta.html&lt;/a&gt; but the composer install just fails because common cant be resolved atm. So i downloaded and compiled all tarballs from github into our project. Now the proxy mechanism seems changed, with an _&lt;em&gt;initializer&lt;/em&gt;_ closure&lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/help_16.gif&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; instead. Our &quot;Entities&quot; in question won&apos;t work with that anymore...&lt;/p&gt;

&lt;p&gt;I would have to construct a demo then, implementing real basic proxies with a RDBMS?&lt;/p&gt;</comment>
                    <comment id="20225" author="ocramius" created="Tue, 7 May 2013 16:30:04 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=croensch&quot; class=&quot;user-hover&quot; rel=&quot;croensch&quot;&gt;Christoph Roensch&lt;/a&gt; did you try setting the minimum-stability flag in composer? Give it a try again with 2.4 and ping back - proxies changed a lot since 2.3&lt;/p&gt;</comment>
                    <comment id="20227" author="croensch" created="Wed, 8 May 2013 13:00:28 +0000"  >&lt;p&gt;I reproduced it with the tutorial application, please have a look at the two commits i made on &lt;a href=&quot;https://github.com/croensch/doctrine2-orm-tutorial/tree/DDC-2432&quot; class=&quot;external-link&quot;&gt;https://github.com/croensch/doctrine2-orm-tutorial/tree/DDC-2432&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20255" author="ocramius" created="Thu, 9 May 2013 19:23:45 +0000"  >&lt;p&gt;Proposed a fix at &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/663&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/663&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

<item>
            <title>[DDC-2280] Database-first convert-mapping to XML fails to add length to varchar primary key in id tag</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2280</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In using orm:convert-mapping xml --from-database the xml that is generated for varchar columns does not receive a length attribute.&lt;/p&gt;

&lt;p&gt;Therefore - orm:validate-schema fails and the schema tool reports that the column must change to a varchar(255) when it should be just fine with the varchar that was already there (ex. varchar(10)).&lt;/p&gt;

&lt;p&gt;Note: I discovered this on composite keys - unsure whether this is for all or only composite.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14459">DDC-2280</key>
            <summary>Database-first convert-mapping to XML fails to add length to varchar primary key in id tag</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://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="mcaden">Aaron Moore</reporter>
                        <labels>
                    </labels>
                <created>Wed, 6 Feb 2013 18:21:21 +0000</created>
                <updated>Thu, 9 May 2013 16:17:23 +0000</updated>
                    <resolved>Thu, 9 May 2013 16:17:23 +0000</resolved>
                            <version>2.3.2</version>
                                <fixVersion>2.3.4</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20252" author="beberlei" created="Thu, 9 May 2013 16:17:23 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

<item>
            <title>[DDC-2439] [GH-662] Fixed a code block.</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2439</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 jakzal:&lt;/p&gt;

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

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

&lt;p&gt;Last code block in the &lt;span class=&quot;error&quot;&gt;&amp;#91;Keeping your Modules independent&amp;#93;&lt;/span&gt;(&lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/cookbook/resolve-target-entity-listener.html&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/cookbook/resolve-target-entity-listener.html&lt;/a&gt;) cookbook is broken.&lt;/p&gt;

&lt;p&gt;Sphinx does not like the way code was indented. Building the documentation raises the following error:&lt;/p&gt;

&lt;p&gt;    en/cookbook/resolve-target-entity-listener.rst:121: ERROR: Unexpected indentation.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14845">DDC-2439</key>
            <summary>[GH-662] Fixed a code block.</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Thu, 9 May 2013 14:20:56 +0000</created>
                <updated>Thu, 9 May 2013 14:28:04 +0000</updated>
                    <resolved>Thu, 9 May 2013 14:28:04 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20244" author="doctrinebot" created="Thu, 9 May 2013 14:27:41 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-662&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/662&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/662&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2335] [GH-603] Add a filter to the import and convert mapping</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2335</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 nicolasTheodo:&lt;/p&gt;

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

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

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

&lt;p&gt;I needed to import the mapping of an existing database in order to create doctrine2 entities, but when you run the command, it throw an exception on every table without a primary key.&lt;/p&gt;

&lt;p&gt;I tried to use the filter option, but the error still occurs because the exception was throw in the method which get all the metadata informations.&lt;/p&gt;

&lt;p&gt;I added a method which get the metadata of some tables according to a filter.&lt;/p&gt;

&lt;p&gt;What are your thought bout my issue?&lt;/p&gt;</description>
                <environment></environment>
            <key id="14670">DDC-2335</key>
            <summary>[GH-603] Add a filter to the import and convert mapping</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 6 Mar 2013 09:55:59 +0000</created>
                <updated>Thu, 9 May 2013 14:20:30 +0000</updated>
                    <resolved>Thu, 9 May 2013 14:20:30 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20243" author="doctrinebot" created="Thu, 9 May 2013 14:20:27 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-603&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/603&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/603&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2190] findBy() support finding by a single DateTime but not by multiple DateTime</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2190</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The following code works:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$repository-&amp;gt;findBy(array(&apos;date&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \DateTime()))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;but the following code fails as it does not apply the conversion of the &lt;tt&gt;date&lt;/tt&gt; type for each element:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$repository-&amp;gt;findBy(array(&apos;date&apos; =&amp;gt; array(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \DateTime(), &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \DateTime(&apos;tomorrow&apos;)))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14297">DDC-2190</key>
            <summary>findBy() support finding by a single DateTime but not by multiple DateTime</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="stof">Christophe Coevoet</reporter>
                        <labels>
                    </labels>
                <created>Thu, 6 Dec 2012 17:39:00 +0000</created>
                <updated>Thu, 9 May 2013 12:47:37 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19228" author="beberlei" created="Sun, 6 Jan 2013 09:48:39 +0000"  >&lt;p&gt;This is actually very hard to implement, the problem is that we only have ARRAY constants for PDO::PARAM_INT and PDO::PARAM_STR - all the other types would require special handling.&lt;/p&gt;</comment>
                    <comment id="20241" author="beberlei" created="Thu, 9 May 2013 12:47:37 +0000"  >&lt;p&gt;Attaching failing testcase.&lt;/p&gt;

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

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

<item>
            <title>[DDC-2438] [GH-661] Update annotations-reference.rst</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2438</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 HarmenM:&lt;/p&gt;

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

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

&lt;p&gt;Added missing @JoinColumns in the index&lt;/p&gt;</description>
                <environment></environment>
            <key id="14844">DDC-2438</key>
            <summary>[GH-661] Update annotations-reference.rst</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Thu, 9 May 2013 11:49:46 +0000</created>
                <updated>Thu, 9 May 2013 12:10:45 +0000</updated>
                    <resolved>Thu, 9 May 2013 12:10:45 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20240" author="doctrinebot" created="Thu, 9 May 2013 12:10:33 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-661&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/661&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/661&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2430] Incorrect results when using -&gt;matching on PersistentCollection</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2430</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When using -&amp;gt;matching() on a PersistentCollection that is already loaded, it returns incorrect results when trying to match by id on a relationship.&lt;/p&gt;

&lt;p&gt;// NOTE: the user property is a M:1 relationship of $entity&lt;br/&gt;
$c = new Criteria(Criteria::expr()-&amp;gt;eq(&apos;user&apos;, $userId));&lt;br/&gt;
$res = $entity-&amp;gt;getLikes()-&amp;gt;matching($c);&lt;/p&gt;

&lt;p&gt;// $res is empty, even if $userId exists&lt;/p&gt;</description>
                <environment>Ubuntu 12.04 LTS, PHP 5.4.14</environment>
            <key id="14832">DDC-2430</key>
            <summary>Incorrect results when using -&gt;matching on PersistentCollection</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="stuartcarnie">Stuart Carnie</reporter>
                        <labels>
                        <label>criteria</label>
                    </labels>
                <created>Sun, 5 May 2013 17:47:40 +0000</created>
                <updated>Thu, 9 May 2013 11:25:38 +0000</updated>
                    <resolved>Thu, 9 May 2013 11:25:38 +0000</resolved>
                            <version>2.4</version>
                                <fixVersion>2.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20237" author="beberlei" created="Thu, 9 May 2013 10:53:07 +0000"  >&lt;p&gt;The problem is that matching a user by just the id doesn&apos;t work for in memory here.&lt;br/&gt;
You should use Criteria::expr()-&amp;gt;eq(&apos;user&apos;, $user) instead. The ORM shouldnt allow $userId matching, but this is generic functionality we are reusing here, pretty hard to enforce this. I can take a look.&lt;/p&gt;</comment>
                    <comment id="20238" author="beberlei" created="Thu, 9 May 2013 11:25:38 +0000"  >&lt;p&gt;Fixed and introduced a BC break for this.&lt;/p&gt;

&lt;p&gt;See &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/30f90a6f49d46d2f367ac774aa77e0c7ce1a573f#L0R31&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/30f90a6f49d46d2f367ac774aa77e0c7ce1a573f#L0R31&lt;/a&gt; for information.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-2431] XML Not parsed</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2431</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When i try to generate my entities mapping in Symfony2 using XML I always get the same error:&lt;/p&gt;

&lt;p&gt;Element &apos;&lt;/p&gt;
{http://doctrine-project.org/schemas/orm/doctrine-mapping}
&lt;p&gt;doctrine-mapping&apos;: No matching global declaration avail  &lt;br/&gt;
  able for the validation root&lt;/p&gt;

&lt;p&gt;I am not adding any column, because first i need to validate the XML which I can&apos;t.&lt;/p&gt;

&lt;p&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;br/&gt;
&amp;lt;orm:doctrine-mapping&lt;br/&gt;
    xmlns:xsi=&apos;http://www.w3.org/2001/XMLSchema-instance&apos;&lt;br/&gt;
    xmlns:orm=&apos;http://doctrine-project.org/schemas/orm/doctrine-mapping&apos;&lt;br/&gt;
    xsi:schemaLocation=&apos;http://doctrine-project.org/schemas/orm/doctrine-mapping &lt;a href=&quot;http://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd&lt;/a&gt;&apos;&amp;gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;/orm:doctrine-mapping&amp;gt;&lt;/p&gt;

&lt;p&gt;As you can figure out, my XML is very simple. I am doing just for the validation testing. After this could be validated, I will map my entities.&lt;/p&gt;

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

&lt;p&gt;Regards,&lt;br/&gt;
Peter&lt;/p&gt;</description>
                <environment>Ubuntu 13.04, Symfony2</environment>
            <key id="14833">DDC-2431</key>
            <summary>XML Not parsed</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="pcastrotigre">Petter Castro</reporter>
                        <labels>
                        <label>orm</label>
                        <label>xml</label>
                    </labels>
                <created>Sun, 5 May 2013 18:20:37 +0000</created>
                <updated>Thu, 9 May 2013 10:13:50 +0000</updated>
                    <resolved>Thu, 9 May 2013 10:13:50 +0000</resolved>
                            <version>2.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20234" author="beberlei" created="Thu, 9 May 2013 10:13:50 +0000"  >&lt;p&gt;The Doctrine XSD hooks itself into the global namespace, see &lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/xml-mapping.html&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/xml-mapping.html&lt;/a&gt; for usage. It should work when you loose the &quot;xmlns:orm&quot; and define the tags as &quot;&amp;lt;doctrine-mapping&amp;gt;&quot;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2437] [GH-660] Fixed critical bug with position indexBy in DQL</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2437</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 vlastv:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="14843">DDC-2437</key>
            <summary>[GH-660] Fixed critical bug with position indexBy in DQL</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Wed, 8 May 2013 23:34:09 +0000</created>
                <updated>Thu, 9 May 2013 09:09:56 +0000</updated>
                    <resolved>Thu, 9 May 2013 09:09:56 +0000</resolved>
                                            <fixVersion>2.3.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20232" author="doctrinebot" created="Thu, 9 May 2013 09:08:30 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-660&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/660&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/660&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2434] Error generating entities using annotation docblock (in php). Attribute &quot;fetch&quot; is not being generated by Class EntityGenerator</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2434</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In this part of the code that begins on line 1047 which is generated lines docblock but not being generated attribute fetch.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
            $type = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
            &lt;span class=&quot;code-keyword&quot;&gt;switch&lt;/span&gt; ($associationMapping[&apos;type&apos;]) {
                &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; ClassMetadataInfo::ONE_TO_ONE:
                    $type = &apos;OneToOne&apos;;
                    &lt;span class=&quot;code-keyword&quot;&gt;break&lt;/span&gt;;
                &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; ClassMetadataInfo::MANY_TO_ONE:
                    $type = &apos;ManyToOne&apos;;
                    &lt;span class=&quot;code-keyword&quot;&gt;break&lt;/span&gt;;
                &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; ClassMetadataInfo::ONE_TO_MANY:
                    $type = &apos;OneToMany&apos;;
                    &lt;span class=&quot;code-keyword&quot;&gt;break&lt;/span&gt;;
                &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; ClassMetadataInfo::MANY_TO_MANY:
                    $type = &apos;ManyToMany&apos;;
                    &lt;span class=&quot;code-keyword&quot;&gt;break&lt;/span&gt;;
            }
            $typeOptions = array();

            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($associationMapping[&apos;targetEntity&apos;])) {
                $typeOptions[] = &apos;targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;&apos; . $associationMapping[&apos;targetEntity&apos;] . &apos;&quot;&lt;/span&gt;&apos;;
            }

            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($associationMapping[&apos;inversedBy&apos;])) {
                $typeOptions[] = &apos;inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;&apos; . $associationMapping[&apos;inversedBy&apos;] . &apos;&quot;&lt;/span&gt;&apos;;
            }

            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($associationMapping[&apos;mappedBy&apos;])) {
                $typeOptions[] = &apos;mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;&apos; . $associationMapping[&apos;mappedBy&apos;] . &apos;&quot;&lt;/span&gt;&apos;;
            }

            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($associationMapping[&apos;cascade&apos;]) {
                $cascades = array();

                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($associationMapping[&apos;isCascadePersist&apos;]) $cascades[] = &apos;&lt;span class=&quot;code-quote&quot;&gt;&quot;persist&quot;&lt;/span&gt;&apos;;
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($associationMapping[&apos;isCascadeRemove&apos;]) $cascades[] = &apos;&lt;span class=&quot;code-quote&quot;&gt;&quot;remove&quot;&lt;/span&gt;&apos;;
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($associationMapping[&apos;isCascadeDetach&apos;]) $cascades[] = &apos;&lt;span class=&quot;code-quote&quot;&gt;&quot;detach&quot;&lt;/span&gt;&apos;;
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($associationMapping[&apos;isCascadeMerge&apos;]) $cascades[] = &apos;&lt;span class=&quot;code-quote&quot;&gt;&quot;merge&quot;&lt;/span&gt;&apos;;
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($associationMapping[&apos;isCascadeRefresh&apos;]) $cascades[] = &apos;&lt;span class=&quot;code-quote&quot;&gt;&quot;refresh&quot;&lt;/span&gt;&apos;;

                $typeOptions[] = &apos;cascade={&apos; . implode(&apos;,&apos;, $cascades) . &apos;}&apos;;
            }

            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($associationMapping[&apos;orphanRemoval&apos;]) &amp;amp;&amp;amp; $associationMapping[&apos;orphanRemoval&apos;]) {
                $typeOptions[] = &apos;orphanRemoval=&apos; . ($associationMapping[&apos;orphanRemoval&apos;] ? &apos;&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;&apos; : &apos;&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;&apos;);
            }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Below is one possible solution.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
            $typesFetch = array(
                2 =&amp;gt; &apos;LAZY&apos;,
                3 =&amp;gt; &apos;EAGER&apos;,
                4 =&amp;gt; &apos;EXTRA_LAZY&apos;
            );

            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;(isset($associationMapping[&apos;fetch&apos;])) {
                $typeOptions[] = &apos;fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;&apos; . $typesFetch[$associationMapping[&apos;fetch&apos;]] . &apos;&quot;&lt;/span&gt;&apos;;
            }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Tanks&lt;/p&gt;
</description>
                <environment>Windows xp, Apache 2.2 and PHP 5.3.15</environment>
            <key id="14839">DDC-2434</key>
            <summary>Error generating entities using annotation docblock (in php). Attribute &quot;fetch&quot; is not being generated by Class EntityGenerator</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://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="coisa2004">Andr&#233; Ant&#244;nio Lemos de Moraes</reporter>
                        <labels>
                    </labels>
                <created>Tue, 7 May 2013 19:22:15 +0000</created>
                <updated>Thu, 9 May 2013 08:56:59 +0000</updated>
                    <resolved>Thu, 9 May 2013 08:56:59 +0000</resolved>
                            <version>2.3.3</version>
                                <fixVersion>2.3.4</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20230" author="beberlei" created="Thu, 9 May 2013 08:45:02 +0000"  >&lt;p&gt;Highlighted code&lt;/p&gt;</comment>
                    <comment id="20231" author="beberlei" created="Thu, 9 May 2013 08:56:59 +0000"  >&lt;p&gt;Fixed and will be included in 2.3.4 release&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2147] Custom annotation in MappedSuperclass</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2147</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When you try use custom annotation in mappedsuperclass like here &lt;a href=&quot;http://pastebin.com/YMxKvcLk&quot; class=&quot;external-link&quot;&gt;http://pastebin.com/YMxKvcLk&lt;/a&gt; and then i try get metadata for class i get this error &lt;br/&gt;
Undefined index: fieldName&lt;br/&gt;
ClassMetadataInfo.php  function addInheritedFieldMapping&lt;br/&gt;
Problem is that custom annotation doesnt have fieldName. &lt;br/&gt;
Quick fix is add condition to test if fieldName isset. &lt;/p&gt;</description>
                <environment>Linux 3.6.6-1.fc17.x86_64</environment>
            <key id="14227">DDC-2147</key>
            <summary>Custom annotation in MappedSuperclass</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="10000" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="kluk">kluk</reporter>
                        <labels>
                    </labels>
                <created>Thu, 15 Nov 2012 07:46:38 +0000</created>
                <updated>Tue, 7 May 2013 21:24:53 +0000</updated>
                                    <version>2.2.1</version>
                                                <component>Mapping Drivers</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="18988" author="kluk" created="Thu, 15 Nov 2012 09:24:39 +0000"  >&lt;p&gt;error log from orm:validate-schema&lt;/p&gt;</comment>
                    <comment id="19373" author="ocramius" created="Wed, 23 Jan 2013 21:47:56 +0000"  >&lt;p&gt;Copying from pastebin:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
use \Doctrine\ORM\Mapping as ORM;
use \xxx\Doctrine\Annotation\Entity as re;
use \xxx\Doctrine\Annotation\Forms as rf;
use \Doctrine\Common\Collections;
 
/**
 * @ORM\Entity
 */
class EventPicture &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; \Picture
{
 
    /**
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Event&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;eventPicture&quot;&lt;/span&gt;)
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;FK_Event&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $event;
 
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
use \Doctrine\ORM\Mapping as ORM;
use \xxx\Doctrine\Annotation\Entity as re;
use \xxx\Doctrine\Annotation\Forms as rf;
use \Doctrine\Common\Collections;
 
/** @ORM\MappedSuperclass */
class Picture &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; \xxx\Doctrine\Entity\BaseEntity
{
 
    /**
     * @ORM\Id
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     * @ORM\GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;IDENTITY&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; type
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;
 
    /**
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;,unique=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     *  @rf\FileUpload(fileSize=&lt;span class=&quot;code-quote&quot;&gt;&quot;php&quot;&lt;/span&gt;,uploadType=&lt;span class=&quot;code-quote&quot;&gt;&quot;local&quot;&lt;/span&gt;,fieldName=&lt;span class=&quot;code-quote&quot;&gt;&quot;link&quot;&lt;/span&gt;,formControl=&lt;span class=&quot;code-quote&quot;&gt;&quot;FileUploadField&quot;&lt;/span&gt;,image=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
     *
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $link;
 
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=kluk&quot; class=&quot;user-hover&quot; rel=&quot;kluk&quot;&gt;kluk&lt;/a&gt; does this happen also with any other simple custom annotation? For example following:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * @Annotation 
 * @Target({&lt;span class=&quot;code-quote&quot;&gt;&quot;PROPERTY&quot;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&quot;ANNOTATION&quot;&lt;/span&gt;})
 */
&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; class Entity &lt;span class=&quot;code-keyword&quot;&gt;implements&lt;/span&gt; Annotation
{
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; $value;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="19438" author="kluk" created="Wed, 30 Jan 2013 08:28:42 +0000"  >&lt;p&gt;the same error when using simple annotation.&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-none&quot;&gt; 
&amp;lt;?php

use \Doctrine\ORM\Mapping as ORM;
use \xxx\Doctrine\Annotation\Entity as re;
use \xxx\Doctrine\Annotation\Forms as rf;
use \Doctrine\Common\Collections;

/** @ORM\MappedSuperclass */
class Picture extends \xxx\Doctrine\Entity\BaseEntity {

    /**
     * @ORM\Id
     * @ORM\Column(type=&quot;integer&quot;)
     * @ORM\GeneratedValue(strategy=&quot;IDENTITY&quot;)
     * @var type
     */
    protected $id;

   
    /**
     * @ORM\Column(type=&quot;integer&quot;)
     * @rf\SetClass({&quot;class&quot;,&quot;hide&quot;})
     */
    public $value;

    /**
     * @ORM\Column(type=&quot;string&quot;,unique=true, nullable=true)
     * @rf\FileUpload(fileSize=&quot;php&quot;,uploadType=&quot;local&quot;,fieldName=&quot;link&quot;,formControl=&quot;FileUploadField&quot;,image=true)
     *
     */
    protected $link;

}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 


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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-2428] [GH-658] UPDATE clause supports ORDER BY and LIMIT</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2428</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 tomglue:&lt;/p&gt;

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

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

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

&lt;p&gt;I wanted get some feedback on what you thought about supporting ORDER BY and LIMIT for UPDATE statements.&lt;/p&gt;

&lt;p&gt;Is there a reason this has not already been implemented?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</description>
                <environment></environment>
            <key id="14830">DDC-2428</key>
            <summary>[GH-658] UPDATE clause supports ORDER BY and LIMIT</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Sun, 5 May 2013 10:35:40 +0000</created>
                <updated>Sun, 5 May 2013 16:32:13 +0000</updated>
                    <resolved>Sun, 5 May 2013 16:32:13 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20216" author="doctrinebot" created="Sun, 5 May 2013 16:32:02 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-658&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/658&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/658&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2409] Merge operation tries to add new detached entities to indentity map and load them as proxies</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2409</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
class A
    {
       /**
        *  @ORM\ManyToOne(targetEntity= &lt;span class=&quot;code-quote&quot;&gt;&quot;B&quot;&lt;/span&gt;...
        *  @ORM\JoinColumn(name=&quot; ...
        */
        &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $b;
        
        &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getB()
        {
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;b;
        }
        
        &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setB($b)
        {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;b = $b;
        }
}
    
    class B
	{
       /**
        * As
        *
        * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; \Doctrine\Common\Collections\Collection
        *
        * @ORM\OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;A&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;B&quot;&lt;/span&gt;)
        */
		&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $As;
    }
	
	$b = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \B();
	
	$a = $em-&amp;gt;find(&apos;A&apos;, 123);
	
	$a-&amp;gt;setB($b);
	
	$em-&amp;gt;detach($a);
	
	$em-&amp;gt;detach($b);
	
	$b = $em-&amp;gt;merge($b); &lt;span class=&quot;code-comment&quot;&gt;// notice that $b now is merged
&lt;/span&gt;	
	$a = $em-&amp;gt;merge($a); &lt;span class=&quot;code-comment&quot;&gt;//  hangs as it creates the proxy &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; $b and tries to load a though __load even though $b is already managed&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Couple of possible issues in the following code from doMerge:&lt;/p&gt;
&lt;div class=&quot;code panel&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; ($assoc2[&apos;type&apos;] &amp;amp; ClassMetadata::TO_ONE) {
                        $other = $prop-&amp;gt;getValue($entity);
                        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($other === &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;) {
                            $prop-&amp;gt;setValue($managedCopy, &lt;span class=&quot;code-keyword&quot;&gt;null&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; ($other &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; Proxy &amp;amp;&amp;amp; !$other-&amp;gt;__isInitialized__) {
                            &lt;span class=&quot;code-comment&quot;&gt;// &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; not merge fields marked lazy that have not been fetched.
&lt;/span&gt;                            &lt;span class=&quot;code-keyword&quot;&gt;continue&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; ( ! $assoc2[&apos;isCascadeMerge&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;getEntityState($other, self::STATE_DETACHED) !== self::STATE_MANAGED) {
                                $targetClass = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;getClassMetadata($assoc2[&apos;targetEntity&apos;]);
                                $relatedId = $targetClass-&amp;gt;getIdentifierValues($other);

                                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($targetClass-&amp;gt;subClasses) {
                                    $other = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;find($targetClass-&amp;gt;name, $relatedId);
                                } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
                                    $other = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;getProxyFactory()-&amp;gt;getProxy($assoc2[&apos;targetEntity&apos;], $relatedId);
                                    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;registerManaged($other, $relatedId, array());
                                }
                            }
                            $prop-&amp;gt;setValue($managedCopy, $other);
                        }
&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;
     $relatedId = $targetClass-&amp;gt;getIdentifierValues($other);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;$relatedId is emply as the detached $other was never flushed. It should never be used to add this entity to the identityMap ($this-&amp;gt;registerManaged($other, $relatedId, array())&lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/wink.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$other = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;getProxyFactory()-&amp;gt;getProxy($assoc2[&apos;targetEntity&apos;], $relatedId);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This should never use the proxy factory for new detached entities as they are already merged back ($b). This method seems to not have any means to find managed $b.&lt;/p&gt;

&lt;p&gt;If $b = $em-&amp;gt;merge($b); was not called, the method would probably have worked but I think it is not right to rely on that calling or not calling certain methods or their order.&lt;/p&gt;


</description>
                <environment></environment>
            <key id="14798">DDC-2409</key>
            <summary>Merge operation tries to add new detached entities to indentity map and load them as proxies</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="deatheriam">Oleg Namaka</reporter>
                        <labels>
                    </labels>
                <created>Mon, 22 Apr 2013 17:58:56 +0000</created>
                <updated>Sun, 5 May 2013 14:02:44 +0000</updated>
                    <resolved>Wed, 1 May 2013 09:01:46 +0000</resolved>
                            <version>2.3.1</version>
                                <fixVersion>2.4</fixVersion>
                <fixVersion>2.3.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20139" author="beberlei" created="Wed, 1 May 2013 09:01:46 +0000"  >&lt;p&gt;Merged Fabios Pull Request&lt;/p&gt;</comment>
                    <comment id="20144" author="deatheriam" created="Wed, 1 May 2013 12:14:36 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/655&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/655&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2169] [GH-524] EntityManagerDecorator base class as an extension point for EntityManager</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2169</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 lstrojny:&lt;/p&gt;

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

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

&lt;p&gt;As discussed on IRC. Open issues to be discussed:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Should we better extend ObjectManagerDecorator (see &lt;a href=&quot;https://github.com/doctrine/common/pull/229&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/pull/229&lt;/a&gt;) and introduce an EntityManagerInterface?&lt;/li&gt;
	&lt;li&gt;Should the abstract decorator have a constructor?&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
            <key id="14272">DDC-2169</key>
            <summary>[GH-524] EntityManagerDecorator base class as an extension point for EntityManager</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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, 26 Nov 2012 00:06:27 +0000</created>
                <updated>Sat, 4 May 2013 13:02:50 +0000</updated>
                    <resolved>Sat, 4 May 2013 13:02:50 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20214" author="doctrinebot" created="Sat, 4 May 2013 13:02:43 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-524&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/524&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/524&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2201] [GH-537] fixed problems with joined inheritance and composite keys</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2201</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Powerhamster:&lt;/p&gt;

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

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

&lt;p&gt;SchemaTool now creates all Id columns not just only the first one.&lt;br/&gt;
Insert statement for child entity now contains parameter for additional key columns only once.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14314">DDC-2201</key>
            <summary>[GH-537] fixed problems with joined inheritance and composite keys</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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, 16 Dec 2012 17:23:33 +0000</created>
                <updated>Sat, 4 May 2013 12:59:14 +0000</updated>
                    <resolved>Sat, 4 May 2013 12:59:14 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20213" author="doctrinebot" created="Sat, 4 May 2013 12:59:08 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-537&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/537&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/537&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-2006] one2many to self inverts table aliasses and creates wrong db query</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2006</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;See attachment for description.&lt;/p&gt;</description>
                <environment>Debian VM, MySQL, Zend-Framework</environment>
            <key id="14003">DDC-2006</key>
            <summary>one2many to self inverts table aliasses and creates wrong db query</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ksafke">Xavier Dekeyster</reporter>
                        <labels>
                    </labels>
                <created>Fri, 31 Aug 2012 12:38:48 +0000</created>
                <updated>Sat, 4 May 2013 12:45:45 +0000</updated>
                    <resolved>Sat, 4 May 2013 12:45:44 +0000</resolved>
                                                            <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="19949" author="fabio.bat.silva" created="Sat, 6 Apr 2013 15:08:43 +0000"  >&lt;p&gt;Hi Xavier,&lt;/p&gt;

&lt;p&gt;Could you past your entities and mappings please ?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                    <comment id="19996" author="beberlei" created="Sun, 14 Apr 2013 09:54:35 +0000"  >&lt;p&gt;What version of Doctrine are you using? This sounds like a bug that was fixed some time ago&lt;/p&gt;</comment>
                    <comment id="20212" author="beberlei" created="Sat, 4 May 2013 12:45:44 +0000"  >&lt;p&gt;The query is correct, &quot;c.parentCategory c2&quot; generates the right query as per your screenshot. Its just not the order of the queries that you want, Native SQL wil help you here.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11317" name="Screen Shot 2012-08-31 at 14.31.21.png" size="66452" author="ksafke" created="Fri, 31 Aug 2012 12:38:48 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2258] [GH-556] Create queryBuilder from parts.</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2258</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 NoUseFreak:&lt;/p&gt;

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

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

&lt;p&gt;Add a feature that can create a queryBuilder from queryBuilder parts.&lt;/p&gt;

&lt;p&gt;This can be used when a query is build and needs to be stored somehow and restore it later.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14415">DDC-2258</key>
            <summary>[GH-556] Create queryBuilder from parts.</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 25 Jan 2013 22:45:24 +0000</created>
                <updated>Sat, 4 May 2013 12:17:18 +0000</updated>
                    <resolved>Sat, 4 May 2013 12:17:18 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20210" author="doctrinebot" created="Sat, 4 May 2013 12:17:04 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-556&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/556&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/556&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

<item>
            <title>[DDC-2350] [GH-614] ObjectHydrator: fix entity namespaces.</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2350</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 jelmersnoeck:&lt;/p&gt;

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

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

&lt;ol&gt;
	&lt;li&gt;Object Hydrator: fix entity namespaces&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;If you are using Entity Namespace aliases, the ObjectHydrator will throw a notice for an undefined index of your entity namespace.&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;
	&lt;ol&gt;
		&lt;li&gt;Problem&lt;br/&gt;
The problem lies in the fact that the prepare() method uses the &quot;className&quot;, used in the aliasMap (where you use the namespace alias) to store the local ClassMetadata cache. Though, in a later stage the actual namespace is being used to find this same item.&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
&lt;/ol&gt;


&lt;ol&gt;
	&lt;li&gt;
	&lt;ol&gt;
		&lt;li&gt;Fix&lt;br/&gt;
I&apos;ve changed the way this ClassMetadata cache is built. It now uses the full Entity namespace.&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment></environment>
            <key id="14694">DDC-2350</key>
            <summary>[GH-614] ObjectHydrator: fix entity namespaces.</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 14 Mar 2013 17:01:24 +0000</created>
                <updated>Sat, 4 May 2013 11:48:33 +0000</updated>
                    <resolved>Sat, 4 May 2013 11:48:33 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20206" author="doctrinebot" created="Sat, 4 May 2013 11:48:15 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-614&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/614&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/614&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

&lt;p&gt;This is what I am doing:&lt;/p&gt;

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

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

<item>
            <title>[DDC-2267] EntityManager throws an exception when trying to flush($entity) on a deleted entity</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2267</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;$entity = $em-&amp;gt;find(&quot;Bug&quot;, 1);&lt;br/&gt;
$em-&amp;gt;remove($entity);&lt;br/&gt;
$em-&amp;gt;flush($entity);&lt;/p&gt;

&lt;p&gt;Throws an exception. Works fine with $em-&amp;gt;flush() (No $entity provided).&lt;/p&gt;

&lt;p&gt;Would be nice to just flush the deleted entity separate from other entities. This technically works for other operations except remove(). The exception claims that the entity is not mapped. It technically can&apos;t be mapped since it&apos;s set to be deleted.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14437">DDC-2267</key>
            <summary>EntityManager throws an exception when trying to flush($entity) on a deleted entity</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="gena01">Gennady Feldman</reporter>
                        <labels>
                    </labels>
                <created>Thu, 31 Jan 2013 03:54:57 +0000</created>
                <updated>Sat, 4 May 2013 11:40:19 +0000</updated>
                    <resolved>Sat, 4 May 2013 11:40:19 +0000</resolved>
                            <version>2.3.2</version>
                                <fixVersion>2.3.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20203" author="beberlei" created="Sat, 4 May 2013 11:40:19 +0000"  >&lt;p&gt;Fixed in 2.3 branch, for 2.3.4&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="14512">DDC-2309</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2426] XML Mapping XSD: Missing length attribute for complexType id</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2426</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The xsd file for the doctrine XML mapping specification does not allow the complexType id to contain a length property.&lt;/p&gt;

&lt;p&gt;This prevents IDEs from giving proper auto-completion for the &amp;lt;id&amp;gt; element.&lt;/p&gt;

&lt;p&gt;To fix, simply add the following at line 332 of the xsd:&lt;/p&gt;

&lt;div class=&quot;code panel&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;xs:attribute name=&lt;span class=&quot;code-quote&quot;&gt;&quot;length&quot;&lt;/span&gt; type=&lt;span class=&quot;code-quote&quot;&gt;&quot;xs:NMTOKEN&quot;&lt;/span&gt; /&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14827">DDC-2426</key>
            <summary>XML Mapping XSD: Missing length attribute for complexType id</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="amoore">Andrew Moore</reporter>
                        <labels>
                    </labels>
                <created>Fri, 3 May 2013 20:00:51 +0000</created>
                <updated>Sat, 4 May 2013 11:00:25 +0000</updated>
                    <resolved>Sat, 4 May 2013 11:00:25 +0000</resolved>
                            <version>2.3.3</version>
                                <fixVersion>2.3.4</fixVersion>
                                <component>Documentation</component>
                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2427] Not working orphanRemoval (OneToMany)</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2427</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Not working orphanRemoval (OneToMany). The element from target entity deleted but still available. I Not get any error, just not deleted.&lt;/p&gt;

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

&lt;p&gt;class SecurityForm implements SecurityEntityInterface&lt;br/&gt;
{&lt;br/&gt;
   ...&lt;/p&gt;

&lt;p&gt;    /**&lt;br/&gt;
     *&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@ORM\OneToMany(targetEntity=&quot;SecurityFormField&quot;, mappedBy=&quot;form&quot;, cascade=
{&quot;persist&quot;}
&lt;p&gt;, orphanRemoval=true)&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;@ORM\OrderBy(
{&quot;order&quot; = &quot;ASC&quot;}
&lt;p&gt;)&lt;br/&gt;
     */&lt;br/&gt;
    private $formFields;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;   ....&lt;/p&gt;

&lt;p&gt;}&lt;/p&gt;</description>
                <environment></environment>
            <key id="14828">DDC-2427</key>
            <summary>Not working orphanRemoval (OneToMany)</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="zion03">Dmitry</reporter>
                        <labels>
                        <label>orm</label>
                    </labels>
                <created>Fri, 3 May 2013 23:13:00 +0000</created>
                <updated>Sat, 4 May 2013 10:45:21 +0000</updated>
                    <resolved>Sat, 4 May 2013 10:45:21 +0000</resolved>
                            <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20199" author="beberlei" created="Sat, 4 May 2013 10:44:51 +0000"  >&lt;p&gt;Works for me, see code attached&lt;/p&gt;</comment>
                    <comment id="20200" author="beberlei" created="Sat, 4 May 2013 10:45:21 +0000"  >&lt;p&gt;Please provide a failing testcase if you wan&apos;t to reopen the ticket.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11525" name="DDC2427Test.php" size="1101" author="beberlei" created="Sat, 4 May 2013 10:44:51 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2425] Parent entity sometimes fails to load when validating/updating schema.</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2425</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Should not have reported, was a stupid mistake on my part.&lt;/p&gt;</description>
                <environment>Debian 6.0.6 x64</environment>
            <key id="14826">DDC-2425</key>
            <summary>Parent entity sometimes fails to load when validating/updating schema.</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="5" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/trivial.png">Trivial</priority>
                    <status id="5" iconUrl="http://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="selosindis">Scott Gibson</reporter>
                        <labels>
                        <label>Cli</label>
                        <label>orm</label>
                        <label>schematool</label>
                    </labels>
                <created>Fri, 3 May 2013 19:41:55 +0000</created>
                <updated>Fri, 3 May 2013 20:17:09 +0000</updated>
                    <resolved>Fri, 3 May 2013 20:17:09 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

<item>
            <title>[DDC-1314] DQL permits partial select using SQL</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1314</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The following code is not correct DQL and should (I think?) throw an error:&lt;/p&gt;

&lt;p&gt;    $query = $em-&amp;gt;createQuery(&quot;SELECT g.id, g.name FROM Entity\Group g ORDER BY g.name ASC&quot;);&lt;/p&gt;

&lt;p&gt;...to force the user to use SELECT partial g.&lt;/p&gt;
{id,name}
&lt;p&gt; ...&lt;/p&gt;

&lt;p&gt;Instead, it causes very funny behaviour. eg. when iterating, objects are passed to the foreach in the following pattern:&lt;/p&gt;

&lt;p&gt;$groups = $query-&amp;gt;iterate();&lt;br/&gt;
foreach(...) {&lt;br/&gt;
    1st time: $groups = array(  &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; =&amp;gt; object )&lt;br/&gt;
    2nd time: $groups = array(  &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; =&amp;gt; object )&lt;br/&gt;
    3rd time: $groups = array(  &lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt; =&amp;gt; object )&lt;br/&gt;
}&lt;/p&gt;</description>
                <environment>Mac OS X 10.6.7, PHP 5.3.5, Doctrine 2.1.0</environment>
            <key id="12890">DDC-1314</key>
            <summary>DQL permits partial select using SQL</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="daniel.beresh">Daniel Beresh</reporter>
                        <labels>
                    </labels>
                <created>Tue, 2 Aug 2011 05:41:49 +0000</created>
                <updated>Wed, 1 May 2013 21:26:21 +0000</updated>
                    <resolved>Wed, 1 May 2013 21:26:05 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>3.0</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16277" author="beberlei" created="Sat, 6 Aug 2011 17:08:09 +0000"  >&lt;p&gt;The incrementation of the return value is a bug, but SELECT g.id, g.name is valid DQL. You hydrate the values as scalars.  What is funny is why it even returns an object in this case.&lt;/p&gt;</comment>
                    <comment id="16963" author="guilhermeblanco" created="Sun, 11 Dec 2011 07:20:19 +0000"  >&lt;p&gt;Added failing test case.&lt;br/&gt;
Currently it is not easily doable without larger refactoring of Hydrators.&lt;br/&gt;
I&apos;ll keep this opened, but my 2 attempts failed.&lt;/p&gt;</comment>
                    <comment id="18134" author="guilhermeblanco" created="Sat, 23 Jun 2012 04:32:23 +0000"  >&lt;p&gt;Scheduled for 3.0 since we&apos;re going to refactor the hydrators&lt;/p&gt;</comment>
                    <comment id="20187" author="beberlei" created="Wed, 1 May 2013 21:26:05 +0000"  >&lt;p&gt;Duplicate of &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-2133&quot; title=&quot;Issue with Query::iterate and query mixed results&quot;&gt;DDC-2133&lt;/a&gt; (better description)&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                <outwardlinks description="duplicates">
                            <issuelink>
            <issuekey id="14206">DDC-2133</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                    <attachment id="11128" name="IteratableHydratorTest.php" size="1474" author="guilhermeblanco" created="Sun, 11 Dec 2011 07:20:19 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1908] Symfony 2 Doctrine join tables error</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1908</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hello developers of Doctrine. I appreiate your work on a such complicated project. So seems I&apos;found a bug in Doctrine in generating SQL&lt;br/&gt;
I had written this issue on Symfony forum but noone is answering, so maybe I&apos;ve found the bug of Doctrine or FOSUserBundle&lt;br/&gt;
I&apos;m using Symfony 2.0.12, so I&apos;ve installed as git submodules FOSUserBundle, created User Entity with one-to-one relationship with Company Entity, here goes the code:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&amp;lt;?php

namespace AV\TradeBundle\Entity;

use FOS\UserBundle\Entity\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;

/**

    @ORM\Entity

    @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;fos_user&quot;&lt;/span&gt;)
    /
    class User &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; BaseUser
    {
    /*
        @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;

    /**
        @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; company *
        @ORM\OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Companies&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;user&quot;&lt;/span&gt;) * */ &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $company;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function construct()
    {
    parent::construct();
    &lt;span class=&quot;code-comment&quot;&gt;// your own logic
&lt;/span&gt;    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getCompany() {
    &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;company;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setCompany($company) {
    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;company = $company;
    }
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and piece of Company Entity:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&amp;lt;?php
/**
* @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; user
*
* @ORM\OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;user&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;company&quot;&lt;/span&gt;)
* @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&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;When creating fixtures I&apos;m using such method (all references are set, and I have checked for foreign keys in DB - everything is fine)&lt;br/&gt;
$this-&amp;gt;container-&amp;gt;get(&apos;fos_user.user_manager&apos;)-&amp;gt;createUser($user);&lt;br/&gt;
When I&apos;m trying to login I see such error:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SQLSTATE[42S22]: Column not found: 1054 Unknown column &apos;t46.id&apos; in &apos;on clause&apos;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The whole SELECT statement that I found in logs sounds like this 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;SELECT t0.username AS username1, t0.username_canonical AS username_canonical2, t0.email AS email3, t0.email_canonical AS email_canonical4, t0.enabled AS enabled5,
 t0.salt AS salt6, t0.password AS password7, t0.last_login AS last_login8, t0.locked AS locked9, t0.expired AS expired10, t0.expires_at AS expires_at11, 
t0.confirmation_token AS confirmation_token12, t0.password_requested_at AS password_requested_at13, t0.roles AS roles14, t0.credentials_expired AS credentials_expired15,
 t0.credentials_expire_at AS credentials_expire_at16, t0.id AS id17, t18.id AS id19, t18.egrpou AS egrpou20, t18.business_form AS business_form21, t18.title AS title22, 
t18.phone_code AS phone_code23, t18.phone_country_code AS phone_country_code24, t18.phone AS phone25, t18.fax_code AS fax_code26, 
t18.fax_country_code AS fax_country_code27, t18.fax AS fax28, t18.website AS website29, t18.fio AS fio30, t18.birthday AS birthday31, t18.firm_created AS firm_created32, 
t18.employees_count AS employees_count33, t18.logo AS logo34, t18.zip AS zip35, t18.street AS street36, t18.position AS position37, t18.thumb_logo AS thumb_logo38, 
t18.description AS description39, t18.created_at AS created_at40, t18.email AS email41, t18.cities_id AS cities_id42, t18.regions_id AS regions_id43, t18.countries_id AS countries_id44,
 t18.user_id AS user_id45 FROM fos_user t0 LEFT JOIN companies t18 ON t18.user_id = t46.id WHERE t0.username_canonical = ? ([&lt;span class=&quot;code-quote&quot;&gt;&quot;cfyzz&quot;&lt;/span&gt;]) [] []
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Does anyone know why it&apos;s not t0 in join condition but t46?&lt;br/&gt;
If needed I&apos;ll show my deps.lock, maybe such situation was already fixed, but I was googling for answer for several days - and nothing.&lt;br/&gt;
Thanks in advance&lt;/p&gt;</description>
                <environment>Linux, Apache, mysql</environment>
            <key id="13821">DDC-1908</key>
            <summary>Symfony 2 Doctrine join tables error</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="cfyzz">Alex Koch</reporter>
                        <labels>
                    </labels>
                <created>Thu, 5 Jul 2012 08:13:55 +0000</created>
                <updated>Wed, 1 May 2013 21:23:40 +0000</updated>
                    <resolved>Wed, 1 May 2013 21:23:40 +0000</resolved>
                            <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="18196" author="beberlei" created="Thu, 5 Jul 2012 19:14:40 +0000"  >&lt;p&gt;Fixed formatting&lt;/p&gt;</comment>
                    <comment id="18197" author="beberlei" created="Thu, 5 Jul 2012 19:22:43 +0000"  >&lt;p&gt;What version of Doctrine are you using? you can check in vendor/doctrine-orm/lib/Doctrine/ORM/Version.php&lt;/p&gt;</comment>
                    <comment id="18215" author="cfyzz" created="Fri, 6 Jul 2012 06:03:28 +0000"  >&lt;p&gt;Thanks, Benjamin, for so quick answer.&lt;br/&gt;
I&apos;ve checked the file you mentioned - the version is &quot;2.1.6&quot;&lt;/p&gt;</comment>
                    <comment id="20186" author="beberlei" created="Wed, 1 May 2013 21:23:40 +0000"  >&lt;p&gt;This was fixed in later versions.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2176] Illegal offset type in isset or empty in UnitOfWork</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2176</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Steps to reproduce the problem?&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;A custom DBAL type, that extends a scalar build-in type e.g. &lt;tt&gt;DBAL\Types\StringType&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;convertToPHPValue&lt;/tt&gt; of custom DBAL type returns an instance of a class (implements &lt;tt&gt;__toString&lt;/tt&gt; method)&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;Custom DBAL type is used as primary key in an entity&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;initially persist entity and flush entity manager&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;modify entity (keep same primary key) and persist entity again causes:&lt;br/&gt;
&lt;font color=&quot;red&quot;&gt;&lt;br/&gt;
Warning: Illegal offset type in isset or empty in &lt;tt&gt;vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php&lt;/tt&gt; line 2407&lt;/font&gt;&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;I guess the solution in &lt;tt&gt;Doctrine\ORM\Internal\Hydration&lt;/tt&gt; namespace by explicit converting result of &lt;tt&gt;convertToPHPValue&lt;/tt&gt; if result is not a scalar value.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14279">DDC-2176</key>
            <summary>Illegal offset type in isset or empty in UnitOfWork</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="godzilla80">Yves Berkholz</reporter>
                        <labels>
                        <label>unitofwork</label>
                    </labels>
                <created>Wed, 28 Nov 2012 07:48:17 +0000</created>
                <updated>Wed, 1 May 2013 21:20:26 +0000</updated>
                    <resolved>Wed, 1 May 2013 21:20:26 +0000</resolved>
                            <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="19389" author="ocramius" created="Wed, 23 Jan 2013 22:47:17 +0000"  >&lt;p&gt;This one will introduce way too much overhead. We don&apos;t really support identifiers that are custom object types.&lt;/p&gt;

&lt;p&gt;What is the exact version of the ORM? I couldn&apos;t spot anything at line 2407.&lt;/p&gt;</comment>
                    <comment id="19396" author="godzilla80" created="Thu, 24 Jan 2013 08:10:37 +0000"  >&lt;p&gt;I use a dev branch and updated the version since creation of the report, hence the line number changed to 2466.&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;UnitOfWork.php&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;else&lt;/span&gt; {
	$entity = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;newInstance($class);
	$oid    = spl_object_hash($entity);

	$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;entityIdentifiers[$oid]  = $id;
	$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;entityStates[$oid]       = self::STATE_MANAGED;
	$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;originalEntityData[$oid] = $data;

	$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;identityMap[$class-&amp;gt;rootEntityName][$idHash] = $entity; &lt;span class=&quot;code-comment&quot;&gt;// &amp;lt;- 2466
&lt;/span&gt;
	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($entity &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; NotifyPropertyChanged) {
		$entity-&amp;gt;addPropertyChangedListener($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;);
	}

	$overrideLocalValues = &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Ok, I understand the overhead problem. I only tried to create a custom enum type that is represented by a class.&lt;br/&gt;
But i solved this by converting the value within the getter/setter of entity class.&lt;br/&gt;
It would have been nice to do this in the DBAL type, but it works that way.&lt;br/&gt;
Therefore, you might close the report or move it on a far future version &quot;wishlist&quot;. &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;br/&gt;
Anyway, thank for your time.&lt;/p&gt;

&lt;p&gt;Nevertheless the information you requested:&lt;br/&gt;
Composer: doctrine/orm &lt;span class=&quot;error&quot;&gt;&amp;#91;2.3.x-dev fdd0af3&amp;#93;&lt;/span&gt; &lt;br/&gt;
git reference: &lt;a href=&quot;https://github.com/doctrine/doctrine2/archive/fdd0af34e6fced967b8751bc3e4792c11ef86d57.zip&quot; class=&quot;external-link&quot;&gt;fdd0af34e6fced967b8751bc3e4792c11ef86d57&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Additionally, exception trace might help&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; 
() at D:/projects/{projectname}/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:2466
 Symfony/Component/HttpKernel/Debug/ErrorHandler-&amp;gt;handle() at D:/projects/{projectname}/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:2466
 Doctrine/ORM/UnitOfWork-&amp;gt;createEntity() at D:/projects/{projectname}/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php:135
 Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator-&amp;gt;hydrateRowData() at D:/projects/{projectname}/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php:50
 Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator-&amp;gt;hydrateAllData() at D:/projects/{projectname}/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php:111
 Doctrine/ORM/Internal/Hydration/AbstractHydrator-&amp;gt;hydrateAll() at D:/projects/{projectname}/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php:678
 Doctrine/ORM/Persisters/BasicEntityPersister-&amp;gt;load() at D:/projects/{projectname}/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:171
 Doctrine/ORM/EntityRepository-&amp;gt;findOneBy() at D:/projects/{projectname}/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:211
 Doctrine/ORM/EntityRepository-&amp;gt;__call() at D:/projects/{projectname}/vendor/{customvendor}/lib-doctrine/src/{VendorNs}/Lib/Doctrine/DataFixtures/AbstractBaseFixture.php:123
 {VendorNs}/Lib/Doctrine/ORM/Repository/BaseLookupRepository-&amp;gt;findOneById() at D:/projects/{projectname}/vendor/{customvendor}/lib-doctrine/src/{VendorNs}/Lib/Doctrine/DataFixtures/AbstractBaseFixture.php:123
 {VendorNs}/Lib/Doctrine/DataFixtures/AbstractBaseFixture-&amp;gt;findPersistedEntity() at D:/projects/{projectname}/src/ProjectVendor/Bundle/DataFixturesBundle/Classes/ORM/LookupFixture.php:38
 {ProjectNs}/Bundle/DataFixturesBundle/Classes/ORM/LookupFixture-&amp;gt;lookupentityDefaultBuilder() at D:/projects/{projectname}/src/ProjectVendor/Bundle/DataFixturesBundle/DataFixtures/ORM/Main/User/LookupData.php:59
 {ProjectNs}/Bundle/DataFixturesBundle/DataFixtures/ORM/Main/User/LookupData-&amp;gt;onlinestatusBuild() at n/a:n/a
 call_user_func() at D:/projects/{projectname}/src/ProjectVendor/Bundle/DataFixturesBundle/Classes/ORM/LookupFixture.php:78
 {ProjectNs}/Bundle/DataFixturesBundle/Classes/ORM/LookupFixture-&amp;gt;lookupentityDefaultLoader() at D:/projects/{projectname}/src/ProjectVendor/Bundle/DataFixturesBundle/DataFixtures/ORM/Main/User/LookupData.php:42
 {ProjectNs}/Bundle/DataFixturesBundle/DataFixtures/ORM/Main/User/LookupData-&amp;gt;load() at D:/projects/{projectname}/vendor/doctrine/data-fixtures/lib/Doctrine/Common/DataFixtures/Executor/AbstractExecutor.php:120
 Doctrine/Common/DataFixtures/Executor/AbstractExecutor-&amp;gt;load() at D:/projects/{projectname}/vendor/doctrine/data-fixtures/lib/Doctrine/Common/DataFixtures/Executor/ORMExecutor.php:83
 Doctrine/Common/DataFixtures/Executor/ORMExecutor-&amp;gt;Doctrine/Common/DataFixtures/Executor/{closure}() at n/a:n/a
 call_user_func() at D:/projects/{projectname}/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:223
 Doctrine/ORM/EntityManager-&amp;gt;transactional() at D:/projects/{projectname}/var/cache/apps/web/local/jms_diextra/doctrine/EntityManager_50ffafed6b09f.php:31
 EntityManager50ffafed6b09f_546a8d27f194334ee012bfe64f629947b07e4919/__CG__/Doctrine/ORM/EntityManager-&amp;gt;transactional() at D:/projects/{projectname}/vendor/doctrine/data-fixtures/lib/Doctrine/Common/DataFixtures/Executor/ORMExecutor.php:85
 Doctrine/Common/DataFixtures/Executor/ORMExecutor-&amp;gt;execute() at D:/projects/{projectname}/vendor/doctrine/doctrine-fixtures-bundle/Doctrine/Bundle/FixturesBundle/Command/LoadDataFixturesDoctrineCommand.php:106
 Doctrine/Bundle/FixturesBundle/Command/LoadDataFixturesDoctrineCommand-&amp;gt;execute() at D:/projects/{projectname}/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:238
 Symfony/Component/Console/Command/Command-&amp;gt;run() at D:/projects/{projectname}/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:192
 Symfony/Component/Console/Application-&amp;gt;doRun() at D:/projects/{projectname}/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:78
 Symfony/Bundle/FrameworkBundle/Console/Application-&amp;gt;doRun() at D:/projects/{projectname}/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:105
 Symfony/Component/Console/Application-&amp;gt;run() at D:/projects/{projectname}/bin/console.php:17
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; </comment>
                    <comment id="20184" author="beberlei" created="Wed, 1 May 2013 21:20:02 +0000"  >&lt;p&gt;This works in this recent commit here, 0864ab8adac5c31d5ba97f0eb6792e5431a75b70. Should have worked before as well. Can you verify?&lt;/p&gt;</comment>
                    <comment id="20185" author="beberlei" created="Wed, 1 May 2013 21:20:26 +0000"  >&lt;p&gt;Related to &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1998&quot; title=&quot;Problem when deleting with EntityManager-&amp;gt;remove($entity)&quot;&gt;&lt;del&gt;DDC-1998&lt;/del&gt;&lt;/a&gt;, tests this behavior&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2136] convert-mapping can&apos;t create YML from Annotation when Id column is a OneToOne relationship</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2136</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have two entities&lt;/p&gt;

&lt;p&gt;/**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@ORM\Entity&lt;br/&gt;
 */&lt;br/&gt;
class User 
{
    /**
     * @ORM\Id
     * @ORM\GeneratedValue(strategy=&quot;AUTO&quot;)
     * @ORM\Column(type=&quot;integer&quot;)
     */
    private $id
}&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;/**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@ORM\Entity&lt;br/&gt;
 */&lt;br/&gt;
class UserData 
{
    /**
     * @ORM\Id
     * @ORM\OneToOne(targetEntity=&quot;User&quot;)
     */
    private $id
}&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;When I convert these with symfony&apos;s&lt;/p&gt;

&lt;p&gt;doctrine:mapping:convert yml test/&lt;/p&gt;

&lt;p&gt;it generates an entity definition for UserData without any id fields, which, of course, cannot be imported to the database, as the new entity doesn&apos;t have an identifier column.&lt;/p&gt;</description>
                <environment>Symfony 2.1.3</environment>
            <key id="14212">DDC-2136</key>
            <summary>convert-mapping can&apos;t create YML from Annotation when Id column is a OneToOne relationship</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="gergelypolonkai">Gergely Polonkai</reporter>
                        <labels>
                        <label>yaml</label>
                    </labels>
                <created>Sun, 11 Nov 2012 19:42:20 +0000</created>
                <updated>Wed, 1 May 2013 21:10:30 +0000</updated>
                    <resolved>Wed, 1 May 2013 21:10:30 +0000</resolved>
                            <version>2.3</version>
                                <fixVersion>2.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20183" author="beberlei" created="Wed, 1 May 2013 21:10:30 +0000"  >&lt;p&gt;Fixed in 2.4&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2422] HIDDEN fileds doesn&apos;t work in subqueries</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2422</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I trying to execute query with subquery, which contains GROUP 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-java&quot;&gt;
$subqueryBuilder = $repository-&amp;gt;createQueryBuilder(&apos;l2&apos;)
    -&amp;gt;select(&apos;l2.id, DATE(l2.created) AS HIDDEN created_date&apos;)
    -&amp;gt;groupBy(&apos;created_date&apos;);

$qb = $repository-&amp;gt;createQueryBuilder(&apos;l&apos;);
$qb-&amp;gt;andWhere($qb-&amp;gt;expr()-&amp;gt;in(&apos;l.id&apos;, $subqueryBuilder-&amp;gt;getDQL()));
$result = $qb-&amp;gt;getQuery()-&amp;gt;getArrayResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;And got 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;
[Syntax Error] line 0, col 80: Error: Expected Doctrine\ORM\Query\Lexer::T_FROM, got &apos;,&apos;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If I group simply by &quot;l2.created&quot; without adding it to selected fields, all works fine. But I must use &quot;DATE(l2.created) AS HIDDEN created_date&quot; in selected statement to specify it in GROUP BY statement. &lt;/p&gt;</description>
                <environment></environment>
            <key id="14819">DDC-2422</key>
            <summary>HIDDEN fileds doesn&apos;t work in subqueries</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="yetanotherape">yetanotherape</reporter>
                        <labels>
                    </labels>
                <created>Mon, 29 Apr 2013 11:41:20 +0000</created>
                <updated>Wed, 1 May 2013 19:33:52 +0000</updated>
                    <resolved>Wed, 1 May 2013 18:26:45 +0000</resolved>
                            <version>2.3.3</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20173" author="ocramius" created="Wed, 1 May 2013 18:26:31 +0000"  >&lt;p&gt;`HIDDEN` is expected to be used only to handle hydration. Your example is already invalid at SQL level, where it would result in something like:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT
    f.bar
FROM
    foo f
WHERE
    f.id IN(
        SELECT
            b.baz,
            b.tab
        FROM
            bar b
    )
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That will obviously fail&lt;/p&gt;</comment>
                    <comment id="20180" author="yetanotherape" created="Wed, 1 May 2013 19:18:02 +0000"  >&lt;p&gt;Ok, so how I can 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;SELECT
    f.bar
FROM
    foo f
WHERE
    f.id IN(
        SELECT
            b.id
        FROM
            bar b
        GROUP BY DATE(b.created)
    )
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;in DQL?&lt;/p&gt;</comment>
                    <comment id="20182" author="ocramius" created="Wed, 1 May 2013 19:33:52 +0000"  >&lt;p&gt;You cannot right now. &lt;/p&gt;

&lt;p&gt;That&apos;s not supported by all vendors - if you need such a query, use native SQL instead.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2370] Subclass annotations not being read, unable to use OneToMany relation with single table inheritance</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2370</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Subclasses that override parent class properties and define relations will not work as expected, because AnnotationDriver/Reader will only use the parent class annotation (discarding whatever subclass defined). &lt;/p&gt;

&lt;p&gt;The following code will produce 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;
[Mapping]  FAIL - The entity-class &apos;Test\Office&apos; mapping is invalid:
* The mappings Test\Office#employees and Employee#office are incosistent with each other.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Test 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;
&amp;lt;?php
namespace Test;
 
use Doctrine\ORM\Mapping as ORM;
 
/**
 * @ORM\Entity
 */
class Office 
{
    /**
     * @ORM\OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Person&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;office&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Person[]|ArrayCollection
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $people;
 
    /**
     * @ORM\OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Employee&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;office&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Employee[]|ArrayCollection
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $employees;
 
}
 
/**
 * @ORM\Entity
 * @ORM\InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;SINGLE_TABLE&quot;&lt;/span&gt;)
 * @ORM\DiscriminatorColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
 * @ORM\DiscriminatorMap({&lt;span class=&quot;code-quote&quot;&gt;&quot;employee&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;Employee&quot;&lt;/span&gt;})
 */
class Person
{
    /**
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Office&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;people&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Office
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $office;
}
 
/**
 * @ORM\Entity
 */
class Employee &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Person
{
    /**
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Office&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;employees&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Office
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $office;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>PHP 5.4.11</environment>
            <key id="14725">DDC-2370</key>
            <summary>Subclass annotations not being read, unable to use OneToMany relation with single table inheritance</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="thinkscape">Arthur Bodera</reporter>
                        <labels>
                        <label>annotationdriver</label>
                        <label>inheritance</label>
                        <label>orm</label>
                    </labels>
                <created>Tue, 26 Mar 2013 12:50:57 +0000</created>
                <updated>Wed, 1 May 2013 19:18:25 +0000</updated>
                    <resolved>Wed, 1 May 2013 17:21:04 +0000</resolved>
                            <version>2.3.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20164" author="beberlei" created="Wed, 1 May 2013 17:21:04 +0000"  >&lt;p&gt;Overwriting assocations in this way is not supported.&lt;/p&gt;</comment>
                    <comment id="20181" author="thinkscape" created="Wed, 1 May 2013 19:18:25 +0000"  >&lt;p&gt;Ok, I get that it&apos;s not supported right now, but why did you mark it as resolved?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

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

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/** Joined */
class Base {}

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-1256] Generated SQL error with DQL WITH and JOINED inheritance</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1256</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;ve created an entity that has a one to one relationship to a class in an inheritance tree and I&apos;m using class table inheritance in Doctrine. When I try to add a DQL WITH statement on a column in the super class to the join, the generated SQL incorrectly places the statement in the child classes JOIN ON section.&lt;/p&gt;

&lt;p&gt;Here&apos;s the 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 p FROM Fampus_Entity_Photo p LEFT JOIN p.flag f WITH f.status=&apos;ok&apos;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Here&apos;s the generated SQL:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
SELECT p0_.id AS id0, p0_.name AS name1, p0_.path AS path2, p0_.type AS type3, p0_.reference_id AS reference_id4, p0_.view_count AS view_count5, p0_.created AS created6, p0_.modified AS modified7, p0_.event_id AS event_id8, p0_.user_id AS user_id9, p0_.school_id AS school_id10, p0_.flag_id AS flag_id11 FROM photos p0_ LEFT JOIN flaggedcontent_photo f1_ ON p0_.flag_id = f1_.id AND (f2_.status = &apos;ok&apos;) LEFT JOIN flaggedcontent f2_ ON f1_.id = f2_.id
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Note that f2_.status = &apos;ok&apos; is the correct statement, but it is in the wrong LEFT JOIN ON section.&lt;/p&gt;

&lt;p&gt;Here are my entities (significantly clipped):&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;photos&quot;&lt;/span&gt;)
*/
class Photo {
    /**
     * @OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;FlaggedContent_Photo&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;photo&quot;&lt;/span&gt;)
     * @JoinColumn(nullable=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $flag;
}

/**
 * @DiscriminatorColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;)
 * @DiscriminatorMap({
 *     &lt;span class=&quot;code-quote&quot;&gt;&quot;photo&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;FlaggedContent_Photo&quot;&lt;/span&gt;
 * })
 * @InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;JOINED&quot;&lt;/span&gt;)
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;flaggedcontent&quot;&lt;/span&gt;)
*/
&lt;span class=&quot;code-keyword&quot;&gt;abstract&lt;/span&gt; class FlaggedContent {
    /**
     * Database identifier
     *
     * @Id
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     * @GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;AUTO&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;

    /**
     * Status
     *
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;text&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $status;
}

/**
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;flaggedcontent_photo&quot;&lt;/span&gt;)
 */
class FlaggedContent_Photo &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; FlaggedContent {
    /**
     * @OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Photo&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;flag&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $photo;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>Ubuntu 11.04</environment>
            <key id="12797">DDC-1256</key>
            <summary>Generated SQL error with DQL WITH and JOINED inheritance</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="toxygene">Justin Hendrickson</reporter>
                        <labels>
                    </labels>
                <created>Wed, 6 Jul 2011 19:01:28 +0000</created>
                <updated>Wed, 1 May 2013 18:46:53 +0000</updated>
                    <resolved>Wed, 1 May 2013 18:46:35 +0000</resolved>
                            <version>2.0.3</version>
                <version>2.3</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16123" author="mridgway" created="Wed, 6 Jul 2011 20:18:42 +0000"  >&lt;p&gt;I created a test for this: &lt;a href=&quot;https://github.com/mridgway/doctrine2/commit/1bb26a46188f180270d723e395ee707443ebdda1&quot; class=&quot;external-link&quot;&gt;https://github.com/mridgway/doctrine2/commit/1bb26a46188f180270d723e395ee707443ebdda1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&apos;ll see if I can figure this out.&lt;/p&gt;</comment>
                    <comment id="16145" author="mridgway" created="Mon, 11 Jul 2011 15:36:32 +0000"  >&lt;p&gt;It doesn&apos;t seem that you would get the correct result if the WITH statement was on the &apos;flaggedcontent&apos; table anyway. In order for this to work, the query would have to join &apos;flaggedcontent&apos; first and then join to &apos;flaggedcontent_photo&apos; based on f2_.id.  While we can probably (but not easily) fix where the condition is placed, I don&apos;t think this will ever be able to give the expected results for ALL cases.&lt;/p&gt;</comment>
                    <comment id="16151" author="beberlei" created="Tue, 12 Jul 2011 20:19:16 +0000"  >&lt;p&gt;Formatting&lt;/p&gt;</comment>
                    <comment id="16152" author="beberlei" created="Tue, 12 Jul 2011 20:20:43 +0000"  >&lt;p&gt;This issue is unfixable, we tend towards throwing an exception in this case to notify developers that they cannot do this.&lt;/p&gt;

&lt;p&gt;The only way to make it work is to move the status check to the WHERE clause.&lt;/p&gt;</comment>
                    <comment id="16327" author="guilhermeblanco" created="Sun, 14 Aug 2011 03:59:03 +0000"  >&lt;p&gt;This issue is fixable by applying what we call as nested joins when generating the SQL.&lt;/p&gt;

&lt;p&gt;This issue report #&lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-349&quot; title=&quot;Add support for specifying precedence in joins in DQL&quot;&gt;DDC-349&lt;/a&gt; (&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-349&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-349&lt;/a&gt;) suggest us to support it in DQL, but I think we can introduce this generation on SQL only.&lt;br/&gt;
It&apos;s not a trivial implementation, but it would solve a couple of other issue I was looking into.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;</comment>
                    <comment id="20179" author="beberlei" created="Wed, 1 May 2013 18:46:35 +0000"  >&lt;p&gt;Duplicate of &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-349&quot; title=&quot;Add support for specifying precedence in joins in DQL&quot;&gt;DDC-349&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                <outwardlinks description="duplicates">
                            <issuelink>
            <issuekey id="10915">DDC-349</issuekey>
        </issuelink>
                    </outwardlinks>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="14202">DDC-2131</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1318] Unexpectet behavior while using ManyToOne as part ofr composite key</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1318</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi!&lt;/p&gt;

&lt;p&gt;Ran into a problem while wanted to use a ManyToOne as part of a primary key:&lt;/p&gt;

 &lt;div class=&quot;code panel&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;user_preferences&quot;&lt;/span&gt;)
  */
class UserPreferences  {

    /**
     * @Id
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;User&quot;&lt;/span&gt;,cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;persist&quot;&lt;/span&gt;})
     *  @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $user;
    /**
     * @Id
     * @GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;NONE&quot;&lt;/span&gt;)
     * @Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;preference_id&quot;&lt;/span&gt;,type=&lt;span class=&quot;code-quote&quot;&gt;&quot;smallint&quot;&lt;/span&gt;,nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $preference_id;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;By default doctrine creates a table with 2 single keys (the preference key is the primary key) which is of course incorrect.&lt;br/&gt;
Had to add       @Column(name=&quot;user_id&quot;,type=&quot;integer&quot;) to the user column to fix the index problem but that introduced another problem. The entity no longer accepter \Entity\User as a value for user and takes only a smallint as defined.&lt;/p&gt;</description>
                <environment>ubuntu 64x</environment>
            <key id="12898">DDC-1318</key>
            <summary>Unexpectet behavior while using ManyToOne as part ofr composite key</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="4">Incomplete</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="pejot">Peter Jasiulewicz</reporter>
                        <labels>
                    </labels>
                <created>Thu, 4 Aug 2011 07:42:14 +0000</created>
                <updated>Wed, 1 May 2013 18:40:00 +0000</updated>
                    <resolved>Wed, 1 May 2013 18:40:00 +0000</resolved>
                            <version>2.1</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16266" author="beberlei" created="Thu, 4 Aug 2011 09:34:48 +0000"  >&lt;p&gt;This is probably because of the @GeneratedStrategy annotation, can you try to just remove it? For me there is always only one key generated.&lt;/p&gt;</comment>
                    <comment id="16267" author="pejot" created="Thu, 4 Aug 2011 10:43:18 +0000"  >&lt;p&gt;Hi,&lt;br/&gt;
thanks fo the fast reply&lt;/p&gt;

&lt;div class=&quot;code panel&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
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;User&quot;&lt;/span&gt;,cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;persist&quot;&lt;/span&gt;})
     *  @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $user;

     * 
     * @Id
     * @Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;preference_id&quot;&lt;/span&gt;,type=&lt;span class=&quot;code-quote&quot;&gt;&quot;smallint&quot;&lt;/span&gt;,nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $preference_id;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;On MySQL creates:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;mysql&amp;gt; show indexes from xxx.user_preferences;
+------------------+------------+------------------------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+
| Table            | Non_unique | Key_name                     | Seq_in_index | Column_name   | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+------------------+------------+------------------------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+
| user_preferences |          0 | PRIMARY                      |            1 | preference_id | A         |           0 |     NULL | NULL   |      | BTREE      |         |
| user_preferences |          1 | user_preferences_user_id_idx |            1 | user_id       | A         |           0 |     NULL | NULL   | YES  | BTREE      |         |
+------------------+------------+------------------------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+
2 rows in set (0.01 sec)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;With:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;     * @Id
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;User&quot;&lt;/span&gt;,cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;persist&quot;&lt;/span&gt;})
     *  @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)
     * @Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_id&quot;&lt;/span&gt;,type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $user;
 
     
     * @Id
     * @GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;NONE&quot;&lt;/span&gt;)
     * @Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;preference_id&quot;&lt;/span&gt;,type=&lt;span class=&quot;code-quote&quot;&gt;&quot;smallint&quot;&lt;/span&gt;,nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $preference_id;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Creates:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;mysql&amp;gt; show indexes from xxx.user_preferences;
+------------------+------------+----------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+
| Table            | Non_unique | Key_name | Seq_in_index | Column_name   | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+------------------+------------+----------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+
| user_preferences |          0 | PRIMARY  |            1 | user_id       | A         |           0 |     NULL | NULL   |      | BTREE      |         |
| user_preferences |          0 | PRIMARY  |            2 | preference_id | A         |           0 |     NULL | NULL   |      | BTREE      |         |
+------------------+------------+----------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+
2 rows in set (0.00 sec)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

 &lt;div class=&quot;code panel&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
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;User&quot;&lt;/span&gt;,cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;persist&quot;&lt;/span&gt;})
     *  @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $user;

     * @Id
     * @Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;preference_id&quot;&lt;/span&gt;,type=&lt;span class=&quot;code-quote&quot;&gt;&quot;smallint&quot;&lt;/span&gt;,nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $preference_id;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Create the same effect like 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;mysql&amp;gt; show indexes from xxx.user_preferences;
+------------------+------------+------------------------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+
| Table            | Non_unique | Key_name                     | Seq_in_index | Column_name   | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+------------------+------------+------------------------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+
| user_preferences |          0 | PRIMARY                      |            1 | preference_id | A         |           0 |     NULL | NULL   |      | BTREE      |         |
| user_preferences |          1 | user_preferences_user_id_idx |            1 | user_id       | A         |           0 |     NULL | NULL   | YES  | BTREE      |         |
+------------------+------------+------------------------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+
2 rows in set (0.00 sec)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Sequence of events :&lt;br/&gt;
1) change in annotations in entity object&lt;br/&gt;
2) dropped the table affected&lt;br/&gt;
3) orm:schema-tool:update --force&lt;/p&gt;</comment>
                    <comment id="16270" author="beberlei" created="Sat, 6 Aug 2011 16:24:10 +0000"  >&lt;p&gt;Formatted code.&lt;/p&gt;</comment>
                    <comment id="16271" author="beberlei" created="Sat, 6 Aug 2011 16:26:36 +0000"  >&lt;p&gt;Can you drop the table and show the DDL generated by both &quot;orm:schema-tool:create --dump-sql&quot; and &quot;orm:schema-tool:update --dump-sql&quot; ?&lt;/p&gt;

&lt;p&gt;I checked with our testsuite and all the entities generate the correct primary keys.&lt;/p&gt;</comment>
                    <comment id="19392" author="ocramius" created="Wed, 23 Jan 2013 22:55:14 +0000"  >&lt;p&gt;Is this still valid with newer versions of the ORM?&lt;/p&gt;</comment>
                    <comment id="20176" author="beberlei" created="Wed, 1 May 2013 18:40:00 +0000"  >&lt;p&gt;No feedback given&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1816] DiscriminatorColumn Metadata wrong</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1816</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The discriminator column metadata (inheritance) is not properly processed. For example, using an entity described by XML annotations containing&lt;/p&gt;

&lt;div class=&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;discriminiator-column name=&lt;span class=&quot;code-quote&quot;&gt;&quot;category&quot;&lt;/span&gt; type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt; length=&lt;span class=&quot;code-quote&quot;&gt;&quot;30&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;will generate wrong SQL queries containing the column &apos;dtype&apos; instead of &apos;category&apos; when using an XML metadata driver.&lt;br/&gt;
Generating classes from the XML metadata with &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;doctrine orm:generate-entities --generate-annotations=&quot;true&quot; --generate-methods=&quot;true&quot;  entities&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;produces wrong docblock annotations like&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;@ORM\DiscriminatorColumn(name=&quot;r&quot;, type=&quot;r&quot;, length=r)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However, the entity works as expected after correcting the annotation values and replacing the XML meatdata driver by an annotation metadata driver.&lt;/p&gt;</description>
                <environment>Windows 7, PHP 5.38</environment>
            <key id="13690">DDC-1816</key>
            <summary>DiscriminatorColumn Metadata wrong</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="4">Incomplete</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="flo">Florian Schmedding</reporter>
                        <labels>
                    </labels>
                <created>Tue, 8 May 2012 15:01:31 +0000</created>
                <updated>Wed, 1 May 2013 18:37:47 +0000</updated>
                    <resolved>Wed, 1 May 2013 18:37:47 +0000</resolved>
                            <version>2.2.1</version>
                <version>2.2.2</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="18237" author="beberlei" created="Sun, 8 Jul 2012 07:08:17 +0000"  >&lt;p&gt;It works for me &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/7b758eee573a2667fccfe72dabacf3639c960911&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/7b758eee573a2667fccfe72dabacf3639c960911&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Can you post your XML mapping that produces this behavior?&lt;/p&gt;</comment>
                    <comment id="20175" author="beberlei" created="Wed, 1 May 2013 18:37:47 +0000"  >&lt;p&gt;No feedback given&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1998] Problem when deleting with EntityManager-&gt;remove($entity)</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1998</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The problem is when using EntityMamager-&amp;gt;remove($entity). The Sql query generated doesn&apos;t convert the values of the ids according to the field type that is used in doc block annotation. After investigating I found that in Doctrine\DBAL\Connection the function delete doesn&apos;t support to receive as param the types of the ids to be given to the executeUpdate function which is called in it and supports them. (The types need to be provided from the persisters from which the delete is called). &lt;/p&gt;

&lt;p&gt;I hope it make sense to you. I got that problem because I am using custom time stamp column type as id. And it converts the value of the field to time stamp string, which if not converted to the proper sql value is not recognised and the delete doesn&apos;t go trough.&lt;/p&gt;

&lt;p&gt;As far as I can see it is something that was missed and hope it will be fixed soon.&lt;/p&gt;

&lt;p&gt;If you have any questions please ask.&lt;br/&gt;
Also on request I can provide example code and the fix I have done for myself. &lt;/p&gt;</description>
                <environment></environment>
            <key id="13991">DDC-1998</key>
            <summary>Problem when deleting with EntityManager-&gt;remove($entity)</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://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>Tue, 28 Aug 2012 11:28:38 +0000</created>
                <updated>Wed, 1 May 2013 18:31:03 +0000</updated>
                    <resolved>Wed, 1 May 2013 18:31:03 +0000</resolved>
                            <version>2.2.3</version>
                                <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="18582" author="fabio.bat.silva" created="Wed, 29 Aug 2012 22:00:36 +0000"  >&lt;p&gt;Hi Victor&lt;/p&gt;

&lt;p&gt;Could you attach/paste your custom type and entity please ?&lt;/p&gt;</comment>
                    <comment id="18584" author="vigor_bg" created="Thu, 30 Aug 2012 05:47:56 +0000"  >&lt;p&gt;Ok I have attached them. The EwtTimestamp is the custom type. &lt;/p&gt;</comment>
                    <comment id="18663" author="ocramius" created="Mon, 17 Sep 2012 11:50:53 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=vigor_bg&quot; class=&quot;user-hover&quot; rel=&quot;vigor_bg&quot;&gt;victor Velkov&lt;/a&gt; do you have a failing test case for this one?&lt;/p&gt;</comment>
                    <comment id="18664" author="vigor_bg" created="Mon, 17 Sep 2012 12:14:48 +0000"  >&lt;p&gt;Nope sorry haven&apos;t done any test cases for this one&lt;/p&gt;</comment>
                    <comment id="18703" author="fabio.bat.silva" created="Sun, 23 Sep 2012 22:27:36 +0000"  >&lt;p&gt;Hi Victor,&lt;/p&gt;

&lt;p&gt;I can&apos;t reproduce, could you change the added test case and try to make it fails ?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                    <comment id="18732" author="vigor_bg" created="Wed, 26 Sep 2012 05:31:22 +0000"  >&lt;p&gt;Sure will do it as soon as I can. Sorry I didn&apos;t answer sooner just was in a holiday &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="18753" author="fabio.bat.silva" created="Tue, 2 Oct 2012 12:44:03 +0000"  >&lt;p&gt;Thanks Victor&lt;/p&gt;

&lt;p&gt;Please let me know when you change the test&lt;/p&gt;</comment>
                    <comment id="18757" author="vigor_bg" created="Tue, 2 Oct 2012 14:03:24 +0000"  >&lt;p&gt;Sorry for the delay i have attached the test case (DDC1998Test1.php). &lt;/p&gt;</comment>
                    <comment id="18816" author="fabio.bat.silva" created="Wed, 10 Oct 2012 15:31:00 +0000"  >&lt;p&gt;Hi Victor,&lt;/p&gt;

&lt;p&gt;Sorry for the delay to answer&lt;/p&gt;

&lt;p&gt;I think that we can&apos;t fix it,&lt;br/&gt;
Your type requires sql conversion to work, and doctrine does not support @Id fields with sql conversion.&lt;/p&gt;</comment>
                    <comment id="18820" author="vigor_bg" created="Thu, 11 Oct 2012 05:45:22 +0000"  >&lt;p&gt;Really as far as i can see in the code you do convert them when you are executing an update. And the fix that i did for my self is to add 3rd parameter to the function delete in Doctrine\DBAL\Connection and then every where where it is called in the code which is in 2 places Doctrine\ORM\Persisters\BasicEntityPersister and Doctrine\ORM\JoinedSubclassPersister to give that parameter with the types. And as far as i can see you do that for the updates. After that in Connection delete you call the executeUpdate which supports the type and you just have to pass it along. And that is it. &lt;/p&gt;</comment>
                    <comment id="19364" author="ocramius" created="Wed, 23 Jan 2013 21:01:02 +0000"  >&lt;p&gt;Reducing priority. It is an edge case, and we already don&apos;t officially support custom object types as identifiers.&lt;/p&gt;</comment>
                    <comment id="20171" author="beberlei" created="Wed, 1 May 2013 17:52:47 +0000"  >&lt;p&gt;We should be able to support this I think, i don&apos;t see a reason it shouldnt work&lt;/p&gt;</comment>
                    <comment id="20174" author="beberlei" created="Wed, 1 May 2013 18:31:03 +0000"  >&lt;p&gt;Will be fixed in 2.4&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11325" name="DDC1998Test.php" size="3029" author="fabio.bat.silva" created="Sun, 23 Sep 2012 22:27:36 +0000" />
                    <attachment id="11336" name="DDC1998Test1.php" size="3191" author="vigor_bg" created="Tue, 2 Oct 2012 14:04:37 +0000" />
                    <attachment id="11315" name="EwtTimestamp.php" size="1991" author="vigor_bg" created="Thu, 30 Aug 2012 05:46:54 +0000" />
                    <attachment id="11316" name="ProductTemplate.php" size="844" author="vigor_bg" created="Thu, 30 Aug 2012 05:46:54 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2413] orm:schema-tool:update want to drop&amp;create PK on join table using composite keys</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2413</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Given these entities :&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * &lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt; Domain
 *
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;profils_domains&quot;&lt;/span&gt;)
 */
class Domain
{
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     *
     * @Id
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, length=22, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name = &apos;&apos;;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * &lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt; User
 *
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;profils_users&quot;&lt;/span&gt;)
 */
class User
{
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     *
     * @Id
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, length=22, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name = &apos;&apos;;

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Domain
     *
     * @Id
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Domain&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;LAZY&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $domain;
    
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Group[]|ArrayCollection
     *
     * @ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Group&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;users&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $groups;
}
&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-object&quot;&gt;Class&lt;/span&gt; Group
 *
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;profils_groups&quot;&lt;/span&gt;)
 */
class Group
{
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     *
     * @Id
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, length=22, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name = &apos;&apos;;

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Domain
     *
     * @Id
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Domain&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;LAZY&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $domain;
    
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; User[]|ArrayCollection
     *
     * @ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;User&quot;&lt;/span&gt;, indexBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;EXTRA_LAZY&quot;&lt;/span&gt;)
     * @JoinTable(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;profils_groups_users&quot;&lt;/span&gt;,
     *      joinColumns={
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;group_name&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;),
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;)
     *          },
     *      inverseJoinColumns={
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_name&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;),
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;)
     *          }
     *      )
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $users;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I want to link users and groups but only from the same domain.&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;orm:schema-tool:create&lt;/tt&gt; generate correct 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;
CREATE TABLE profils_users (name VARCHAR(22) NOT NULL, domain VARCHAR(22) NOT NULL, INDEX IDX_E75993CFA7A91E0B (domain), PRIMARY KEY(name, domain)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE profils_domains (name VARCHAR(22) NOT NULL, PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE profils_groups (name VARCHAR(22) NOT NULL, domain VARCHAR(22) NOT NULL, INDEX IDX_229366BBA7A91E0B (domain), PRIMARY KEY(name, domain)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE profils_groups_users (group_name VARCHAR(22) NOT NULL, domain VARCHAR(22) NOT NULL, user_name VARCHAR(22) NOT NULL, INDEX IDX_6CF8F4EA77792576A7A91E0B (group_name, domain), INDEX IDX_6CF8F4EA24A232CFA7A91E0B (user_name, domain), PRIMARY KEY(group_name, domain, user_name)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
ALTER TABLE profils_users ADD CONSTRAINT FK_E75993CFA7A91E0B FOREIGN KEY (domain) REFERENCES profils_domains (name) ON DELETE CASCADE;
ALTER TABLE profils_groups ADD CONSTRAINT FK_229366BBA7A91E0B FOREIGN KEY (domain) REFERENCES profils_domains (name) ON DELETE CASCADE;
ALTER TABLE profils_groups_users ADD CONSTRAINT FK_6CF8F4EA77792576A7A91E0B FOREIGN KEY (group_name, domain) REFERENCES profils_groups (name, domain) ON DELETE CASCADE;
ALTER TABLE profils_groups_users ADD CONSTRAINT FK_6CF8F4EA24A232CFA7A91E0B FOREIGN KEY (user_name, domain) REFERENCES profils_users (name, domain) ON DELETE CASCADE
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;but I make a &lt;tt&gt;orm:schema-too:update&lt;/tt&gt; it want to drop and recreate the PK of the join table each time, and with a wrong 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;
ALTER TABLE profils_groups_users DROP PRIMARY KEY;
ALTER TABLE profils_groups_users ADD PRIMARY KEY (group_name, domain, user_name, domain)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To avoid the duplication of the same field in primary key creation, you can modify &lt;tt&gt;getIndexFieldDeclarationListSQL&lt;/tt&gt; from &lt;tt&gt;Doctrine\DBAL\Platforms\AbstractPlatform&lt;/tt&gt; like :&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getIndexFieldDeclarationListSQL(array $fields)
    {
        $ret = array();

        foreach ($fields as $field =&amp;gt; $definition) {
            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (is_array($definition)) {
                $ret[$field] = &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;
            } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
                $ret[$definition] = &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;
            }
        }
        $ret = array_keys($ret);

        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; implode(&apos;, &apos;, $ret);
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But it would also be nice that doctrine don&apos;t try to drop the PK on each update.&lt;/p&gt;</description>
                <environment>Ubuntu 12.04, php 5.4.9</environment>
            <key id="14808">DDC-2413</key>
            <summary>orm:schema-tool:update want to drop&amp;create PK on join table using composite keys</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="jedi_bc">Bruno CHALOPIN</reporter>
                        <labels>
                        <label>composite</label>
                    </labels>
                <created>Thu, 25 Apr 2013 07:49:59 +0000</created>
                <updated>Wed, 1 May 2013 18:08:16 +0000</updated>
                    <resolved>Wed, 1 May 2013 08:16:59 +0000</resolved>
                            <version>Git Master</version>
                <version>2.3.3</version>
                                                <component>Mapping Drivers</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="20102" author="ocramius" created="Thu, 25 Apr 2013 07:59:13 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=jedi_bc&quot; class=&quot;user-hover&quot; rel=&quot;jedi_bc&quot;&gt;Bruno CHALOPIN&lt;/a&gt; do I get this right if I say it&apos;s a problem in how columns are sorted in the index definition? Is that the problem?&lt;/p&gt;</comment>
                    <comment id="20103" author="jedi_bc" created="Thu, 25 Apr 2013 08:07:16 +0000"  >&lt;p&gt;I don&apos;t think it is a sort order problem (that is to say, i don&apos;t care the order).&lt;/p&gt;

&lt;p&gt;Firstable I don&apos;t know why it want to delete the PK as the generation of the join table is correct.&lt;br/&gt;
Secondly, the regeneration of the PK is clearly buggy as it use 2 times the domain field.&lt;/p&gt;</comment>
                    <comment id="20104" author="jedi_bc" created="Thu, 25 Apr 2013 15:04:56 +0000"  >&lt;p&gt;It&apos;s even worse than I thought. When persisting new users, it create this 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;INSERT INTO profils_groups_users (group_name, domain, user_name, domain) VALUES (?, ?, ?, ?)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I&apos;ve made a quick fix by adding &lt;tt&gt;$columns = array_keys(array_flip($columns));&lt;/tt&gt; before the return in &lt;tt&gt;Doctrine\ORM\Persisters\ManyToManyPersister::_getInsertRowSQL&lt;/tt&gt; and &lt;tt&gt;$mapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;joinTableColumns&amp;#39;&amp;#93;&lt;/span&gt; = array_keys(array_flip($mapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;joinTableColumns&amp;#39;&amp;#93;&lt;/span&gt;));&lt;/tt&gt; before the foreach in &lt;tt&gt;Doctrine\ORM\Persisters\ManyToManyPersister::_collectJoinTableColumnParameters&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;It works but I don&apos;t know if it&apos;s a proper solution.&lt;/p&gt;</comment>
                    <comment id="20132" author="beberlei" created="Wed, 1 May 2013 08:16:59 +0000"  >&lt;p&gt;You are thinking wrong here, domain can be present in the many to many table twice, with different domains. That you don&apos;t have this use-case, because you know the constraint to be 1:1 doesn&apos;t  matter to Doctrine.&lt;/p&gt;

&lt;p&gt;It only works with you having a domain_user and a domain_group column, and then it will work in the ManyToManyPersister and in the SchemaTool Update&lt;/p&gt;</comment>
                    <comment id="20135" author="jedi_bc" created="Wed, 1 May 2013 08:27:34 +0000"  >&lt;p&gt;With a domain_user and a domain_group you can no longer be sure that a user can only be in groups from the same domain which is mandatory for me. That&apos;s why I don&apos;t want the domain to be here twice as it must be the same for the user and the group.&lt;/p&gt;</comment>
                    <comment id="20136" author="beberlei" created="Wed, 1 May 2013 08:40:55 +0000"  >&lt;p&gt;Yes, this kind of normalization is not supported by Doctrine. You can enforce this with a CHECK constraint or in your domain code.&lt;/p&gt;</comment>
                    <comment id="20143" author="jedi_bc" created="Wed, 1 May 2013 09:52:45 +0000"  >&lt;p&gt;I know this kind of normalization is not supported by Doctrine. That&apos;s why I&apos;ve made a PR (which doesn&apos;t introduce any BC breaks). I don&apos;t see why it wouldn&apos;t be introduce in Doctrine as it&apos;s way simpler that adding a CHECK constraint (which I don&apos;t find any trace in the annotation documentation)&lt;/p&gt;</comment>
                    <comment id="20172" author="jedi_bc" created="Wed, 1 May 2013 18:08:16 +0000"  >&lt;p&gt;From the mysql documentation : &lt;cite&gt;The CHECK clause is parsed but ignored by all storage engines&lt;/cite&gt;&lt;br/&gt;
So there&apos;s no other ways to have a consistent database than to include this functionality in Doctrine.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2345] convertObjectParameterToScalarValue() raises a notice</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2345</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In &lt;tt&gt;Doctrine\ORM\AbstractQuery.php&lt;/tt&gt;, the method &lt;tt&gt;convertObjectParameterToScalarValue()&lt;/tt&gt; can raise a Notice.&lt;br/&gt;
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;
$value = $values[$class-&amp;gt;getSingleIdentifierFieldName()];
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;should be changed in this 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;
&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($values[$class-&amp;gt;getSingleIdentifierFieldName()])) {
    $value = $values[$class-&amp;gt;getSingleIdentifierFieldName()];
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; </description>
                <environment></environment>
            <key id="14685">DDC-2345</key>
            <summary>convertObjectParameterToScalarValue() raises a notice</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="garak">Massimiliano Arione</reporter>
                        <labels>
                    </labels>
                <created>Tue, 12 Mar 2013 12:45:46 +0000</created>
                <updated>Wed, 1 May 2013 17:49:00 +0000</updated>
                    <resolved>Wed, 1 May 2013 17:49:00 +0000</resolved>
                            <version>2.3</version>
                                <fixVersion>2.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19827" author="ocramius" created="Tue, 12 Mar 2013 12:50:03 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=garak&quot; class=&quot;user-hover&quot; rel=&quot;garak&quot;&gt;Massimiliano Arione&lt;/a&gt; the current DQL implementation doesn&apos;t allow you to bind composite key identifiers as parameters, thus you will never reach that piece of code.&lt;/p&gt;

&lt;p&gt;A test would be needed for this case.&lt;/p&gt;</comment>
                    <comment id="19828" author="garak" created="Tue, 12 Mar 2013 12:58:28 +0000"  >&lt;p&gt;Unfortunately, I&apos;m not really a Doctrine guru.&lt;br/&gt;
I can tell you that I&apos;m getting that notice, using Sortable behavior with Symfony2.&lt;br/&gt;
This is a partial error stack:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;1 in (...)/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php at line 282

2 at ErrorHandler -&amp;gt;handle (&apos;8&apos;, &apos;Undefined index: id&apos;, &apos;(...)/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php&apos;, &apos;282&apos;, array(&apos;value&apos; =&amp;gt; object(MyEntity), &apos;class&apos; =&amp;gt; object(ClassMetadata), &apos;values&apos; =&amp;gt; array()))

3 in (...)/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php at line 282
at AbstractQuery -&amp;gt;convertObjectParameterToScalarValue (object(MyEntity))

4 in (...)/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php at line 260
at AbstractQuery -&amp;gt;processParameterValue (object(MyEntity))

5 in (...)/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php at line 285
at Query -&amp;gt;processParameterMappings (array(&apos;group__1&apos; =&amp;gt; array(&apos;0&apos;)))

6 in (...)/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php at line 258
at Query -&amp;gt;_doExecute ()

7 in (...)/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php at line 737
at AbstractQuery -&amp;gt;execute (&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;, &apos;1&apos;)

8 in (...)/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php at line 538
at AbstractQuery -&amp;gt;getResult ()

9 in (...)/vendor/gedmo/doctrine-extensions/lib/Gedmo/Sortable/SortableListener.php at line 410
at SortableListener -&amp;gt;getMaxPosition (object(EntityManager), object(ClassMetadata), array(&apos;position&apos; =&amp;gt; &apos;rank&apos;, &apos;groups&apos; =&amp;gt; array(&apos;my_entity&apos;), &apos;useObjectClass&apos; =&amp;gt; &apos;Meeting\GestioneBundle\Entity\MyRelatedEntity&apos;), object(MyRelatedEntity))

10 in (...)/vendor/gedmo/doctrine-extensions/lib/Gedmo/Sortable/SortableListener.php at line 114
at SortableListener -&amp;gt;prePersist (object(LifecycleEventArgs))

11 in (...)/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php at line 61
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="19829" author="ocramius" created="Tue, 12 Mar 2013 13:19:38 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=garak&quot; class=&quot;user-hover&quot; rel=&quot;garak&quot;&gt;Massimiliano Arione&lt;/a&gt; having a composite primary key?&lt;/p&gt;</comment>
                    <comment id="19830" author="garak" created="Tue, 12 Mar 2013 13:25:51 +0000"  >&lt;p&gt;Nope, just a plain &quot;id&quot;.&lt;/p&gt;</comment>
                    <comment id="20170" author="beberlei" created="Wed, 1 May 2013 17:49:00 +0000"  >&lt;p&gt;Fixed in 2.4&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1782] orm:schema-tool:update always produces the SQL to create the database schema and not the needed to update it</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1782</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Tables created by SchemaTool#getSchemaFromMetadata and PostgreSqlSchemaManager#createSchema return different names using the getShortestName function. So, when SchemaTool#getUpdateSchemaSql compares the two schemas all tables are detected as new.&lt;/p&gt;</description>
                <environment>Ubuntu 11.10, PostgreSQL 9.1, PHP 5.3</environment>
            <key id="13639">DDC-1782</key>
            <summary>orm:schema-tool:update always produces the SQL to create the database schema and not the needed to update it</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="jordi">Jordi</reporter>
                        <labels>
                    </labels>
                <created>Tue, 17 Apr 2012 16:36:17 +0000</created>
                <updated>Wed, 1 May 2013 17:42:03 +0000</updated>
                    <resolved>Wed, 1 May 2013 17:42:03 +0000</resolved>
                            <version>2.2.1</version>
                <version>2.2.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="20169" author="beberlei" created="Wed, 1 May 2013 17:42:03 +0000"  >&lt;p&gt;Duplicate of &lt;a href=&quot;http://doctrine-project.org/jira/browse/DBAL-483&quot; title=&quot;default values make orm:validate-schema fail&quot;&gt;&lt;del&gt;DBAL-483&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1984] ORM tries to fetch an already deleted versioned entity and fails with spl_object_hash error</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1984</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This is a nasty bug, it doesn&apos;t always happen, and i can&apos;t seem to reproduce it consistently.&lt;/p&gt;

&lt;p&gt;It sometimes happens when trying to fetch a versioned entity which doesn&apos;t exist anymore in the database.&lt;/p&gt;

&lt;p&gt;Setup: &lt;br/&gt;
PHP 5.4.5&lt;br/&gt;
PostgreSQL 9.1&lt;br/&gt;
Doctrine 2.2.2 with array cache, XML mapping driver &lt;/p&gt;

&lt;p&gt;Entity config: BaseEntity mapped as mapped-superclass, User entity extending the base entity:&lt;/p&gt;

&lt;p&gt;Mapping file:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;    &amp;lt;mapped-superclass name=&quot;Specula\Entities\BaseEntity&quot;&amp;gt;&lt;/p&gt;

&lt;p&gt;        &amp;lt;field name=&quot;updatedOn&quot; type=&quot;datetime&quot; column=&quot;updated_on&quot; /&amp;gt;&lt;br/&gt;
        &amp;lt;field name=&quot;version&quot; version=&quot;true&quot; type=&quot;integer&quot; column=&quot;version&quot; /&amp;gt;&lt;/p&gt;

&lt;p&gt;        &amp;lt;many-to-one field=&quot;updatedBy&quot; target-entity=&quot;User&quot;&amp;gt;&lt;br/&gt;
            &amp;lt;join-column name=&quot;updated_by&quot; referenced-column-name=&quot;user_id&quot; /&amp;gt;&lt;br/&gt;
        &amp;lt;/many-to-one&amp;gt;&lt;/p&gt;

&lt;p&gt;    &amp;lt;/mapped-superclass&amp;gt;   &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;User entity:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;    &amp;lt;entity name=&quot;Specula\Entities\User&quot; table=&quot;users&quot;&amp;gt;&lt;br/&gt;
        &amp;lt;id name=&quot;id&quot; type=&quot;integer&quot; column=&quot;user_id&quot;&amp;gt;&lt;br/&gt;
              &amp;lt;generator strategy=&quot;AUTO&quot; /&amp;gt;&lt;br/&gt;
        &amp;lt;/id&amp;gt;&lt;/p&gt;

&lt;p&gt;    &amp;lt;field name=&quot;userName&quot; type=&quot;string&quot; column=&quot;username&quot; length=&quot;20&quot; /&amp;gt;&lt;br/&gt;
    &amp;lt;field name=&quot;passwordHash&quot; type=&quot;string&quot; column=&quot;password_hash&quot; length=&quot;40&quot; /&amp;gt;&lt;br/&gt;
    &amp;lt;field name=&quot;fullName&quot; type=&quot;string&quot; column=&quot;fullname&quot; length=&quot;45&quot; /&amp;gt;&lt;br/&gt;
    &amp;lt;field name=&quot;isAdmin&quot; type=&quot;boolean&quot; column=&quot;is_admin&quot; /&amp;gt;&lt;br/&gt;
    &amp;lt;field name=&quot;isActive&quot; type=&quot;boolean&quot; column=&quot;is_active&quot; /&amp;gt;    &lt;/p&gt;

&lt;p&gt;  &amp;lt;/entity&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;


&lt;p&gt;Relevant part of stack trace:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;PHP Error &lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;spl_object_hash() expects parameter 1 to be object, null given (/var/www/html/repository/Doctrine/ORM/UnitOfWork.php:1318)&lt;/p&gt;

&lt;p&gt;#0 unknown(0): CWebApplication-&amp;gt;handleError()&lt;br/&gt;
#1 /var/www/html/repository/Doctrine/ORM/UnitOfWork.php(1318): spl_object_hash()&lt;br/&gt;
#2 /var/www/html/repository/Doctrine/ORM/UnitOfWork.php(2141): Doctrine\ORM\UnitOfWork-&amp;gt;getEntityState()&lt;br/&gt;
#3 /var/www/html/repository/Doctrine/ORM/EntityRepository.php(145): Doctrine\ORM\UnitOfWork-&amp;gt;lock()&lt;br/&gt;
#4 /var/www/html/repository/Doctrine/ORM/EntityManager.php(371): Doctrine\ORM\EntityRepository-&amp;gt;find()&lt;br/&gt;
#5 /var/www/html/repository/Specula/Dao/BaseDao.php(103): Doctrine\ORM\EntityManager-&amp;gt;find()&lt;br/&gt;
#6 /var/www/html/repository/Specula/Dao/UserDao.php(33): Specula\Dao\UserDao-&amp;gt;findEntityById()&lt;br/&gt;
#7 /var/www/html/repository/Specula/Managers/UserManager.php(91): Specula\Dao\UserDao-&amp;gt;findById()&lt;br/&gt;
#8 /var/www/html/repository/Doctrine/ORM/EntityManager.php(220): Specula\Managers\UserManager-&amp;gt;Specula\Managers{closure}()&lt;br/&gt;
#9 /var/www/html/repository/Specula/Managers/UserManager.php(93): Doctrine\ORM\EntityManager-&amp;gt;transactional()&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Deleting the proxy, restarting webserver, restarting database server doesn&apos;t help. i&apos;m using the array cache and apc is disabled.&lt;/p&gt;

&lt;p&gt;If you need more information let me know i&apos;m currently experiencing this bug so i can provide more information.&lt;/p&gt;

&lt;p&gt;Best regards,&lt;/p&gt;

&lt;p&gt;Jaco&lt;/p&gt;





</description>
                <environment></environment>
            <key id="13967">DDC-1984</key>
            <summary>ORM tries to fetch an already deleted versioned entity and fails with spl_object_hash error</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="jaco">Jaco Stienstra</reporter>
                        <labels>
                    </labels>
                <created>Wed, 15 Aug 2012 17:01:16 +0000</created>
                <updated>Wed, 1 May 2013 17:40:45 +0000</updated>
                    <resolved>Wed, 1 May 2013 17:40:45 +0000</resolved>
                            <version>2.2.2</version>
                                <fixVersion>2.3.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20168" author="beberlei" created="Wed, 1 May 2013 17:40:45 +0000"  >&lt;p&gt;Fixed in 2.3.4&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2020] [GH-440] The schema tool now doesn&apos;t add a foreign constraint when subclassess of...</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2020</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 sroddy:&lt;/p&gt;

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

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

&lt;p&gt;... a STI use the same field to map relations with entities of different classes&lt;/p&gt;

&lt;p&gt;It seems that there are no particular side-effects in mapping different relationship using the same table column name in different subclasses of a STI hierarchy.&lt;br/&gt;
Eg. Tag superclass of BookTag (id, object_id, comment) and MovieTag (id, object_id, comment), so having two attributes $book and $movie mapped to the same object_id field with @JoinColumn annotation&lt;/p&gt;

&lt;p&gt;I wasn&apos;t sure about this so I tested to see if there were errors. And I was surprised that everything runs without any particular problem.&lt;br/&gt;
Moreover this is a really interesting (wanted? unwanted?) feature, very useful if you have huge tables that need to be joined with other table using the discriminator and object_id columns, or if you have some kind of logging class and you need to keep the table efficient and small. The only problem is that the schema generator always inserts a foreign column constraint (probably the last specified) when generating these kind of Entities.&lt;/p&gt;

&lt;p&gt;This PR ensures that the foreign key is not added if there are at least two different classes mapped on the same field of a db table.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14023">DDC-2020</key>
            <summary>[GH-440] The schema tool now doesn&apos;t add a foreign constraint when subclassess of...</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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, 8 Sep 2012 03:36:09 +0000</created>
                <updated>Wed, 1 May 2013 17:28:49 +0000</updated>
                    <resolved>Wed, 1 May 2013 17:28:49 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2309] Invalid behaviour to flush only one entity</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2309</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Current implementation of $em-&amp;gt;flush($entity):&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;does not flush entity scheduled for delete&lt;/li&gt;
	&lt;li&gt;flush all entities scheduled for insert&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-720&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-720&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14512">DDC-2309</key>
            <summary>Invalid behaviour to flush only one entity</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="hason">Martin Haso&#328;</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Feb 2013 15:58:25 +0000</created>
                <updated>Wed, 1 May 2013 17:23:01 +0000</updated>
                    <resolved>Wed, 1 May 2013 17:22:50 +0000</resolved>
                            <version>2.2</version>
                <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19857" author="beberlei" created="Thu, 14 Mar 2013 21:57:13 +0000"  >&lt;p&gt;The second point is documented, the first point i don&apos;t understand, can you elaborate?&lt;/p&gt;</comment>
                    <comment id="20165" author="beberlei" created="Wed, 1 May 2013 17:22:50 +0000"  >&lt;p&gt;Duplicate of &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-2267&quot; title=&quot;EntityManager throws an exception when trying to flush($entity) on a deleted entity&quot;&gt;&lt;del&gt;DDC-2267&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                <outwardlinks description="duplicates">
                            <issuelink>
            <issuekey id="14437">DDC-2267</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2106] Notice trying to match a Criteria referencing a managed entity not yet persisted</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2106</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&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;Undefined index: (...) in Doctrine/ORM/UnitOfWork.php line 2735

#0 doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(2735): Symfony\Component\HttpKernel\Debug\ErrorHandler-&amp;gt;handle(8, &apos;Undefined index...&apos;, &apos;/Users/frosas/S...&apos;, 2735, Array) 
#1 doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php(1696): Doctrine\ORM\UnitOfWork-&amp;gt;getEntityIdentifier(Object(MyEntity)) 
#2 doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php(1683): Doctrine\ORM\Persisters\BasicEntityPersister-&amp;gt;getIndividualValue(Object(MyEntity)) 
#3 doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php(818): Doctrine\ORM\Persisters\BasicEntityPersister-&amp;gt;getValue(Object(MyEntity)) 
#4 doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php(786): Doctrine\ORM\Persisters\BasicEntityPersister-&amp;gt;expandCriteriaParameters(Object(Doctrine\Common\Collections\Criteria)) 
#5 doctrine/orm/lib/Doctrine/ORM/PersistentCollection.php(835): Doctrine\ORM\Persisters\BasicEntityPersister-&amp;gt;loadCriteria(Object(Doctrine\Common\Collections\Criteria)) 
#6 (...): Doctrine\ORM\PersistentCollection-&amp;gt;matching(Object(Doctrine\Common\Collections\Criteria)) 
#7 (...)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As a workaround I had to control this case explicitly:&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;if ($myEntity-&amp;gt;getId() === null) return null;
$criteria = Criteria::create()-&amp;gt;where(Criteria::expr()-&amp;gt;eq(&apos;field&apos;, $myEntity));
return $this-&amp;gt;collection-&amp;gt;matching($criteria)-&amp;gt;first();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14173">DDC-2106</key>
            <summary>Notice trying to match a Criteria referencing a managed entity not yet persisted</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://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="frosas">Francesc Ros&#224;s</reporter>
                        <labels>
                    </labels>
                <created>Mon, 29 Oct 2012 14:56:59 +0000</created>
                <updated>Wed, 1 May 2013 16:47:52 +0000</updated>
                    <resolved>Wed, 1 May 2013 16:47:52 +0000</resolved>
                            <version>2.3</version>
                                <fixVersion>2.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19507" author="asm89" created="Sat, 9 Feb 2013 22:39:37 +0000"  >&lt;p&gt;Can you provide us with the mapping of your entities? The code shouldn&apos;t get to the point where it asks for the identifier of the object while the object isn&apos;t persisted yet.&lt;/p&gt;</comment>
                    <comment id="19521" author="frosas" created="Sun, 10 Feb 2013 11:58:46 +0000"  >&lt;p&gt;I&apos;m not sure mapping can help to solve this and is quite a work for me to get it without the client details. Anyway I&apos;ll try to reproduce it in a custom scenario if you require it.&lt;/p&gt;

&lt;p&gt;I&apos;ve been doing some debugging and I got this:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;It still fails with last 2.3.*@stable&lt;/li&gt;
	&lt;li&gt;Entity is persisted before matching(). At UnitOfWork::persistNew(), $this-&amp;gt;entityStates&lt;span class=&quot;error&quot;&gt;&amp;#91;$oid&amp;#93;&lt;/span&gt; is set to self::STATE_MANAGED but $this-&amp;gt;entityIdentifiers is untouched ($idGen-&amp;gt;isPostInsertGenerator() is true)&lt;/li&gt;
	&lt;li&gt;When BasicEntityProvider::getIndividualValue() is called, $value state is STATE_MANAGED but $uow-&amp;gt;getEntityIdentifier() fails because $uow-&amp;gt;entityIdentifiers&lt;span class=&quot;error&quot;&gt;&amp;#91;$oid&amp;#93;&lt;/span&gt; was never set.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Hope it helps.&lt;/p&gt;</comment>
                    <comment id="19522" author="asm89" created="Sun, 10 Feb 2013 12:36:03 +0000"  >&lt;p&gt;If you can create a testcase and send a PR with it that would be very helpful. You can create it and put in in the appropriate class here:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/tree/master/tests/Doctrine/Tests/ORM/Functional/Ticket&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/tree/master/tests/Doctrine/Tests/ORM/Functional/Ticket&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19547" author="frosas" created="Sat, 16 Feb 2013 01:52:01 +0000"  >&lt;p&gt;Here you have: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/582&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/582&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20161" author="beberlei" created="Wed, 1 May 2013 16:47:52 +0000"  >&lt;p&gt;Fixed in 2.4&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1628] onUpdate parameter on @JoinColumn not supported</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1628</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It looks like this is in the older documentation (2.0) but not mentioned in the latest.&lt;/p&gt;

&lt;p&gt;I need to use ON UPDATE CASCADE in a few cases. Seems odd to support onDelete and not onUpdate. Am I missing something?&lt;/p&gt;</description>
                <environment></environment>
            <key id="13402">DDC-1628</key>
            <summary>onUpdate parameter on @JoinColumn not supported</summary>
                <type id="3" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/task.png">Task</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="6">Invalid</resolution>
                                <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="chrisrichard">Chris Richard</reporter>
                        <labels>
                    </labels>
                <created>Tue, 31 Jan 2012 06:21:34 +0000</created>
                <updated>Wed, 1 May 2013 13:18:11 +0000</updated>
                    <resolved>Thu, 21 Mar 2013 02:51:46 +0000</resolved>
                            <version>2.2</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>3</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="17359" author="beberlei" created="Tue, 31 Jan 2012 11:44:05 +0000"  >&lt;p&gt;We removed onUpdate because we couldnt come up with a use-case. CAn you share yours?&lt;/p&gt;</comment>
                    <comment id="17536" author="chrisrichard" created="Thu, 8 Mar 2012 00:00:53 +0000"  >&lt;p&gt;I assume it&apos;s just the mysql driver but all the constraints get created such that you cannot change the primary keys (even if it&apos;s not an auto-gen PK). ON UPDATE CASCADE would probably be a better default.&lt;/p&gt;</comment>
                    <comment id="18552" author="darklow" created="Tue, 28 Aug 2012 12:13:51 +0000"  >&lt;p&gt;I really hope onUpdate annotation attribute will be restored.&lt;br/&gt;
I used it in PostgreSQL very often. In some entities in some projects Primary Key ID can be very important its sequence, and if you want to change it, then &quot;ON UPDATE CASCADE&quot; changed it for all the references too. It was must have feature. Now few of my applications are broken with latest doctrine orm.&lt;br/&gt;
Please consider restoring it back.&lt;br/&gt;
Thank you&lt;/p&gt;</comment>
                    <comment id="18821" author="drevolution" created="Thu, 11 Oct 2012 06:43:23 +0000"  >&lt;p&gt;+1 - onUpdate attribute is very useful for PostgreSQL databases, it controls operations with foreign keys.&lt;/p&gt;</comment>
                    <comment id="18963" author="kenkataiwa" created="Sat, 10 Nov 2012 11:18:00 +0000"  >&lt;p&gt;What do you mean, you couldn&apos;t come up with a use-case? If one is migrating data from one table to another and requires that all foreign key references be changed to map the ones in the new table created, before deleting the last table. And there are may more case. Maybe I am missing some thing here, if it&apos;s a use-case for the MySQL and PostgreSQL guys, why would you not support it.&lt;/p&gt;</comment>
                    <comment id="18964" author="ocramius" created="Sat, 10 Nov 2012 14:43:55 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=kenkataiwa&quot; class=&quot;user-hover&quot; rel=&quot;kenkataiwa&quot;&gt;Kenneth Kataiwa&lt;/a&gt; updating identifiers is something you don&apos;t do, and I sincerely also don&apos;t have a use case for this, not in the context of an ORM at least. Also, handling changes in your identifiers in the UnitOfWork is a real problem that adds a lot overhead.&lt;/p&gt;</comment>
                    <comment id="18965" author="drevolution" created="Mon, 12 Nov 2012 05:28:13 +0000"  >&lt;p&gt;&lt;cite&gt;+1 - onUpdate attribute is very useful for PostgreSQL databases, it controls operations with foreign keys.&lt;/cite&gt;&lt;/p&gt;

&lt;p&gt;I&apos;m taking my words back. It is not a good idea to define onUpdate on foreign keys. Yes, PostgreSQL supports it but it doesn&apos;t mean that we should use it in ORM.&lt;br/&gt;
Thanks for your time.&lt;/p&gt;</comment>
                    <comment id="19879" author="ocramius" created="Thu, 21 Mar 2013 02:51:46 +0000"  >&lt;p&gt;This issue is invalid, since data migration is not a task for the ORM anyway.&lt;/p&gt;</comment>
                    <comment id="20160" author="garygolden" created="Wed, 1 May 2013 13:18:11 +0000"  >&lt;p&gt;I have a third party table which holds users:&lt;/p&gt;

&lt;p&gt;CREATE TABLE `user`&lt;br/&gt;
(&lt;br/&gt;
    `user_id`       INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,&lt;br/&gt;
    `email`         VARCHAR(255) NOT NULL UNIQUE,&lt;br/&gt;
) ENGINE=InnoDB CHARSET=&quot;utf8&quot;;&lt;/p&gt;

&lt;p&gt;In my table I want to use natural foreign key, so I reference `email`.&lt;/p&gt;

&lt;p&gt;CREATE TABLE `transaction` (&lt;br/&gt;
    `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,&lt;br/&gt;
    `user_email` VARCHAR(255) NOT NULL,&lt;br/&gt;
    FOREIGN KEY (`user_email`) REFERENCES `user`(`email`)&lt;br/&gt;
);&lt;/p&gt;

&lt;p&gt;I would like to RDBMS handle email updates on the foreign records.&lt;/p&gt;

&lt;p&gt;That is a real-life use case of the onDelete, which you decided to remove.&lt;br/&gt;
Please, get it back if possible.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1776] Abstract class marked as @Entity in a single table inheritance is wrongly hydrated</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1776</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have the following entity hierarchy:&lt;/p&gt;

&lt;div class=&quot;code panel&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;SINGLE_TABLE&quot;&lt;/span&gt;)
 * @DiscriminatorColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
 * @DiscriminatorMap({
     &lt;span class=&quot;code-quote&quot;&gt;&quot;prospectEdited&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;Application\Domain\Model\Event\ProspectEditedEvent&quot;&lt;/span&gt;
   })
 */
&lt;span class=&quot;code-keyword&quot;&gt;abstract&lt;/span&gt; class Event {
	&lt;span class=&quot;code-comment&quot;&gt;// ...
&lt;/span&gt;}

/**
 * @Entity
 */
&lt;span class=&quot;code-keyword&quot;&gt;abstract&lt;/span&gt; class ProspectEvent &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Event {
    /**
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Application\Domain\Model\Prospect&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $prospect;
}

/**
 * @Entity
 */
class ProspectEditedEvent &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; ProspectEvent {
	&lt;span class=&quot;code-comment&quot;&gt;// ...
&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Although ProspectEvent is an abstract class, I need to mark it as @Entity, so that I can query for any type of ProspectEvent:&lt;/p&gt;
&lt;div class=&quot;code panel&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 e FROM ProspectEvent e WHERE e.prospect = ?
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So far, so good.&lt;br/&gt;
The problem happens when I query the root class:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
SELECT e FROM Event e
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The query works fine, but the returned ProspectEvent entities have a NULL $prospect property.&lt;br/&gt;
I noticed that in that case, the DocBlock for $prospect is totally ignored (a wrong @JoinColumn name for example, doesn&apos;t throw an exception).&lt;/p&gt;

&lt;p&gt;The workaround to make it work, is to add a &quot;fake&quot; entry to the discriminator map for the abstract class:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
@DiscriminatorMap({
  &lt;span class=&quot;code-quote&quot;&gt;&quot;prospectEvent&quot;&lt;/span&gt;  = &lt;span class=&quot;code-quote&quot;&gt;&quot;Application\Domain\Model\Event\ProspectEvent&quot;&lt;/span&gt;
  &lt;span class=&quot;code-quote&quot;&gt;&quot;prospectEdited&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;Application\Domain\Model\Event\ProspectEditedEvent&quot;&lt;/span&gt;
})
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Even though there is no such &quot;prospectEvent&quot; discriminator entry possible, as the class is abstract.&lt;br/&gt;
Final point, if I remove the @Entity DocBlock on ProspectEvent, $prospect is hydrated correctly, but then it is not possible to issue a DQL query on ProspectEvent anymore.&lt;/p&gt;</description>
                <environment>Irrelevant</environment>
            <key id="13630">DDC-1776</key>
            <summary>Abstract class marked as @Entity in a single table inheritance is wrongly hydrated</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="benjamin">Benjamin Morel</reporter>
                        <labels>
                    </labels>
                <created>Sat, 14 Apr 2012 17:18:23 +0000</created>
                <updated>Wed, 1 May 2013 13:11:49 +0000</updated>
                    <resolved>Wed, 1 May 2013 13:11:49 +0000</resolved>
                            <version>2.2.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19077" author="benjamin" created="Thu, 29 Nov 2012 11:58:37 +0000"  >&lt;p&gt;Any feedback?&lt;/p&gt;</comment>
                    <comment id="19388" author="ocramius" created="Wed, 23 Jan 2013 22:44:26 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=benjamin&quot; class=&quot;user-hover&quot; rel=&quot;benjamin&quot;&gt;Benjamin Morel&lt;/a&gt; I&apos;d say this has to be fixed in validation. What if we enforce the fake discriminator map? The &quot;workaround&quot; you suggested is actually what you should write with correct mappings.&lt;/p&gt;</comment>
                    <comment id="19512" author="ocramius" created="Sat, 9 Feb 2013 23:56:48 +0000"  >&lt;p&gt;Yes, this has to be reported in validation somehow. The &quot;workaround&quot; is not actually a workaround, but what is expected to be written by the developer.&lt;/p&gt;</comment>
                    <comment id="19516" author="benjamin" created="Sun, 10 Feb 2013 00:12:32 +0000"  >&lt;p&gt;Ok, I found this weird because it&apos;s impossible to store a &lt;tt&gt;ProspectEvent&lt;/tt&gt; in the database (as it&apos;s &lt;tt&gt;abstract&lt;/tt&gt;), so adding a discriminator entry for it looks weird to me.&lt;br/&gt;
I would then suggest one of these two approaches:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Either remove the requirement to have a discriminator entry for the parent class if it&apos;s &lt;tt&gt;abstract&lt;/tt&gt; (this would be my preference).&lt;/li&gt;
	&lt;li&gt;Or, document this behavior, &lt;b&gt;and&lt;/b&gt; throw a proper exception if we try to persist / query such a hierarchy of classes.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;But leaving the error unreported, and instantiating incomplete objects, is a real danger!&lt;/p&gt;</comment>
                    <comment id="20159" author="beberlei" created="Wed, 1 May 2013 13:11:49 +0000"  >&lt;p&gt;We fixed errors of this kind a while ago&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

<item>
            <title>[DDC-2135] Setting column defaults using options in the annotations causes redundant alter statements </title>
                <link>http://doctrine-project.org/jira/browse/DDC-2135</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When using the Column annotation on an entity and passing the options parameter to set a default value for a column, the doctrine cli will generate the alter statement every time the schema-tool is run. &lt;/p&gt;

&lt;p&gt;This doesn&apos;t break the functionality of updating the schema using the cli but when you have multiple entities using default values in this manner it becomes cumbersome to investigate issues during updates that fail and you need to dump the generated sql to examine. &lt;/p&gt;

&lt;p&gt;Use case: We have a number of entities that include &apos;boolean&apos; flags. The data for these entities is inserted into the database through an integration process handled by another application. For all of the flags we want to set a default value of 0 to avoid having to modify the integration scripts when a new flag is added to an entity and the data is not available yet. &lt;/p&gt;

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

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * @ORM\Entity
 * @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;example&quot;&lt;/span&gt;)
 */
class Example
{
    
    /**
     * @ORM\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; $id;
    
    /** @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;, options={&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;&quot;&lt;/span&gt; = 0}) */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $disabled;
    
}
&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;
$ php bin/doctrine orm:schema-tool:update --dump-sql
ALTER TABLE example CHANGE disabled disabled TINYINT(1) DEFAULT &apos;0&apos; NOT NULL;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This alter statement is generated on every run of the schema-tool even though the schema has already been altered.  &lt;/p&gt;</description>
                <environment></environment>
            <key id="14210">DDC-2135</key>
            <summary>Setting column defaults using options in the annotations causes redundant alter statements </summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ccomer">Cory Comer</reporter>
                        <labels>
                        <label>Cli</label>
                        <label>schematool</label>
                    </labels>
                <created>Fri, 9 Nov 2012 20:36:11 +0000</created>
                <updated>Wed, 1 May 2013 12:57:19 +0000</updated>
                    <resolved>Wed, 1 May 2013 12:57:19 +0000</resolved>
                            <version>2.2.2</version>
                                <fixVersion>2.3.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20156" author="beberlei" created="Wed, 1 May 2013 12:57:19 +0000"  >&lt;p&gt;This is fixed for 2.3.4&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2218] Unable to set custom PDO instance</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2218</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;It&apos;s impossible to set custom instance of PDO using &quot;pdo&quot; parameter in connection params. Its cause errors like this:&lt;/p&gt;

&lt;p&gt;Argument 1 passed to Doctrine\DBAL\Cache\ResultCacheStatement::__construct() must be an instance of Doctrine\DBAL\Driver\Statement, instance of PDOStatement given&lt;/p&gt;

&lt;p&gt;Change &quot;Statement $stmt&quot; to just &quot;$stmt&quot; in Doctrine\DBAL\Cache\ResultCacheStatement constructor parameter list sloved problem.&lt;/p&gt;

&lt;p&gt;Kind regards,&lt;br/&gt;
Micha&#322; Dobaczewski&lt;/p&gt;</description>
                <environment></environment>
            <key id="14342">DDC-2218</key>
            <summary>Unable to set custom PDO instance</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="mdobak">Micha&#322; Dobaczewski</reporter>
                        <labels>
                    </labels>
                <created>Mon, 31 Dec 2012 14:40:50 +0000</created>
                <updated>Wed, 1 May 2013 12:56:38 +0000</updated>
                    <resolved>Wed, 1 May 2013 12:56:38 +0000</resolved>
                            <version>2.3.1</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19196" author="ocramius" created="Mon, 31 Dec 2012 17:32:54 +0000"  >&lt;p&gt;Shouldn&apos;t you build the driver with your PDO instance?&lt;/p&gt;</comment>
                    <comment id="19197" author="mdobak" created="Tue, 1 Jan 2013 19:13:02 +0000"  >&lt;p&gt;Maybe buld custom driver will be better solution but as long this option is &lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html&quot; class=&quot;external-link&quot;&gt;in documentation&lt;/a&gt; it should work or it should be deleted from documentation.&lt;/p&gt;</comment>
                    <comment id="19198" author="ocramius" created="Tue, 1 Jan 2013 19:33:02 +0000"  >&lt;p&gt;Could you expose your current config? &lt;/p&gt;</comment>
                    <comment id="19199" author="mdobak" created="Tue, 1 Jan 2013 20:17:11 +0000"  >&lt;p&gt;I have simple configuration without anything unusual based on code from &lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/configuration.html&quot; class=&quot;external-link&quot;&gt;this page&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
[...]

$pdoInstance = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; PDO(&apos;mysql:host=localhost;dbname=somedb&apos;, &apos;root&apos;, &apos;mypassword&apos;);

[...]

$connection[&apos;driver&apos;] = &apos;pdo_mysql&apos;;
$connection[&apos;pdo&apos;]    = $pdoInstance; 

[...]

$config = Setup::createConfiguration();

[ Setup annotation driver, cache setup etc. ]

$entityManager = EntityManager::create($connection, $config,  $evm);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;p&gt;And now every Doctrine action which use database cause errors. If write this configuration:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$connection[&apos;driver&apos;]   = &apos;pdo_mysql&apos;;
$connection[&apos;user&apos;]     = &apos;root&apos;;
$connection[&apos;password&apos;] = &apos;mypassword&apos;;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;everything works.&lt;/p&gt;</comment>
                    <comment id="19200" author="ocramius" created="Tue, 1 Jan 2013 22:25:24 +0000"  >&lt;p&gt;Weird... Just went through the code and everything looks fine (See `Doctrine\DBAL\DriverManager#getConnection()`)&lt;/p&gt;

&lt;p&gt;Can you check the spl_object_hash of your PDO instance and the one in the DBAL driver? What&apos;s your `Connection#getDriver()`?&lt;/p&gt;</comment>
                    <comment id="19201" author="mdobak" created="Wed, 2 Jan 2013 09:50:05 +0000"  >&lt;p&gt;I checked the code again and I discovered, that happens If you use Doctrine\ORM\Query\Exec\SingleSelectExecutor with cache but is still a bug. Sorry to confuse you.&lt;/p&gt;</comment>
                    <comment id="19202" author="ocramius" created="Wed, 2 Jan 2013 09:56:15 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=mdobak&quot; class=&quot;user-hover&quot; rel=&quot;mdobak&quot;&gt;Micha&#322; Dobaczewski&lt;/a&gt; can you provide the code to reproduce this then?&lt;/p&gt;</comment>
                    <comment id="19204" author="mdobak" created="Wed, 2 Jan 2013 10:46:40 +0000"  >&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&amp;lt;?php
use Doctrine\ORM\Tools\Setup;
use Doctrine\ORM\EntityManager;

require __DIR__ . &apos;/Doctrine/ORM/Tools/Setup.php&apos;;
require __DIR__ . &apos;/Entities/Foo.php&apos;;

Doctrine\ORM\Tools\Setup::registerAutoloadPEAR();

$paths = array(&lt;span class=&quot;code-quote&quot;&gt;&quot;Entities&quot;&lt;/span&gt;);
$isDevMode = &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;

$pdoInstance = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; PDO(&apos;mysql:host=localhost;dbname=mydb&apos;, &apos;root&apos;, &apos;mypass&apos;);

&lt;span class=&quot;code-comment&quot;&gt;// the connection configuration
&lt;/span&gt;$dbParams = array(
    &apos;driver&apos;   =&amp;gt; &apos;pdo_mysql&apos;,
    &apos;pdo&apos;      =&amp;gt; $pdoInstance
);

$config = Setup::createConfiguration($isDevMode);
$driverImpl = $config-&amp;gt;newDefaultAnnotationDriver(&apos;/Entities&apos;);
$config-&amp;gt;setMetadataDriverImpl($driverImpl);

$em = EntityManager::create($dbParams, $config);

$query = $em-&amp;gt;createQuery(&apos;SELECT e FROM Foo e&apos;);
$query-&amp;gt;useResultCache(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;);
$query-&amp;gt;setResultCacheLifetime(3600);
$query-&amp;gt;setResultCacheDriver($em-&amp;gt;getConfiguration()-&amp;gt;getQueryCacheImpl());

&lt;span class=&quot;code-comment&quot;&gt;// Below line is important. It force query to use SQLWalker which use ResultCacheStatement.
&lt;/span&gt;$query-&amp;gt;setHint($query::HINT_CUSTOM_TREE_WALKERS, array(&apos;\Doctrine\ORM\Tools\Pagination\CountWalker&apos;));

$query-&amp;gt;getResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Foo is whatever correct entity.&lt;/p&gt;</comment>
                    <comment id="20155" author="beberlei" created="Wed, 1 May 2013 12:56:38 +0000"  >&lt;p&gt;You need to set the statement to get it working:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$pdo-&amp;gt;setAttribute(PDO::ATTR_STATEMENT_CLASS, array(&apos;Doctrine\DBAL\Driver\PDOStatement&apos;, array()));
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2307] Fields not wrapped in back ticks when removing entity.</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2307</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Field definition:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/** @Id @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, name=&lt;span class=&quot;code-quote&quot;&gt;&quot;`key`&quot;&lt;/span&gt;) */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $_key;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When removing entity mysql.log shows 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;
36 Query     START TRANSACTION
                   36 Query     DELETE FROM `settings` WHERE section = &apos;Test123&apos; AND key = &apos;test12312&apos;
                   36 Query     rollback
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It seems that on a remove statement the field names aren&apos;t being wrapped in back ticks.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14507">DDC-2307</key>
            <summary>Fields not wrapped in back ticks when removing entity.</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="5">Cannot Reproduce</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="amamut">Alex Mamut</reporter>
                        <labels>
                    </labels>
                <created>Wed, 20 Feb 2013 13:05:37 +0000</created>
                <updated>Wed, 1 May 2013 12:44:35 +0000</updated>
                    <resolved>Wed, 1 May 2013 12:44:35 +0000</resolved>
                                                            <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19859" author="beberlei" created="Thu, 14 Mar 2013 22:27:31 +0000"  >&lt;p&gt;Which version are you using? This has been fixed at some point&lt;/p&gt;</comment>
                    <comment id="20153" author="beberlei" created="Wed, 1 May 2013 12:44:35 +0000"  >&lt;p&gt;Closing because of no feedback&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2360] [GH-622] Import EntityManager from proper namespace</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2360</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 hrubi:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="14710">DDC-2360</key>
            <summary>[GH-622] Import EntityManager from proper namespace</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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, 21 Mar 2013 14:57:59 +0000</created>
                <updated>Wed, 1 May 2013 12:43:56 +0000</updated>
                    <resolved>Wed, 1 May 2013 12:43:56 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19880" author="beberlei" created="Thu, 21 Mar 2013 16:31:30 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-622&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/622&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/622&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2362] [GH-624] Fix getSQLTableAlias for postgre camelized table name</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2362</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 cedriclombardot:&lt;/p&gt;

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

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

&lt;p&gt;In postgreSQL with old databases we can have camelized model names to query on we need to add quote around the table name like :&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@ORM\Table(name=&quot;&quot;&quot;someThing&quot;&quot;&quot;)&lt;br/&gt;
```&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;But when query is built the alias taken will be `&quot;` this fix will find the good alias to use enabling to query camelized tables&lt;/p&gt;</description>
                <environment></environment>
            <key id="14712">DDC-2362</key>
            <summary>[GH-624] Fix getSQLTableAlias for postgre camelized table name</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 22 Mar 2013 14:24:20 +0000</created>
                <updated>Wed, 1 May 2013 12:43:07 +0000</updated>
                    <resolved>Wed, 1 May 2013 12:43:07 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19884" author="beberlei" created="Fri, 22 Mar 2013 15:01:58 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-624&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/624&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/624&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20152" author="beberlei" created="Wed, 1 May 2013 12:43:07 +0000"  >&lt;p&gt;PR was fixed in favor of Doctrine ORM GH-615&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2238] doctrine:schema:update partially broken</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2238</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;the app/console doctrine:schema:update command generates a seemingly random number of statements like these:&lt;/p&gt;

&lt;p&gt;ALTER TABLE geodata ALTER humidity SET ;&lt;br/&gt;
ALTER TABLE geodata ALTER lake SET ;&lt;br/&gt;
ALTER TABLE message ALTER translate SET ;&lt;/p&gt;


&lt;p&gt;which are obvious invalid SQL commands. The mappings are fine, validate and the application works just fine. Here&apos;s an example from the mapping files including two of the above statements:&lt;/p&gt;

&lt;p&gt;&amp;lt;field name=&quot;coast&quot; type=&quot;boolean&quot;/&amp;gt;&lt;br/&gt;
&amp;lt;field name=&quot;lake&quot; type=&quot;boolean&quot;/&amp;gt;&lt;br/&gt;
&amp;lt;field name=&quot;river&quot; type=&quot;boolean&quot;/&amp;gt;&lt;br/&gt;
&amp;lt;field name=&quot;humidity&quot; type=&quot;float&quot;/&amp;gt;&lt;br/&gt;
&amp;lt;field name=&quot;biome&quot; type=&quot;string&quot;/&amp;gt;&lt;/p&gt;


&lt;p&gt;I am using doctrine2-spatial as an extension for GIS information. This problem shows up both in entities using spatial data and entities not using spatial data.&lt;/p&gt;

&lt;p&gt;I&apos;ll gladly help debug this, as right now I can&apos;t update my dev database with --force, I need to use --dump-sql and filter out the invalid lines.&lt;/p&gt;
</description>
                <environment>OS X 10.7.5&lt;br/&gt;
PHP 5.4.4&lt;br/&gt;
Postgres SQL 9.1.6&lt;br/&gt;
&lt;br/&gt;
also confirmed on:&lt;br/&gt;
Linux (Debian testing, Kernel 2.6.32)&lt;br/&gt;
PHP 5.4.4&lt;br/&gt;
PostgreSQL 9.1.9&lt;br/&gt;
Doctrine 2.3.2</environment>
            <key id="14378">DDC-2238</key>
            <summary>doctrine:schema:update partially broken</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="tom">Tom Vogt</reporter>
                        <labels>
                        <label>postgresql</label>
                        <label>schematool</label>
                    </labels>
                <created>Fri, 11 Jan 2013 18:19:11 +0000</created>
                <updated>Wed, 1 May 2013 12:37:16 +0000</updated>
                    <resolved>Wed, 1 May 2013 12:37:05 +0000</resolved>
                            <version>2.3</version>
                                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19286" author="beberlei" created="Sat, 12 Jan 2013 09:05:50 +0000"  >&lt;p&gt;Can you dump the SchemaDiff/ColumnDiff instances that are returned from lib/Doctrine/DBAL/Schema/Comparator.php?&lt;/p&gt;</comment>
                    <comment id="19291" author="tom" created="Sat, 12 Jan 2013 10:57:26 +0000"  >&lt;p&gt;requested dump of SchemaDiff&lt;/p&gt;</comment>
                    <comment id="19292" author="tom" created="Sat, 12 Jan 2013 10:58:51 +0000"  >&lt;p&gt;added in the file schemadiff.txt - I added this in Schematool.php - getUpdateSchemaSql():&lt;/p&gt;

&lt;p&gt;        $comparator = new Comparator();&lt;br/&gt;
        $schemaDiff = $comparator-&amp;gt;compare($fromSchema, $toSchema);&lt;br/&gt;
        \Doctrine\Common\Util\Debug::dump($schemaDiff, 6);&lt;/p&gt;

&lt;p&gt;if you need other output, just tell me what entity to dump and where. I&apos;ll be happy to help.&lt;/p&gt;

&lt;p&gt;The file also contains the buggy update statements it creates towards the end. There&apos;s a few non-crucial bugs included, where it alters the geospatial columns to themselves (i.e. river.course already is a geometry/linestring). I don&apos;t worry about those because they don&apos;t break anything.&lt;/p&gt;</comment>
                    <comment id="20024" author="tom" created="Mon, 15 Apr 2013 19:26:18 +0000"  >&lt;p&gt;Is there any update on this? I&apos;m still having this issue, with many different entities, always the same problem, for example:&lt;/p&gt;

&lt;p&gt;ALTER TABLE event ALTER priority SET ;&lt;/p&gt;

&lt;p&gt;Which is an integer field on an entity that doesn&apos;t have any GIS elements, so I&apos;m not even sure if it&apos;s caused by that anymore.&lt;/p&gt;</comment>
                    <comment id="20147" author="beberlei" created="Wed, 1 May 2013 12:24:08 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=tom&quot; class=&quot;user-hover&quot; rel=&quot;tom&quot;&gt;Tom Vogt&lt;/a&gt; I added a fix for PostgreSQL today, can you verify again if this works? Its included in the 2.3 branch.&lt;/p&gt;</comment>
                    <comment id="20150" author="beberlei" created="Wed, 1 May 2013 12:37:05 +0000"  >&lt;p&gt;Duplicate of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DBAL-504&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DBAL-504&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                <outwardlinks description="duplicates">
                            <issuelink>
            <issuekey id="14806">DBAL-504</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                    <attachment id="11373" name="schemadiff.txt" size="79257" author="tom" created="Sat, 12 Jan 2013 10:57:26 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

<item>
            <title>[DDC-2391] [GH-643] DDC-2390: Remove Query dependency in SqlWalker and Parser</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2391</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of beberlei:&lt;/p&gt;

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

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

&lt;p&gt;To prevent future problems with illegal Query parameter access and also to decouple the namespaces by removing bidirectional dependency.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14760">DDC-2391</key>
            <summary>[GH-643] DDC-2390: Remove Query dependency in SqlWalker and Parser</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 4 Apr 2013 20:12:35 +0000</created>
                <updated>Wed, 1 May 2013 09:10:31 +0000</updated>
                    <resolved>Wed, 1 May 2013 09:10:31 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20142" author="doctrinebot" created="Wed, 1 May 2013 09:10:27 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-643&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/643&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/643&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2414] Unable to create One-To-Many relation with composite keys</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2414</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Given these entities :&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * &lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt; Domain
 *
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;profils_domains&quot;&lt;/span&gt;)
 */
class Domain
{
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     *
     * @Id
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, length=22, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name = &apos;&apos;;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * &lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt; User
 *
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;profils_users&quot;&lt;/span&gt;)
 */
class User
{
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     *
     * @Id
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, length=22, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name = &apos;&apos;;

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Domain
     *
     * @Id
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Domain&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;LAZY&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $domain;
    
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Group[]|ArrayCollection
     *
     * @ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Group&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;users&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $groups;
}
&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-object&quot;&gt;Class&lt;/span&gt; Group
 *
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;profils_groups&quot;&lt;/span&gt;)
 */
class Group
{
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     *
     * @Id
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, length=22, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name = &apos;&apos;;

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Domain
     *
     * @Id
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Domain&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;LAZY&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $domain;
    
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; User[]|ArrayCollection
     *
     * @ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;User&quot;&lt;/span&gt;, indexBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;EXTRA_LAZY&quot;&lt;/span&gt;)
     * @JoinTable(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;profils_groups_users&quot;&lt;/span&gt;,
     *      joinColumns={
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;group_name&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;),
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;)
     *          },
     *      inverseJoinColumns={
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_name&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;),
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;)
     *          }
     *      )
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $users;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I want to link users and groups but only from the same domain.&lt;br/&gt;
I also want a user to be in &lt;b&gt;one group only&lt;/b&gt;.&lt;br/&gt;
The only way with composite keys is to make &lt;tt&gt;One-To-Many, Unidirectional with Join Table&lt;/tt&gt; but I can&apos;t put &lt;tt&gt;unique=true&lt;/tt&gt; in the &lt;tt&gt;@JoinColumn&lt;/tt&gt; of my &lt;tt&gt;inverseJoinColumns&lt;/tt&gt; because it will generate a unique index for each field and not one composite. I also can&apos;t use &lt;tt&gt;@UniqueConstraint&lt;/tt&gt; as it is not supported in &lt;tt&gt;@JoinTable&lt;/tt&gt;.&lt;/p&gt;</description>
                <environment>Ubuntu 12.04, PHP 5.4.9</environment>
            <key id="14809">DDC-2414</key>
            <summary>Unable to create One-To-Many relation with composite keys</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="jedi_bc">Bruno CHALOPIN</reporter>
                        <labels>
                        <label>composite</label>
                    </labels>
                <created>Thu, 25 Apr 2013 08:01:56 +0000</created>
                <updated>Wed, 1 May 2013 09:04:07 +0000</updated>
                    <resolved>Wed, 1 May 2013 09:04:07 +0000</resolved>
                            <version>Git Master</version>
                <version>2.3.3</version>
                                                <component>Mapping Drivers</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20121" author="fabio.bat.silva" created="Sun, 28 Apr 2013 17:11:09 +0000"  >&lt;p&gt;Hi Bruno,&lt;/p&gt;

&lt;p&gt;Could you please explain it a little deeper ?&lt;br/&gt;
you describe an one-to-many relation but your mapping has a many-to-many &lt;b&gt;Group#users&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;Also, you shoud describe operations you are executing and which errors you got.&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;</comment>
                    <comment id="20125" author="jedi_bc" created="Mon, 29 Apr 2013 06:12:33 +0000"  >&lt;p&gt;Hi fabio,&lt;/p&gt;

&lt;p&gt;The relation i was trying to make is &lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/association-mapping.html#one-to-many-unidirectional-with-join-table&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/association-mapping.html#one-to-many-unidirectional-with-join-table&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, it implies to use a unique contraint and as explain above when trying to create the schema via doctrine, as i use composite keys, it will generate 2 unique contraints (one for each field) and not one composite unique constraint.&lt;/p&gt;

&lt;p&gt;Nevertheless, it seems like using composite keys is a lot buggy in doctrine (see &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2413&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2413&lt;/a&gt;)&lt;/p&gt;</comment>
                    <comment id="20141" author="beberlei" created="Wed, 1 May 2013 09:04:07 +0000"  >&lt;p&gt;We discussed this in &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-2413&quot; title=&quot;orm:schema-tool:update want to drop&amp;amp;create PK on join table using composite keys&quot;&gt;&lt;del&gt;DDC-2413&lt;/del&gt;&lt;/a&gt;, this is not supported by Doctrine.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2421] Many-To-Many relation creation failed when using non PK entity field</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2421</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Given these entities :&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * &lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt; Domain
 *
 * @ORM\Entity
 * @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;profils_domains&quot;&lt;/span&gt;)
 */
class Domain
{
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     *
     * @ORM\Id
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, length=22, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name = &apos;&apos;;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * &lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt; Web
 *
 * @ORM\Entity
 * @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;profils_webs&quot;&lt;/span&gt;,
 *          uniqueConstraints={@ORM\UniqueConstraint(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;web_unique&quot;&lt;/span&gt;,columns={&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;})}
 * )
 */
class Web
{
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; integer
     *
     * @ORM\Id
     * @ORM\GeneratedValue
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     *
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, length=22, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name = &apos;&apos;;

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Domain
     *
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Domain&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;LAZY&quot;&lt;/span&gt;)
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $domain;
}
&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-object&quot;&gt;Class&lt;/span&gt; WebsGroup
 *
 * @ORM\Entity
 * @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;profils_websgroups&quot;&lt;/span&gt;,
 *          uniqueConstraints={@ORM\UniqueConstraint(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;websgroup_unique&quot;&lt;/span&gt;,columns={&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;})}
 * )
 */
class WebsGroup
{
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; integer
     *
     * @ORM\Id
     * @ORM\GeneratedValue
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     *
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, length=22, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name = &apos;&apos;;

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Domain
     *
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Domain&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;LAZY&quot;&lt;/span&gt;)
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $domain;

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; ArrayCollection
     *
     * @ORM\ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Web&quot;&lt;/span&gt;, indexBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;EXTRA_LAZY&quot;&lt;/span&gt;)
     * @ORM\JoinTable(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;profils_websgroups_webs&quot;&lt;/span&gt;,
     *      joinColumns={
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;websgroup_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;),
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;)
     *          },
     *      inverseJoinColumns={
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;web_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;),
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;)
     *          }
     *      )
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $webs;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I&apos;ve got a domain, some web sites per domain and websgroups which group web sites. I want to be sure in my database that a web group from a domain D can contain only web sites from the very same domain but when calling the console tool for creating my schema it raise :&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
[Doctrine\ORM\ORMException]                                                                                                                                      
  Column name `domain` referenced &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; relation from Entity\WebsGroup towards Entity\Web does not exist. 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It&apos;s because domain is already an association to an entity which and is not part of the primary key.&lt;/p&gt;

&lt;p&gt;I&apos;ve quick fixed &lt;tt&gt;getDefiningClass&lt;/tt&gt; from &lt;tt&gt;Doctrine\ORM\Tools\SchemaTool&lt;/tt&gt; to make it work but i really don&apos;t know if it&apos;s the proper way :&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; function getDefiningClass($class, $referencedColumnName)
    {
        $referencedFieldName = $class-&amp;gt;getFieldName($referencedColumnName);

        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($class-&amp;gt;hasField($referencedFieldName)) {
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; array($class, $referencedFieldName);
        } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (in_array($referencedColumnName, $class-&amp;gt;getIdentifierColumnNames())) {
            &lt;span class=&quot;code-comment&quot;&gt;// it seems to be an entity as foreign key
&lt;/span&gt;            foreach ($class-&amp;gt;getIdentifierFieldNames() as $fieldName) {
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($class-&amp;gt;hasAssociation($fieldName) &amp;amp;&amp;amp; $class-&amp;gt;getSingleAssociationJoinColumnName($fieldName) == $referencedColumnName) {
                    &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;getDefiningClass(
                        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;getClassMetadata($class-&amp;gt;associationMappings[$fieldName][&apos;targetEntity&apos;]),
                        $class-&amp;gt;getSingleAssociationReferencedJoinColumnName($fieldName)
                    );
                }
            }
        } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (in_array($referencedColumnName, $class-&amp;gt;getAssociationNames())) {
            &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;getDefiningClass(
                $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;getClassMetadata($class-&amp;gt;associationMappings[$referencedColumnName][&apos;targetEntity&apos;]),
                $class-&amp;gt;getSingleAssociationReferencedJoinColumnName($referencedColumnName)
            );
        }

        &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;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>Ubuntu linux 12.04, php 5.4.9</environment>
            <key id="14818">DDC-2421</key>
            <summary>Many-To-Many relation creation failed when using non PK entity field</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="jedi_bc">Bruno CHALOPIN</reporter>
                        <labels>
                        <label>schematool</label>
                    </labels>
                <created>Mon, 29 Apr 2013 08:51:36 +0000</created>
                <updated>Wed, 1 May 2013 09:03:08 +0000</updated>
                    <resolved>Wed, 1 May 2013 09:03:08 +0000</resolved>
                            <version>Git Master</version>
                <version>2.3.3</version>
                                                <component>Mapping Drivers</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20128" author="fabio.bat.silva" created="Mon, 29 Apr 2013 18:27:56 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=jedi_bc&quot; class=&quot;user-hover&quot; rel=&quot;jedi_bc&quot;&gt;Bruno CHALOPIN&lt;/a&gt; Except for some CS this fix seems good.&lt;/p&gt;

&lt;p&gt;If you have time you can send as &lt;a href=&quot;https://github.com/doctrine/doctrine2/pulls&quot; class=&quot;external-link&quot;&gt;pull request&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20129" author="jedi_bc" created="Tue, 30 Apr 2013 12:48:59 +0000"  >&lt;p&gt;I&apos;ve start making a PR and a test case but it is linked to &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2413&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2413&lt;/a&gt;&lt;br/&gt;
I&apos;m looking in making a proper fix to &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-2413&quot; title=&quot;orm:schema-tool:update want to drop&amp;amp;create PK on join table using composite keys&quot;&gt;&lt;del&gt;DDC-2413&lt;/del&gt;&lt;/a&gt; first.&lt;/p&gt;</comment>
                    <comment id="20140" author="beberlei" created="Wed, 1 May 2013 09:03:08 +0000"  >&lt;p&gt;You cannot use a reference column that is not a primary key. Doctrine does not support this.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2409&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2409&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14816">DDC-2419</key>
            <summary>[GH-655] [DDC-2409] Fix merge association UnitOfWork::STATE_NEW</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Sun, 28 Apr 2013 20:09:18 +0000</created>
                <updated>Wed, 1 May 2013 09:02:01 +0000</updated>
                    <resolved>Wed, 1 May 2013 09:02:01 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                <fixVersion>2.3.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20138" author="doctrinebot" created="Wed, 1 May 2013 08:49:34 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-655&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/655&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/655&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2423] [GH-657] DDC-2413</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2423</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 JEDIBC:&lt;/p&gt;

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

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

&lt;p&gt;Fix &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-2413&quot; title=&quot;orm:schema-tool:update want to drop&amp;amp;create PK on join table using composite keys&quot;&gt;&lt;del&gt;DDC-2413&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14822">DDC-2423</key>
            <summary>[GH-657] DDC-2413</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Wed, 1 May 2013 07:54:52 +0000</created>
                <updated>Wed, 1 May 2013 08:18:38 +0000</updated>
                    <resolved>Wed, 1 May 2013 08:18:18 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20134" author="doctrinebot" created="Wed, 1 May 2013 08:18:38 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-657&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/657&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/657&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2143] $em-&gt;refresh($entity) doesn&apos;t refresh associations cleared with clear()</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2143</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;

  &lt;span class=&quot;code-comment&quot;&gt;// $entity-&amp;gt;items is m2m association
&lt;/span&gt;
  &lt;span class=&quot;code-comment&quot;&gt;/////////////////////
&lt;/span&gt;  &lt;span class=&quot;code-comment&quot;&gt;// 1. Bug
&lt;/span&gt;
  echo $entity-&amp;gt;items-&amp;gt;count(); &lt;span class=&quot;code-comment&quot;&gt;// 2
&lt;/span&gt;
  $entity-&amp;gt;items-&amp;gt;clear();

  echo $entity-&amp;gt;items-&amp;gt;count(); &lt;span class=&quot;code-comment&quot;&gt;// 0
&lt;/span&gt;
  $em-&amp;gt;refresh($entity);

  echo $entity-&amp;gt;items-&amp;gt;count(); &lt;span class=&quot;code-comment&quot;&gt;// 0 &amp;lt;-- ???
&lt;/span&gt;
  &lt;span class=&quot;code-comment&quot;&gt;//////////////////
&lt;/span&gt;  &lt;span class=&quot;code-comment&quot;&gt;// 2. Workaround
&lt;/span&gt;
  echo $entity-&amp;gt;items-&amp;gt;count(); &lt;span class=&quot;code-comment&quot;&gt;// 2
&lt;/span&gt;
  &lt;span class=&quot;code-comment&quot;&gt;// remove items one by one
&lt;/span&gt;
  $items = $entity-&amp;gt;items-&amp;gt;toArray();
  foreach ( $items as $item )
  {
    $entity-&amp;gt;items-&amp;gt;removeElement($item);
  }

  echo $entity-&amp;gt;items-&amp;gt;count(); &lt;span class=&quot;code-comment&quot;&gt;// 0
&lt;/span&gt;
  $em-&amp;gt;refresh($entity);

  echo $entity-&amp;gt;items-&amp;gt;count(); &lt;span class=&quot;code-comment&quot;&gt;// 2, as expected
&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>PHP 5.3 + APC, CentOS</environment>
            <key id="14222">DDC-2143</key>
            <summary>$em-&gt;refresh($entity) doesn&apos;t refresh associations cleared with clear()</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="5">Cannot Reproduce</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="drake_jc">Alex</reporter>
                        <labels>
                    </labels>
                <created>Wed, 14 Nov 2012 12:06:30 +0000</created>
                <updated>Wed, 1 May 2013 08:18:02 +0000</updated>
                    <resolved>Wed, 1 May 2013 08:18:02 +0000</resolved>
                            <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19370" author="ocramius" created="Wed, 23 Jan 2013 21:24:18 +0000"  >&lt;p&gt;This is because `clear` on an un-initialized collection doesn&apos;t initialize it. Can you confirm this by adding a call to &lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;initialize()&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt; in the `clear` method of `Doctrine\ORM\PersistentCollection`?&lt;/p&gt;</comment>
                    <comment id="19381" author="ocramius" created="Wed, 23 Jan 2013 22:11:37 +0000"  >&lt;p&gt;Related to &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1987&quot; title=&quot;Cascading &amp;quot;refresh&amp;quot; does not work on lazy loaded associations&quot;&gt;&lt;del&gt;DDC-1987&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19576" author="ocramius" created="Thu, 21 Feb 2013 09:54:43 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=drake_jc&quot; class=&quot;user-hover&quot; rel=&quot;drake_jc&quot;&gt;Alex&lt;/a&gt; ping? &lt;/p&gt;</comment>
                    <comment id="19906" author="beberlei" created="Sun, 31 Mar 2013 11:05:30 +0000"  >&lt;p&gt;I cannot reproduce this issue, see the testscript attached (put into tests/Doctrine/Tests/ORM/Functional/Ticket/). Can you try to make this code fail?&lt;/p&gt;</comment>
                    <comment id="20133" author="beberlei" created="Wed, 1 May 2013 08:18:02 +0000"  >&lt;p&gt;Closed, no feedback.&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="13971">DDC-1987</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                    <attachment id="11513" name="DDC2143Test.php" size="1537" author="beberlei" created="Sun, 31 Mar 2013 11:05:29 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-2415] CustomIdGenerator not inherited from MappedSuperclass</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2415</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I had a problem with a CUSTOM id generation mapping definition.&lt;br/&gt;
I have an abstract class and @MappedSuperclass which defines the id column as:&lt;/p&gt;

&lt;p&gt;    /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@ORM\Id&lt;/li&gt;
	&lt;li&gt;@ORM\Column(name=&quot;ID&quot;, type=&quot;integer&quot;)&lt;/li&gt;
	&lt;li&gt;@ORM\GeneratedValue(strategy=&quot;CUSTOM&quot;)&lt;/li&gt;
	&lt;li&gt;@ORM\CustomIdGenerator(class=&quot;Infoil\Extensions\ExtensionsBundle\DoctrineIdGenerator\ZafiroIdGenerator&quot;)&lt;/li&gt;
	&lt;li&gt;@var int $id&lt;br/&gt;
     */&lt;br/&gt;
The problem is that subclasses doesn&apos;t inherits the CustomIdGenerator annotation. I have traced the problem up to ClassMetadataFactory::doLoadMetadata.&lt;br/&gt;
I had to change the second inner if statement as&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;if ($parent-&amp;gt;isMappedSuperclass) &lt;/p&gt;
{
    $class-&amp;gt;setCustomRepositoryClass($parent-&amp;gt;customRepositoryClassName);
    $class-&amp;gt;setCustomGeneratorDefinition($parent-&amp;gt;customGeneratorDefinition);  &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; LINE ADDED
}
&lt;p&gt;to allow subclasses inherit the customGenerationdefinition.&lt;/p&gt;

&lt;p&gt;Aside, the docblock annotation help doesn&apos;t includes the CustomIdGenerator tag.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14810">DDC-2415</key>
            <summary>CustomIdGenerator not inherited from MappedSuperclass</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="fxgallego">Sebastian Calvo</reporter>
                        <labels>
                        <label>orm</label>
                    </labels>
                <created>Thu, 25 Apr 2013 18:09:38 +0000</created>
                <updated>Sat, 27 Apr 2013 13:00:02 +0000</updated>
                    <resolved>Sat, 27 Apr 2013 13:00:02 +0000</resolved>
                            <version>2.3.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20119" author="fabio.bat.silva" created="Sat, 27 Apr 2013 13:00:02 +0000"  >&lt;p&gt;Fixed : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/d513e0f084eb4e67ccb42877b28a27d47a561665&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/d513e0f084eb4e67ccb42877b28a27d47a561665&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2418] [GH-654] Ilike</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2418</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 lighthart:&lt;/p&gt;

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

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

&lt;p&gt;Ilike expression added for postgres support&lt;/p&gt;</description>
                <environment></environment>
            <key id="14815">DDC-2418</key>
            <summary>[GH-654] Ilike</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Sat, 27 Apr 2013 03:36:47 +0000</created>
                <updated>Sat, 27 Apr 2013 08:13:42 +0000</updated>
                    <resolved>Sat, 27 Apr 2013 08:13:42 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20112" author="doctrinebot" created="Sat, 27 Apr 2013 07:40:22 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-654&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/654&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/654&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2415&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2415&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14814">DDC-2417</key>
            <summary>[GH-653] [DDC-2415] Fix CustomIdGenerator inheritance</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Fri, 26 Apr 2013 19:24:16 +0000</created>
                <updated>Sat, 27 Apr 2013 07:50:17 +0000</updated>
                    <resolved>Sat, 27 Apr 2013 07:50:17 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20113" author="doctrinebot" created="Sat, 27 Apr 2013 07:41:02 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-653&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/653&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/653&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2416] [GH-652] Fixed entities path</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2416</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 dannykopping:&lt;/p&gt;

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

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

&lt;p&gt;In the tutorial, the user is told to create a new file in the `/src` folder, and the `/entities` folder is never referenced. Updating the SQLite schema according to the tutorial fails with the &apos;No Metadata Classes to process.&apos; message. Changing the folder to `/src` fixes this, ostensibly.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14813">DDC-2416</key>
            <summary>[GH-652] Fixed entities path</summary>
                <type id="6" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Fri, 26 Apr 2013 09:06:42 +0000</created>
                <updated>Fri, 26 Apr 2013 09:23:51 +0000</updated>
                    <resolved>Fri, 26 Apr 2013 09:23:51 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20109" author="doctrinebot" created="Fri, 26 Apr 2013 09:11:58 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-652&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/652&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/652&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20110" author="ocramius" created="Fri, 26 Apr 2013 09:23:51 +0000"  >&lt;p&gt;merged&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2412] [GH-651] Fixed typo in SQLFilter (use statement ClassMetadata)</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2412</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 EuKov:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="14802">DDC-2412</key>
            <summary>[GH-651] Fixed typo in SQLFilter (use statement ClassMetadata)</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Tue, 23 Apr 2013 17:46:44 +0000</created>
                <updated>Tue, 23 Apr 2013 17:50:21 +0000</updated>
                    <resolved>Tue, 23 Apr 2013 17:50:21 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20095" author="doctrinebot" created="Tue, 23 Apr 2013 17:50:10 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-651&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/651&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/651&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20096" author="ocramius" created="Tue, 23 Apr 2013 17:50:21 +0000"  >&lt;p&gt;merged&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-2410] [GH-650] Fixed typo in SQLFilter addFilterConstraint first param</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2410</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 EuKov:&lt;/p&gt;

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

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

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

&lt;p&gt;Description in subj,&lt;br/&gt;
the use statement for ClassMetaData is &lt;br/&gt;
use Doctrine\ORM\Mapping\ClassMetaData;&lt;/p&gt;

&lt;p&gt;But in the abstract method the param named ClassMetadata (&quot;d&quot; char should be in uppercase)&lt;/p&gt;</description>
                <environment></environment>
            <key id="14800">DDC-2410</key>
            <summary>[GH-650] Fixed typo in SQLFilter addFilterConstraint first param</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Tue, 23 Apr 2013 09:37:42 +0000</created>
                <updated>Tue, 23 Apr 2013 10:05:55 +0000</updated>
                    <resolved>Tue, 23 Apr 2013 10:05:55 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20093" author="doctrinebot" created="Tue, 23 Apr 2013 10:05:45 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-650&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/650&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/650&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2388] Zend Optimizer Plus/opcache have overlap in config settings, annotations reader doesn&apos;t identify these properly</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2388</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Doctrine\Common\Annotations\AnnotationReader.php&lt;/p&gt;

&lt;p&gt;A change was recently authored in the AnnotationReader constructor that checked for a properly configured opcode cache (namely saving comments so that Doctrine can parse annotations).&lt;/p&gt;

&lt;p&gt;The current open source version of Zend Optimizer+ hosted at GitHub (&lt;a href=&quot;https://github.com/zend-dev/ZendOptimizerPlus&quot; class=&quot;external-link&quot;&gt;https://github.com/zend-dev/ZendOptimizerPlus&lt;/a&gt;) when loaded registers itself as a module with the name &quot;Zend Optimizer+&quot; but takes configuration directives in the form of &quot;opcache.&amp;lt;parameter&amp;gt;&quot;.&lt;/p&gt;

&lt;p&gt;The change to the constructor requires that if the module name is Zend Optimizer+, then the configuration directives must be prefixed with &quot;zend_optimizerplus.&amp;lt;parameter&amp;gt;&quot;. This is clearly incorrect.&lt;/p&gt;

&lt;p&gt;The most recent update now complains of an AnnotationException as a consequence of this change when running Symfony2 (or Doctrine) with the latest opcache because configuration directives aren&apos;t detected properly.&lt;/p&gt;

&lt;p&gt;I am happy to fix this but could not find a way to report an issue to initiate the process.&lt;/p&gt;

&lt;p&gt;I would suggest something like this in the constructor:&lt;/p&gt;

&lt;p&gt;if ((extension_loaded(&apos;Zend Optimizer+&apos;) || extension_loaded(&apos;opcache&apos;)) &amp;amp;&amp;amp; !(ini_get(&apos;opcache.save_comments&apos;) == 0 XOR ini_get(&apos;zend_optimizerplus.save_comments&apos;) == 0)) {&lt;/p&gt;

&lt;p&gt;What this means is that if either extension is loaded, one of those directives must be true and configured. This is a compromise. The alternative would be to keep the original source and do the following:&lt;/p&gt;


&lt;p&gt;        if (extension_loaded(&apos;Zend Optimizer+&apos;) &amp;amp;&amp;amp; ini_get(&apos;zend_optimizerplus.save_comments&apos;) == 0) {&lt;br/&gt;
            if (ini_get(&apos;opcache.save_comments&apos;) == 0) &lt;/p&gt;
{
                throw AnnotationException::optimizerPlusSaveComments();
            }
&lt;p&gt;        }&lt;/p&gt;

&lt;p&gt;        if (extension_loaded(&apos;opcache&apos;) &amp;amp;&amp;amp; ini_get(&apos;opcache.save_comments&apos;) == 0) &lt;/p&gt;
{
            throw AnnotationException::optimizerPlusSaveComments();
        }


&lt;p&gt;I have no idea about the &quot;opcache&quot; module and what it actually equates to or whether it has alternative formats for its configuration directives. I feel like the second suggestion is even smellier than my original suggestion despite probably handling the edge case better.&lt;/p&gt;

&lt;p&gt;If you want a pull request, I will send one, just let me know how you want to handle it.&lt;/p&gt;

&lt;p&gt;If my PHP is horrible I apologise.&lt;/p&gt;
</description>
                <environment></environment>
            <key id="14756">DDC-2388</key>
            <summary>Zend Optimizer Plus/opcache have overlap in config settings, annotations reader doesn&apos;t identify these properly</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="scribblet">Ross Cousens</reporter>
                        <labels>
                    </labels>
                <created>Thu, 4 Apr 2013 01:59:18 +0000</created>
                <updated>Tue, 23 Apr 2013 01:15:55 +0000</updated>
                    <resolved>Sat, 20 Apr 2013 08:31:11 +0000</resolved>
                            <version>2.3.3</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="19935" author="ocramius" created="Thu, 4 Apr 2013 08:03:39 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=scribblet&quot; class=&quot;user-hover&quot; rel=&quot;scribblet&quot;&gt;Ross Cousens&lt;/a&gt; is this already enstabilished? It&apos;s not worth changing it until the ZO+ stuff is stable.&lt;/p&gt;</comment>
                    <comment id="20014" author="scribblet" created="Mon, 15 Apr 2013 01:59:14 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=ocramius&quot; class=&quot;user-hover&quot; rel=&quot;ocramius&quot;&gt;Marco Pivetta&lt;/a&gt; &lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=beberlei&quot; class=&quot;user-hover&quot; rel=&quot;beberlei&quot;&gt;Benjamin Eberlei&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Seems stable to me.&lt;/p&gt;

&lt;p&gt;I guess whether this is a priority or not depends on your subjective weighting of its importance and whether or not you use ZO+. I&apos;ve ditched APC, and moved 20+ web servers over to Apache+ZO+. I currently deploy my own version of DBAL commons because it is not possible to work around it.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/zend-dev/ZendOptimizerPlus&quot; class=&quot;external-link&quot;&gt;https://github.com/zend-dev/ZendOptimizerPlus&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Please see this reference, why would they suddenly change the name of all the configuration directives especially in light of the fact that this is being integrated into PHP 5.5 as the standard generic &quot;opcache&quot; solution? I think this is where the confusion comes from. It might be branded as ZO+ on Github, but that becomes irrelevant when it&apos;s part of core.&lt;/p&gt;

&lt;p&gt;I&apos;ve tried contacting Beberlei directly (the author of the change), on Twitter and via e-mail, but no response. Not getting any response is quite annoying as it&apos;s been a month since this change was made and whenever I update an existing site or publish a new site I have to deal with this.&lt;/p&gt;

&lt;p&gt;I need to invest some time in finding out how I can maintain my own fork of OSS projects that pull changes in from the branched master but allow me to keep 1 or 2 files totally different. The other thing that drives me insane is the fact that the postgresql platform drivers can&apos;t implement GUID generators because it requires an extension be enabled on the server (seriously, solve with documentation, it&apos;s easy to detect programmatically as well) plus the choosing of a function, when there is obviously only one sane choice.&lt;/p&gt;

&lt;p&gt;I am so grateful for the opportunity to develop with OSS, but the bureaucratic decision-by-committee stuff is so frustrating when you&apos;re an end-user and can&apos;t find anyone who gives half a crap about stuff that is just plain stupid but overlooked due to resources already spread thin or whatever may be the case. I would be happy to develop fixes as well, but when they languish because you can&apos;t find a maintainer that is  familiar with the issue, interested in finding a fix, and has the time available to act as custodian of a pull request, it is incredibly demoralizing.&lt;/p&gt;
</comment>
                    <comment id="20073" author="beberlei" created="Sat, 20 Apr 2013 08:31:11 +0000"  >&lt;p&gt;Fixed and released a Collections 1.1.1 version&lt;/p&gt;</comment>
                    <comment id="20090" author="scribblet" created="Tue, 23 Apr 2013 01:15:55 +0000"  >&lt;p&gt;Thanks Benjamin, I am grateful for the fix! Happy coding!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2229] Undefined method</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2229</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;There is an undefined method called in Doctrine\ORM\Query\SqlWalker&lt;/p&gt;

&lt;p&gt;Fatal error: Call to undefined method Doctrine\ORM\Query\AST\PathExpression::isSimpleArithmeticExpression() in vendor\doctrine\orm\lib\Doctrine\ORM\Query\SqlWalker.php on line 2091&lt;/p&gt;</description>
                <environment></environment>
            <key id="14366">DDC-2229</key>
            <summary>Undefined method</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="1" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/blocker.png">Blocker</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="drak">Karma Dordrak (Drak)</reporter>
                        <labels>
                    </labels>
                <created>Wed, 9 Jan 2013 14:55:56 +0000</created>
                <updated>Mon, 22 Apr 2013 11:17:53 +0000</updated>
                    <resolved>Mon, 8 Apr 2013 20:26:25 +0000</resolved>
                            <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="19294" author="fabio.bat.silva" created="Sat, 12 Jan 2013 21:01:00 +0000"  >&lt;p&gt;Hi Karma&lt;/p&gt;

&lt;p&gt;Could you provide the failing DQL ?&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;</comment>
                    <comment id="19334" author="drak" created="Fri, 18 Jan 2013 15:57:03 +0000"  >&lt;p&gt;It&apos;s generating SQL from a Doctrine Collection in a proxy class. Here is a link to the example: &lt;a href=&quot;https://github.com/zikula/core/pull/674#discussion_r2696186&quot; class=&quot;external-link&quot;&gt;https://github.com/zikula/core/pull/674#discussion_r2696186&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;    `SELECT t0.name AS name1, t0.value AS value2, t0.user_id AS user_id3 FROM users_attributes t0 WHERE t0.user_id = ?`&lt;/p&gt;

&lt;p&gt;The ? should be the value 2, but for some reason it&apos;s not being added. I&apos;ve checked the files in the stack-trace below and the right values are entering into the process, just the wrong SQL seems to be generated.&lt;/p&gt;

&lt;p&gt;Exception Trace&lt;br/&gt;
#0 Exception thrown in C:\xampp\htdocs\core13\src\vendor\doctrine\dbal\lib\Doctrine\DBAL\DBALException.php, line 47.&lt;br/&gt;
#1 C:\xampp\htdocs\core13\src\vendor\doctrine\orm\lib\Doctrine\ORM\Persisters\BasicEntityPersister.php(1599): Doctrine\DBAL\Connection-&amp;gt;executeQuery(&apos;SELECT t0.name ...&apos;, Array, Array)&lt;br/&gt;
#2 C:\xampp\htdocs\core13\src\vendor\doctrine\orm\lib\Doctrine\ORM\Persisters\BasicEntityPersister.php(1558): Doctrine\ORM\Persisters\BasicEntityPersister-&amp;gt;getOneToManyStatement(Array, Object(Users\Entity\User))&lt;br/&gt;
#3 C:\xampp\htdocs\core13\src\vendor\doctrine\orm\lib\Doctrine\ORM\UnitOfWork.php(2673): Doctrine\ORM\Persisters\BasicEntityPersister-&amp;gt;loadOneToManyCollection(Array, Object(Users\Entity\User), Object(Doctrine\ORM\PersistentCollection))&lt;br/&gt;
#4 C:\xampp\htdocs\core13\src\vendor\doctrine\orm\lib\Doctrine\ORM\PersistentCollection.php(224): Doctrine\ORM\UnitOfWork-&amp;gt;loadCollection(Object(Doctrine\ORM\PersistentCollection))&lt;br/&gt;
#5 C:\xampp\htdocs\core13\src\vendor\doctrine\orm\lib\Doctrine\ORM\PersistentCollection.php(576): Doctrine\ORM\PersistentCollection-&amp;gt;initialize()&lt;br/&gt;
#6 C:\xampp\htdocs\core13\src\lib\util\UserUtil.php(1152): Doctrine\ORM\PersistentCollection-&amp;gt;getIterator()&lt;br/&gt;
#7 C:\xampp\htdocs\core13\src\lib\util\UserUtil.php(2007): UserUtil::getVars(&apos;admin&apos;, false, &apos;uname&apos;, false)&lt;/p&gt;</comment>
                    <comment id="19346" author="fabio.bat.silva" created="Sun, 20 Jan 2013 12:03:07 +0000"  >&lt;p&gt;Hi Drak,&lt;/p&gt;

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

&lt;p&gt;Cheers&lt;/p&gt;</comment>
                    <comment id="19518" author="asm89" created="Sun, 10 Feb 2013 11:48:17 +0000"  >&lt;p&gt;ping! &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="19541" author="hussdl" created="Thu, 14 Feb 2013 17:53:57 +0000"  >&lt;p&gt;&lt;tt&gt;SqlWalker::walkInExpression()&lt;/tt&gt; does this:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;$sql = $this-&amp;gt;walkArithmeticExpression($inExpr-&amp;gt;expression)&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;However, &lt;tt&gt;$inExpr-&amp;gt;expression&lt;/tt&gt; could be an instance of &lt;tt&gt;PathExpression&lt;/tt&gt;. The grammar allows this case:&lt;/p&gt;

&lt;div class=&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;InExpression             ::= SingleValuedPathExpression [&lt;span class=&quot;code-quote&quot;&gt;&quot;NOT&quot;&lt;/span&gt;] &lt;span class=&quot;code-quote&quot;&gt;&quot;IN&quot;&lt;/span&gt; &lt;span class=&quot;code-quote&quot;&gt;&quot;(&quot;&lt;/span&gt; (InParameter {&lt;span class=&quot;code-quote&quot;&gt;&quot;,&quot;&lt;/span&gt; InParameter}* | Subselect) &lt;span class=&quot;code-quote&quot;&gt;&quot;)&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;tt&gt;PathExpression&lt;/tt&gt; and &lt;tt&gt;ArithmeticExpression&lt;/tt&gt; both extend &lt;tt&gt;Node&lt;/tt&gt;, but a &lt;tt&gt;PathExpression&lt;/tt&gt; is not an &lt;tt&gt;ArithmeticExpression&lt;/tt&gt;, and therefore it has no method &lt;tt&gt;isSimpleArithmeticExpression&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;If you still need a failing test case, I&apos;ll write one when I get home from work.&lt;/p&gt;</comment>
                    <comment id="19542" author="fabio.bat.silva" created="Thu, 14 Feb 2013 18:21:38 +0000"  >&lt;p&gt;Please Daniel Huss, A test case will be very useful..&lt;/p&gt;</comment>
                    <comment id="19544" author="hussdl" created="Fri, 15 Feb 2013 14:17:36 +0000"  >&lt;p&gt;failing test case&lt;/p&gt;</comment>
                    <comment id="19927" author="hussdl" created="Tue, 2 Apr 2013 10:02:11 +0000"  >&lt;p&gt;Bug still present in release 2.3.3&lt;/p&gt;

&lt;p&gt;Is someone taking care of this? It seems easy enough to fix.&lt;/p&gt;</comment>
                    <comment id="19928" author="ocramius" created="Tue, 2 Apr 2013 10:06:25 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=hussdl&quot; class=&quot;user-hover&quot; rel=&quot;hussdl&quot;&gt;Daniel Huss&lt;/a&gt; you can open a PR with the attached patch + test. Can you do it or should I take care of it?&lt;/p&gt;</comment>
                    <comment id="19931" author="hussdl" created="Tue, 2 Apr 2013 12:55:35 +0000"  >&lt;p&gt;Please take care of it for me this time. I&apos;d rather avoid the git setup until I have a significant contribution to make.&lt;/p&gt;</comment>
                    <comment id="19963" author="beberlei" created="Mon, 8 Apr 2013 20:26:25 +0000"  >&lt;p&gt;This is invalid, you need to set the path expression differently, this is pseudo code:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ArtihmeticExpression(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; SimpleArithmeticExpression(arithmeticsTerms =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; PathExpression)));
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="20088" author="hussdl" created="Mon, 22 Apr 2013 11:17:53 +0000"  >&lt;p&gt;Could this be bug in the DQL grammar, then? If I&apos;m not mistaken, the resolution of an InExpression cannot involve an ArithmeticPrimary non-terminal. I find the correct solution as shown by Benjamin Eberlei to be quite astonishing, since a path expression like &quot;alias.field&quot; is not something I&apos;d associate with the term &quot;arithmetic&quot;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11521" name="SqlWalker.patch" size="707" author="hussdl" created="Tue, 2 Apr 2013 10:02:11 +0000" />
                    <attachment id="11378" name="SqlWalkerTest.php" size="1348" author="hussdl" created="Fri, 15 Feb 2013 14:17:36 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2408] [GH-649] Update coding standards</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2408</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 calumbrodie:&lt;/p&gt;

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

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

&lt;p&gt;Removing underscores from property/method names and change use statements to PSR-2&lt;/p&gt;</description>
                <environment></environment>
            <key id="14797">DDC-2408</key>
            <summary>[GH-649] Update coding standards</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Sun, 21 Apr 2013 18:44:18 +0000</created>
                <updated>Sun, 21 Apr 2013 19:07:43 +0000</updated>
                    <resolved>Sun, 21 Apr 2013 19:07:43 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20085" author="doctrinebot" created="Sun, 21 Apr 2013 19:07:39 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-649&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/649&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/649&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20086" author="ocramius" created="Sun, 21 Apr 2013 19:07:43 +0000"  >&lt;p&gt;merged&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2404] Filter using join tables</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2404</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Allow filters to add join tables to sql queries for filtering.&lt;/p&gt;

&lt;p&gt;Let&apos;s have Brand entity, and BrandText entity. Text is localisation for each Brand. If there is no BrandText with bt.isPublic and bt.web_id = 123 I wanna filter it globally and not even allow to load Brand entity.&lt;/p&gt;

&lt;p&gt;This cannot be solved by using DQL, because I need to affect lazily loaded associations, for example in templates&lt;/p&gt;

&lt;p&gt;Accessing $product-&amp;gt;brand-&amp;gt;  in template should resolve to NULL, when there is no BrandText.isPublic = 1.&lt;/p&gt;

&lt;p&gt;This could be solved by allowing filters to add joins to queries. Should I prepare a pull request? &lt;/p&gt;</description>
                <environment></environment>
            <key id="14789">DDC-2404</key>
            <summary>Filter using join tables</summary>
                <type id="2" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="hosiplan">Filip Proch&#225;zka</reporter>
                        <labels>
                        <label>filter</label>
                        <label>filters</label>
                        <label>join</label>
                        <label>joins</label>
                    </labels>
                <created>Fri, 19 Apr 2013 14:21:43 +0000</created>
                <updated>Sun, 21 Apr 2013 18:01:47 +0000</updated>
                    <resolved>Sun, 21 Apr 2013 18:01:47 +0000</resolved>
                                                                    <due></due>
                    <votes>1</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="20083" author="deatheriam" created="Sun, 21 Apr 2013 17:52:26 +0000"  >&lt;p&gt;Duplicates &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2220&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2220&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20084" author="hosiplan" created="Sun, 21 Apr 2013 18:01:47 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2220&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2220&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-2407] AbstractExporter _getIdGeneratorTypeString does not know about the UUID generator</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2407</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Shouldn&apos;t the AbstractExporter-&amp;gt;_getIdGeneratorTypeString() method also know about the UUID generator ?&lt;/p&gt;</description>
                <environment></environment>
            <key id="14793">DDC-2407</key>
            <summary>AbstractExporter _getIdGeneratorTypeString does not know about the UUID generator</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="jeelo">Jeroen</reporter>
                        <labels>
                    </labels>
                <created>Sat, 20 Apr 2013 05:50:21 +0000</created>
                <updated>Sat, 20 Apr 2013 08:25:57 +0000</updated>
                    <resolved>Sat, 20 Apr 2013 08:25:57 +0000</resolved>
                            <version>2.3.3</version>
                                <fixVersion>2.4</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20072" author="beberlei" created="Sat, 20 Apr 2013 08:25:57 +0000"  >&lt;p&gt;Fixed for 2.4&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2403] most projects no longer listed on home page</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2403</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;the homepage of the doctrine project used to list phpcr-odm and some other projects. they recently disapeared. i think they should either all be listed or at least have a link to the projects page at the bottom of that shortlist, saying &quot;all doctrine projects&quot; (see also the discussion on the doctrine-dev mailinglist, i create a ticket here as nothing happened after that discussion)&lt;/p&gt;</description>
                <environment></environment>
            <key id="14788">DDC-2403</key>
            <summary>most projects no longer listed on home page</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="dbu">David Buchmann</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Apr 2013 09:32:07 +0000</created>
                <updated>Sat, 20 Apr 2013 08:00:12 +0000</updated>
                    <resolved>Sat, 20 Apr 2013 08:00:12 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20071" author="beberlei" created="Sat, 20 Apr 2013 08:00:12 +0000"  >&lt;p&gt;not a ticket&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2402] [DOC] warning on serializing private properties: obsolete?</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2402</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;here we warn that when wanting to serialize properties, you should not have private properties as that would not work with proxies.&lt;/p&gt;

&lt;p&gt;afaik doctrine commons 2.4 now handles that properly and we can drop that warning, right?&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/docs/en/reference/working-with-objects.rst#merging-entities&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/docs/en/reference/working-with-objects.rst#merging-entities&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14787">DDC-2402</key>
            <summary>[DOC] warning on serializing private properties: obsolete?</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="dbu">David Buchmann</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Apr 2013 09:29:15 +0000</created>
                <updated>Fri, 19 Apr 2013 09:34:48 +0000</updated>
                    <resolved>Fri, 19 Apr 2013 09:33:47 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20061" author="ocramius" created="Fri, 19 Apr 2013 09:33:47 +0000"  >&lt;p&gt;Duplicate of &lt;a href=&quot;http://doctrine-project.org/jira/browse/DCOM-175&quot; title=&quot;Proxies return private properties in __sleep, which is not supported by PHP.&quot;&gt;DCOM-175&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20062" author="ocramius" created="Fri, 19 Apr 2013 09:34:48 +0000"  >&lt;p&gt;No, we cannot yet remove that warning - it&apos;s not yet fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1927] Pagination of a SELECT of specific fields results in a RuntimeException</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1927</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When paginating a DQL string which selects specific fields it results in the following error: PHP Fatal error:  Uncaught exception &apos;RuntimeException&apos; with message &apos;Not all identifier properties can be found in the ResultSetMapping: id&apos;&lt;/p&gt;

&lt;p&gt;NOT working: &apos;SELECT c.id, c.number FROM Application\Entity\Course c&apos;&lt;br/&gt;
WORKING: &apos;SELECT c FROM Application\Entity\Course c&apos;&lt;br/&gt;
WORKING: &apos;SELECT c, c.id, c.number FROM Application\Entity\Course c&apos;&lt;/p&gt;

&lt;p&gt;Setting hydration mode to scalar results makes no difference.&lt;/p&gt;

&lt;p&gt;Gist to example code and stack trace: &lt;a href=&quot;https://gist.github.com/d5cd6d0b0ac28e722dd7&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/d5cd6d0b0ac28e722dd7&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13854">DDC-1927</key>
            <summary>Pagination of a SELECT of specific fields results in a RuntimeException</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="7">Can&apos;t Fix</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="netiul">Zacharias Luiten</reporter>
                        <labels>
                        <label>paginator</label>
                    </labels>
                <created>Mon, 16 Jul 2012 10:10:55 +0000</created>
                <updated>Thu, 18 Apr 2013 20:22:25 +0000</updated>
                    <resolved>Sun, 25 Nov 2012 12:23:36 +0000</resolved>
                            <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="18403" author="beberlei" created="Sun, 29 Jul 2012 08:47:56 +0000"  >&lt;p&gt;First results: This is very complicated to support, the pagination was designed for entity results. I have to check this when I have more time.&lt;/p&gt;</comment>
                    <comment id="18477" author="dquintard" created="Wed, 8 Aug 2012 12:00:22 +0000"  >&lt;p&gt;Hi Benjamin,&lt;br/&gt;
I can change my code to select entity results (even for hundreds/thousands results).&lt;br/&gt;
But for now Pagination is not usable with ResultSetMapping::addScalarResult &lt;/p&gt;</comment>
                    <comment id="18982" author="mpinkston" created="Tue, 13 Nov 2012 17:06:42 +0000"  >&lt;p&gt;The reason this error occurs is because the Paginator creates its own ResultSetMapping and relies on the SqlWalker to configure it (see Doctrine\ORM\Query\SqlWalker::walkSelectExpression).&lt;/p&gt;

&lt;p&gt;Doctrine will interpret each field in the first example (SELECT c.id, c.number...) as a PathExpression and add it to the result set mapping as a scalar result. This makes it impossible for the paginator to reliably know which field can be considered an identifier.&lt;/p&gt;

&lt;p&gt;A quick fix might be to re-write the query to use PartialObjectExpression: SELECT partial c.&lt;/p&gt;
{id, number}
&lt;p&gt; ...&lt;/p&gt;

&lt;p&gt;(edited after a re-read and realization that a custom ResultSetMapping wouldn&apos;t cut it)&lt;/p&gt;
</comment>
                    <comment id="19052" author="beberlei" created="Sun, 25 Nov 2012 12:23:36 +0000"  >&lt;p&gt;Allowing generic+complex pagination on scalar results is impossible for us, closing as can&apos;t fix. &lt;/p&gt;

&lt;p&gt;Just use LIMITs yourself here or as suggested partial objects.&lt;/p&gt;</comment>
                    <comment id="20060" author="vecchia" created="Thu, 18 Apr 2013 20:22:25 +0000"  >&lt;p&gt;imho this pagination feature is quite useless if we are forced to fetch the complete Entity. Take for example a big table with a lot of data: extracting all the infos will take a lot of time... There should be a way to support the first query type&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

&lt;p&gt;Thanks,&lt;br/&gt;
Quinten&lt;/p&gt;</comment>
                    <comment id="20056" author="fabio.bat.silva" created="Thu, 18 Apr 2013 19:28:37 +0000"  >&lt;p&gt;Thanks Quintenvk,&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT p.barcode, p.id, p.name FROM \core\Simplys\Entity\Products p INDEX BY p.barcode JOIN p.businessid b INDEX BY p.id&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In this DQL you are trying to index by scalar values, &lt;br/&gt;
I think we does not support that, and a single dimensional array is the expected result in this case.&lt;/p&gt;

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


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

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

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

&lt;p&gt;Something like :&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT p, b FROM \core\Simplys\Entity\Products p INDEX BY p.barcode JOIN p.businessid b INDEX BY p.id&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;or something like :&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT PARTIAL p.{id, barcode, name}, b.{id, attributesYouNeed} FROM \core\Simplys\Entity\Products p INDEX BY p.barcode JOIN p.businessid b INDEX BY p.id&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

<item>
            <title>[DDC-1682] EntityManager::clear() not working as expected.</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1682</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;ve been reading Doctrine2 Batch Processing documentation. &lt;br/&gt;
I&apos;ve a simplified the code and made a sample  where I&apos;m using a Repository inside the loop:&lt;/p&gt;

&lt;div class=&quot;code panel&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;for&lt;/span&gt; ($i=1; $i&amp;lt;=10000; ++$i) {
     $user = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getRepository(&apos;some user class&apos;)-&amp;gt;find($i);
     $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;clear();

     &lt;span class=&quot;code-comment&quot;&gt;//Clear variables to ensure garbage collections     
&lt;/span&gt;     unset($user);
     $user = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;

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

&lt;p&gt;I expect that this script will consume some constant memory in all iterations, but what happens is that every iteration raises memory consumption (more iterations, more memory).... i think that the clear method has some sort of memory leak.&lt;/p&gt;

&lt;p&gt;In my production environment (with complex script), i reach a memory limit exception even with 600MB limit... but if I clear the EntityManager on every iteration, shouldn&apos;t memory be freed?&lt;/p&gt;


&lt;p&gt;Sorry for my bad english.&lt;/p&gt;
</description>
                <environment>Ubuntu 11.10&lt;br/&gt;
Symfony 2</environment>
            <key id="13497">DDC-1682</key>
            <summary>EntityManager::clear() not working as expected.</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="4">Incomplete</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="gcaseres">German Caseres</reporter>
                        <labels>
                    </labels>
                <created>Mon, 5 Mar 2012 22:38:02 +0000</created>
                <updated>Wed, 17 Apr 2013 08:51:53 +0000</updated>
                    <resolved>Sun, 27 May 2012 08:03:37 +0000</resolved>
                            <version>2.1.6</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="17527" author="beberlei" created="Tue, 6 Mar 2012 07:51:22 +0000"  >&lt;p&gt;You are probably running symfony2 in debug mode? Is the SQL logger enabled? This is probably not a Doctrine problem but something in your code / Symfony that keeps increasing the memory.&lt;/p&gt;</comment>
                    <comment id="17530" author="gcaseres" created="Tue, 6 Mar 2012 14:34:14 +0000"  >&lt;p&gt;I&apos;ve executed the script in debug and prod mode, but I had the same problem in both modes.&lt;br/&gt;
I don&apos;t think it&apos;s a Symfony problem because I had measured memory consumption only before, after and inside the for loop (no symfony methods involved).&lt;br/&gt;
About my code, I&apos;m using simple clases with no business code, only simple Doctrine mappings (and standard repository).&lt;br/&gt;
Have you tested a similar code? I don&apos;t understand why memory consumption continues raising if I&apos;m &quot;destroying&quot; the objects.&lt;br/&gt;
I tried with gc_enable and gc_collect_cycles but no success... every iteration increases memory consumption like if the previous loaded objects weren&apos;t destroyed... maybe the repository is instancing other objects in every find call that are not destroyed?&lt;/p&gt;
</comment>
                    <comment id="17533" author="beberlei" created="Tue, 6 Mar 2012 20:02:25 +0000"  >&lt;p&gt;are you using lifecycle listeners? access global state or something?&lt;/p&gt;</comment>
                    <comment id="17551" author="beberlei" created="Sun, 11 Mar 2012 21:39:06 +0000"  >&lt;p&gt;Can you generate an xdebug trace for some of the $i&apos;s ? say 100 and 1000 with xdebug_start_trace(&quot;/tmp/loop&quot;.$i); and xdebug_stop_trace(); and upload them? Maybe you can compare yourself, where in the loop the memory increases and if clear even empties it or not.&lt;/p&gt;</comment>
                    <comment id="17721" author="ocramius" created="Sun, 1 Apr 2012 17:41:49 +0000"  >&lt;p&gt;Any news about this one? There&apos;s been more than one case where the Symfony data collector (for debug) caused problems like this one... Imo this is not a ORM issue.&lt;/p&gt;</comment>
                    <comment id="17985" author="beberlei" created="Sun, 27 May 2012 08:03:37 +0000"  >&lt;p&gt;No feedback given.&lt;/p&gt;</comment>
                    <comment id="18551" author="mvrhov" created="Tue, 28 Aug 2012 11:42:23 +0000"  >&lt;p&gt;I&apos;ve been debugging a similar issue today. And Yes, the culprit is the Symfony&apos;s data collector. Running the command with --no-debug worked like a charm.&lt;/p&gt;</comment>
                    <comment id="20022" author="pourquoi" created="Mon, 15 Apr 2013 17:35:22 +0000"  >&lt;p&gt;same issue here with 2.2.3, php 5.4 &amp;amp; symfony 2.1&lt;br/&gt;
have a symfony command running as deamon with --no-debug and no listeners&lt;/p&gt;

&lt;p&gt;while(true) {&lt;br/&gt;
$q = $this-&amp;gt;em-&amp;gt;createQueryBuilder()&lt;del&gt;&amp;gt;select()...&lt;/del&gt;&amp;gt;getQuery();&lt;br/&gt;
$results = $q-&amp;gt;getResult(AbstractQuery::HYDRATE_ARRAY); // commenting this line resolve the memory leak&lt;br/&gt;
$this-&amp;gt;em-&amp;gt;clear();&lt;br/&gt;
gc_collect_cycles(); // with or without does not change the issue&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;the consecutive traces shows that memory does not reduce after clear()&lt;/p&gt;</comment>
                    <comment id="20023" author="ocramius" created="Mon, 15 Apr 2013 18:15:43 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=pourquoi&quot; class=&quot;user-hover&quot; rel=&quot;pourquoi&quot;&gt;mathias dusautoy&lt;/a&gt; please check this in insulation (without Symfony2 if possible)&lt;/p&gt;</comment>
                    <comment id="20025" author="beberlei" created="Mon, 15 Apr 2013 22:14:58 +0000"  >&lt;p&gt;this may be array hydrator related, not sure that may not cause problems.&lt;/p&gt;</comment>
                    <comment id="20029" author="pourquoi" created="Tue, 16 Apr 2013 09:56:12 +0000"  >&lt;p&gt;without symfony:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&amp;lt;?php

use Doctrine\ORM\Tools\Setup;
use Doctrine\ORM\EntityManager;

$loader = require_once __DIR__.&apos;/../app/autoload.php&apos;;
$loader-&amp;gt;add(&apos;Acme\\CoreBundle&apos;, __DIR__.&apos;/../src/Acme/CoreBundle/&apos;);

$isDevMode = &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;
$config = Setup::createAnnotationMetadataConfiguration(array(__DIR__.&lt;span class=&quot;code-quote&quot;&gt;&quot;/../src/Acme/CoreBundle/Entity&quot;&lt;/span&gt;), $isDevMode, &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;, &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;, &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;);

$conn = array(
	&apos;driver&apos; =&amp;gt; &apos;pdo_mysql&apos;,
	&apos;host&apos; =&amp;gt; &apos;localhost&apos;,
	&apos;dbname&apos; =&amp;gt; &apos;dbname&apos;,
	&apos;user&apos; =&amp;gt; &apos;root&apos;,
	&apos;password&apos; =&amp;gt; &apos;&apos;
);

$em = EntityManager::create($conn, $config);

$d = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \DateTime();

&lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt;(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;) {
	echo memory_get_usage() . PHP_EOL;
	$qb = $em-&amp;gt;createQueryBuilder()
		-&amp;gt;select(&apos;c&apos;)
		-&amp;gt;from(&apos;Acme\\CoreBundle\\Entity\\Consultation&apos;, &apos;c&apos;)
		-&amp;gt;where(&apos;c.date &amp;gt; :date&apos;)-&amp;gt;setParameter(&apos;:date&apos;, $d)
		-&amp;gt;orderBy(&apos;c.date&apos;, &apos;ASC&apos;);

	$q = $qb-&amp;gt;getQuery();

	$results = $q-&amp;gt;getResult();

	foreach($results as $c) {
		echo $c-&amp;gt;getDate()-&amp;gt;format(&apos;H:i:s&apos;) . PHP_EOL;
	}
	
	$q-&amp;gt;free();

	$em-&amp;gt;clear();

	gc_collect_cycles();
	
	echo memory_get_usage() . PHP_EOL . PHP_EOL;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
7978568
7978568

7978568
7978568

7978568
11:51:27
11474520

11474520
11473368

11473368
11473368

11473368
11473368

11473368
11473368
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Am I missing something?&lt;/p&gt;</comment>
                    <comment id="20030" author="ocramius" created="Tue, 16 Apr 2013 10:13:32 +0000"  >&lt;p&gt;Memory usage here seems quite constant (the change from 7978568 to 11474520 may well be because of metadata and hydrators). The output doesn&apos;t seem to be conforming your snippet though. &lt;/p&gt;</comment>
                    <comment id="20031" author="pourquoi" created="Tue, 16 Apr 2013 10:26:37 +0000"  >&lt;p&gt;yes sorry the above output is for:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
foreach($results as $c) {
    echo $c-&amp;gt;getDate()-&amp;gt;format(&apos;H:i:s&apos;) . PHP_EOL;
    $d = $c-&amp;gt;getDate();
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;with&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
foreach($results as $c) {
    echo $c-&amp;gt;getDate()-&amp;gt;format(&apos;H:i:s&apos;) . PHP_EOL;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;the output 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;
3489864
12:22:27
13502680

13502680
12:22:27
13515496

13515496
12:22:27
13528328

13528328
12:22:27
13541144

13541144
12:22:27
13553976

....


74513560
12:22:27
74526520

74526520
12:22:27
74539520

74539520
12:22:27
74552560
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and goes on&lt;/p&gt;
</comment>
                    <comment id="20037" author="stof" created="Wed, 17 Apr 2013 08:51:53 +0000"  >&lt;p&gt;Do you have bidirectional relations in your user entity ? If yes, you will still have some references to the object after clearing the EntityManager (in the related object, itself reference by the user)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2311] ManyToManyPersister fails to delete when entity uses FK ID</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2311</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;ManyToManyPersister::getDeleteSQLParameters assumes $srcColumn contains a field name; doesn&apos;t handle association case.&lt;/p&gt;

&lt;p&gt;ManyToManyPerister.php, lines 204-209:&lt;/p&gt;
&lt;div class=&quot;code panel&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;// Composite identifier
&lt;/span&gt;$sourceClass = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getClassMetadata($mapping[&apos;sourceEntity&apos;]);
foreach ($mapping[&apos;relationToSourceKeyColumns&apos;] as $relColumn =&amp;gt; $srcColumn) {
   $params[] = $identifier[$sourceClass-&amp;gt;fieldNames[$srcColumn]];
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14514">DDC-2311</key>
            <summary>ManyToManyPersister fails to delete when entity uses FK ID</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="chrisrichard">Chris Richard</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Feb 2013 18:08:00 +0000</created>
                <updated>Tue, 16 Apr 2013 18:16:30 +0000</updated>
                    <resolved>Tue, 16 Apr 2013 18:16:30 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19670" author="fabio.bat.silva" created="Thu, 21 Feb 2013 21:12:28 +0000"  >&lt;p&gt;Hi Chris,&lt;/p&gt;

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

&lt;p&gt;Cheers.&lt;/p&gt;</comment>
                    <comment id="20034" author="fabio.bat.silva" created="Tue, 16 Apr 2013 18:16:30 +0000"  >&lt;p&gt;Fixed by : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/cef20890dc75c11880827226e25f3fc6d5d66127&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/cef20890dc75c11880827226e25f3fc6d5d66127&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2252] Trying to delete ManyToMany relatrionship with composite keys.</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2252</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;When i try to delete some entities attached to an entity I&apos;ve got the following message.&lt;/p&gt;

&lt;p&gt;My entity is specified as follow.&lt;/p&gt;

&lt;div class=&quot;code panel&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\Id
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Entity\User\Account&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;memberships&quot;&lt;/span&gt;)
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;uid&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;uid&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $userAccount;

    /**
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Entity\Merchant\Account&quot;&lt;/span&gt;)
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;mch_accountid&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;accountid&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $merchantAccount;

    /**
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;datetime&quot;&lt;/span&gt;, name=&lt;span class=&quot;code-quote&quot;&gt;&quot;date&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; datetime
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $date;

    /**
     * @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;var&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;boolean&lt;/span&gt;
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $administrator;

    /**
     * @ORM\ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Entity\User\Privilege&quot;&lt;/span&gt;, indexBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;privilegeid&quot;&lt;/span&gt;)
     * @ORM\JoinTable(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;fsbackend.user_mch_account_privilege&quot;&lt;/span&gt;,
     *   joinColumns={
     *       @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;mch_accountid&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;mch_accountid&quot;&lt;/span&gt;),
     *       @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;uid&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;uid&quot;&lt;/span&gt;)
     *   },
     *   inverseJoinColumns={
     *       @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;privilegeid&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;privilegeid&quot;&lt;/span&gt;)
     *   }
     * )
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $privileges;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I delete the related entities&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    $membership-&amp;gt;getPrivileges()-&amp;gt;clear();

    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;persist($userAccount);
    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I tried on doctrine 2.1.7 and the last doctrine version and same thing happens.&lt;/p&gt;

&lt;p&gt;Please find attached the error log.&lt;/p&gt;</description>
                <environment>Debian&lt;br/&gt;
PHP 5.3.7</environment>
            <key id="14401">DDC-2252</key>
            <summary>Trying to delete ManyToMany relatrionship with composite keys.</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="yokoloko">Jeremie Tom tom</reporter>
                        <labels>
                    </labels>
                <created>Tue, 22 Jan 2013 17:12:40 +0000</created>
                <updated>Tue, 16 Apr 2013 18:15:56 +0000</updated>
                    <resolved>Tue, 16 Apr 2013 18:15:56 +0000</resolved>
                            <version>2.1.7</version>
                <version>2.3.2</version>
                                <fixVersion>2.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19355" author="ocramius" created="Tue, 22 Jan 2013 17:16:36 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=yokoloko&quot; class=&quot;user-hover&quot; rel=&quot;yokoloko&quot;&gt;Jeremie Tom tom&lt;/a&gt; is the schema validated by the cli tools?&lt;/p&gt;</comment>
                    <comment id="19356" author="yokoloko" created="Tue, 22 Jan 2013 19:13:05 +0000"  >&lt;p&gt;Yes it&apos;s validated by the cli tools, if you are talking about the orm:validate-schema command.&lt;/p&gt;</comment>
                    <comment id="19358" author="yokoloko" created="Wed, 23 Jan 2013 09:23:19 +0000"  >&lt;p&gt;I think the problem is that my @Id are entities.&lt;/p&gt;</comment>
                    <comment id="19359" author="ocramius" created="Wed, 23 Jan 2013 09:35:58 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=yokoloko&quot; class=&quot;user-hover&quot; rel=&quot;yokoloko&quot;&gt;Jeremie Tom tom&lt;/a&gt; can you abstract it away into a test? &lt;/p&gt;</comment>
                    <comment id="19360" author="yokoloko" created="Wed, 23 Jan 2013 13:05:08 +0000"  >&lt;p&gt;Here is my test case.&lt;/p&gt;

&lt;p&gt;I put it IN Doctrine\Test\ORMJT.&lt;br/&gt;
I don&apos;t really know if you need something else, please let met know.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&amp;lt;?php

namespace Doctrine\Tests\ORMJT;

use Doctrine\ORM\Query;
use Doctrine\Common\Collections\ArrayCollection;

require_once __DIR__ . &apos;/../TestInit.php&apos;;

/**
 * Functional tests &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; the Single Table Inheritance mapping strategy.
 *
 * @author robo
 */
class AdvancedAssociationTest &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; \Doctrine\Tests\OrmFunctionalTestCase
{
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; function setUp() {
        parent::setUp();
        &lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_schemaTool-&amp;gt;createSchema(array(
                $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getClassMetadata(&apos;Doctrine\Tests\ORMJT\User&apos;),
                $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getClassMetadata(&apos;Doctrine\Tests\ORMJT\MerchantAccount&apos;),
                $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getClassMetadata(&apos;Doctrine\Tests\ORMJT\Membership&apos;),
                $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getClassMetadata(&apos;Doctrine\Tests\ORMJT\Privilege&apos;)
            ));
        } &lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; (\Exception $e) {
            &lt;span class=&quot;code-comment&quot;&gt;// Swallow all exceptions. We &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; not test the schema tool here.
&lt;/span&gt;        }
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function testIssue()
    {
        $user = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; User;
        $merchantAccount = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; MerchantAccount;
        $privilege = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Privilege;
        $membership = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Membership($user, $merchantAccount);
        $membership-&amp;gt;addPrivilege($privilege);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;persist($user);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;persist($merchantAccount);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;persist($privilege);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;flush();

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;persist($membership);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;flush();

        $membership-&amp;gt;getPrivileges()-&amp;gt;clear();

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;flush();

        &lt;span class=&quot;code-comment&quot;&gt;// Never reached
&lt;/span&gt;        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertTrue(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;);
    }
}


/**
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;mch_account&quot;&lt;/span&gt;)
 */
class MerchantAccount
{
    /**
     * @Id @GeneratedValue
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;bigint&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; bigint $accountid
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $accountid;
}

/**
 * @Entity(repositoryClass=&lt;span class=&quot;code-quote&quot;&gt;&quot;Repository\User\PrivilegeRepository&quot;&lt;/span&gt;)
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;acl_privilege&quot;&lt;/span&gt;)
 */
class Privilege
{
    /**
     * @Id @GeneratedValue
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;bigint&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; $privilegeid;
}

/**
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_account&quot;&lt;/span&gt;)
 */
class User {
    /**
     * @Id @GeneratedValue
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;bigint&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; $uid;

    /**
     * @OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Membership&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;userAccount&quot;&lt;/span&gt;, cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;persist&quot;&lt;/span&gt;})
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;uid&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;uid&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $memberships;

    &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;memberships = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ArrayCollection;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getMemberships()
    {
        &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;memberships;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addMembership(Membership $membership)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;memberships[] = $membership;
    }
}

/**
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;mch_account_member&quot;&lt;/span&gt;)
 * @HasLifecycleCallbacks
 */
class Membership
{
    /**
     * @Id
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;User&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;memberships&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;uid&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;uid&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $userAccount;

    /**
     * @Id
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;MerchantAccount&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;mch_accountid&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;accountid&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $merchantAccount;

    /**
     * @ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Privilege&quot;&lt;/span&gt;, indexBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;privilegeid&quot;&lt;/span&gt;)
     * @JoinTable(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_mch_account_privilege&quot;&lt;/span&gt;,
     *   joinColumns={
     *       @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;mch_accountid&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;mch_accountid&quot;&lt;/span&gt;),
     *       @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;uid&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;uid&quot;&lt;/span&gt;)
     *   },
     *   inverseJoinColumns={
     *       @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;privilegeid&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;privilegeid&quot;&lt;/span&gt;)
     *   }
     * )
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $privileges;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __construct(User $user, MerchantAccount $merchantAccount)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;userAccount = $user;
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;merchantAccount = $merchantAccount;
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;privileges = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ArrayCollection();
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addPrivilege($privilege)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;privileges[] = $privilege;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getPrivileges()
    {
        &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;privileges;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And i&apos;ve got 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;
1) Doctrine\Tests\ORMJT\AdvancedAssociationTest::testIssue
Exception: [PHPUnit_Framework_Error_Notice] Undefined index: mch_accountid
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="19361" author="ocramius" created="Wed, 23 Jan 2013 13:22:08 +0000"  >&lt;p&gt;Thank you so far, this makes it much easier to work with it!&lt;/p&gt;</comment>
                    <comment id="19417" author="yokoloko" created="Sat, 26 Jan 2013 11:59:02 +0000"  >&lt;p&gt;Interesting fact, if I only have one column in my jointable it works fine.&lt;/p&gt;

&lt;p&gt;eg. &lt;/p&gt;

&lt;div class=&quot;code panel&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 Membership
     *   ....
     *   @JoinTable(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_mch_account_privilege&quot;&lt;/span&gt;,
     *       joinColumns={
     *           @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;uid&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;uid&quot;&lt;/span&gt;)
     *       }
     *   ....
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="19482" author="yokoloko" created="Thu, 7 Feb 2013 14:59:07 +0000"  >&lt;p&gt;Ok here is my two cents solution. passes the tests.&lt;/p&gt;</comment>
                    <comment id="19814" author="yokoloko" created="Tue, 5 Mar 2013 13:32:19 +0000"  >&lt;p&gt;Hi, any update on this issue?&lt;/p&gt;</comment>
                    <comment id="19815" author="ocramius" created="Tue, 5 Mar 2013 13:39:29 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=yokoloko&quot; class=&quot;user-hover&quot; rel=&quot;yokoloko&quot;&gt;Jeremie Tom tom&lt;/a&gt; will be checking this tomorrow&lt;/p&gt;</comment>
                    <comment id="19852" author="yokoloko" created="Thu, 14 Mar 2013 11:15:33 +0000"  >&lt;p&gt;Everything ok with the check?&lt;/p&gt;</comment>
                    <comment id="20033" author="fabio.bat.silva" created="Tue, 16 Apr 2013 18:15:56 +0000"  >&lt;p&gt;Fixed by : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/cef20890dc75c11880827226e25f3fc6d5d66127&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/cef20890dc75c11880827226e25f3fc6d5d66127&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11375" name="AdvancedAssociationTest.php" size="4014" author="yokoloko" created="Wed, 23 Jan 2013 13:05:08 +0000" />
                    <attachment id="11374" name="jira-doctrine.txt" size="8974" author="yokoloko" created="Tue, 22 Jan 2013 17:12:40 +0000" />
                    <attachment id="11377" name="patch.diff" size="1381" author="yokoloko" created="Thu, 7 Feb 2013 14:59:55 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2400] [GH-648] Add a AddParameters method in the QueryBuilder</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2400</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 Taluu:&lt;/p&gt;

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

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

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

&lt;p&gt;On doctrine 2.2, when we were calling the method `setParameters` to set a bunch of parameters on the QueryBuilder, each parameters were added or modified if they were already existing. &lt;/p&gt;

&lt;p&gt;That is not the case since doctrine 2.3 : each calls to `setParameters` will wipe out the other already setted parameters. I think it is logic, but still is a huge BC break, which is not really mentionned in the UPGRADE file (only the once regarding the use of an ArrayCollection is mentionned). &lt;/p&gt;

&lt;p&gt;With this PR, I added a `addParameters` which allows to add several parameters in several calls. Here is a use case :&lt;/p&gt;

&lt;p&gt;```php&lt;br/&gt;
&amp;lt;?php&lt;br/&gt;
// ... A repository&lt;br/&gt;
class UserRepository extends EntityRepository&lt;br/&gt;
{&lt;br/&gt;
     public function getUserWithSomething($criteriaA, $criteriaB, DateTime $since = null)&lt;br/&gt;
     {&lt;br/&gt;
         $qb = $this-&amp;gt;createQueryBuilder(&apos;u&apos;);&lt;br/&gt;
         $qb-&amp;gt;where($qb-&amp;gt;expr()&lt;del&gt;&amp;gt;andX($qb&lt;/del&gt;&amp;gt;expr()-&amp;gt;eq(&apos;u.criteriaA&apos;, &apos;:criteriaA&apos;),&lt;br/&gt;
                                                       $qb-&amp;gt;expr()-&amp;gt;eq(&apos;u.criteriaB&apos;, &apos;:criteriaB&apos;)));&lt;/p&gt;

&lt;p&gt;         // wanna search for objects since a specific date&lt;br/&gt;
         if (null !== $since) &lt;/p&gt;
{
             $qb = $this-&amp;gt;addSince($qb, $since);
         }

&lt;p&gt;         $qb-&amp;gt;addParameters(new ArrayCollection([&apos;criteriaA&apos; =&amp;gt; $criteriaA, &lt;br/&gt;
                                                                       &apos;criteriaB&apos; =&amp;gt; $criteriaB]));&lt;/p&gt;

&lt;p&gt;         return $qb-&amp;gt;getQuery()-&amp;gt;execute();&lt;br/&gt;
     }&lt;/p&gt;

&lt;p&gt;     public function addSince(QueryBuilder $qb, DateTime $since)&lt;/p&gt;
     {
         $qb = $qb-&amp;gt;andWhere($qb-&amp;gt;expr()-&amp;gt;gte(&apos;u.date&apos;, &apos;:since&apos;));

         return $qb-&amp;gt;setParameter(&apos;since&apos;, $since);
     }
&lt;p&gt;}&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;So, as I was saying, until 2.2, you could use `setParameters` in the main method (`getUserWithSomething`) which was calling (or not) the submethod `addSince`, which could set parameters before calling the `setParameters` method. Now, you can&apos;t do that anymore : either you need to make several calls to `setParameter` :&lt;/p&gt;

&lt;p&gt;```php&lt;br/&gt;
&amp;lt;?php&lt;br/&gt;
// ....&lt;br/&gt;
     $qb = $qb-&amp;gt;setParameter(&apos;criteriaA&apos;, $criteriaA)&lt;br/&gt;
                   -&amp;gt;setParameter(&apos;criteraB&apos;, $criteriaB);&lt;br/&gt;
//...&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;Either, I guess, you need to first retrieve all the parameters and then add them by hand : &lt;/p&gt;

&lt;p&gt;```php&lt;br/&gt;
&amp;lt;?php&lt;br/&gt;
// ....&lt;br/&gt;
     $parameters = $qb-&amp;gt;getParameters();&lt;br/&gt;
     $parameters-&amp;gt;add(new Parameter(&apos;criteriaA&apos;, $criteriaA);&lt;br/&gt;
     $parameters-&amp;gt;add(new Parameter(&apos;criteriaB&apos;, $criteriaB);&lt;/p&gt;

&lt;p&gt;     $qb = $qb-&amp;gt;setParameters($parameters);&lt;br/&gt;
//...&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;So that&apos;s why I propose this new method in the QueryBuilder. if I&apos;m wrong anywhere, or need more information please feel free to comment. &lt;img class=&quot;emoticon&quot; src=&quot;http://doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;Cheers.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14779">DDC-2400</key>
            <summary>[GH-648] Add a AddParameters method in the QueryBuilder</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Sat, 13 Apr 2013 22:38:14 +0000</created>
                <updated>Sun, 14 Apr 2013 17:21:36 +0000</updated>
                    <resolved>Sun, 14 Apr 2013 17:21:36 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20013" author="doctrinebot" created="Sun, 14 Apr 2013 16:04:47 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-648&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/648&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/648&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

&lt;p&gt;It should be:&lt;/p&gt;

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

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

&lt;p&gt;When you run this query DQL she returns an empty array. &lt;br/&gt;
I getting solve my problem by adding WHERE clauses example as:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT p, um FROM Ciwwic\AppBundle\Entity\Provider p LEFT JOIN Ciwwic\UserBundle\Entity\UserMeta um WHERE p.id = 30 AND um.user = 30&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="20011" author="fabio.bat.silva" created="Sun, 14 Apr 2013 15:27:06 +0000"  >&lt;p&gt;Hi Enea&lt;/p&gt;

&lt;p&gt;If i got it correctly&lt;br/&gt;
Your associations &lt;b&gt;DmsObject#ownerUser&lt;/b&gt; and &lt;b&gt;DmsObject#ownerGroup&lt;/b&gt; are flipped.&lt;br/&gt;
Note that &lt;b&gt;ownerUser&lt;/b&gt; points to &lt;b&gt;sys_group_owner&lt;/b&gt; and &lt;b&gt;ownerGroup&lt;/b&gt; to &lt;b&gt;sys_user_owner&lt;/b&gt;&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;library\system\business\User&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;EAGER&quot;&lt;/span&gt;)
 * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;sys_group_owner&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;ID&quot;&lt;/span&gt;)
 */
&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $ownerUser;
/**
 * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;library\system\business\Group&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;EAGER&quot;&lt;/span&gt;)
 * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;sys_user_owner&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;ID&quot;&lt;/span&gt;)
 */
&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $ownerGroup;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It should be :&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;library\system\business\User&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;EAGER&quot;&lt;/span&gt;)
 * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;sys_user_owner&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;ID&quot;&lt;/span&gt;)
 */
&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $ownerUser;

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

<item>
            <title>[DDC-2023] IDENTITY() in subquery throws error</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2023</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi, the following 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;
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function testIdentityFunctionInSubqueryClause()
{
    $sql = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;createQuery(
        &quot;SELECT a
         FROM Doctrine\Tests\Models\CMS\CmsAddress a
         WHERE a.user IN (
             SELECT IDENTITY(a2.user)
             FROM Doctrine\Tests\Models\CMS\CmsArticle a2
         )&quot;
    )-&amp;gt;getSql();
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;throws 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;
1) Doctrine\Tests\ORM\Query\SelectSqlGenerationTest::testIdentityFunctionInSubqueryClause
Doctrine\ORM\Query\QueryException: [Syntax Error] line 0, col 85: Error: Expected Doctrine\ORM\Query\Lexer::T_FROM, got &apos;(&apos;

/Users/adrienbrault/Developer/php/mygithub/doctrine2/lib/Doctrine/ORM/Query/QueryException.php:42
/Users/adrienbrault/Developer/php/mygithub/doctrine2/lib/Doctrine/ORM/Query/Parser.php:380
/Users/adrienbrault/Developer/php/mygithub/doctrine2/lib/Doctrine/ORM/Query/Parser.php:255
/Users/adrienbrault/Developer/php/mygithub/doctrine2/lib/Doctrine/ORM/Query/Parser.php:1189
/Users/adrienbrault/Developer/php/mygithub/doctrine2/lib/Doctrine/ORM/Query/Parser.php:1280
/Users/adrienbrault/Developer/php/mygithub/doctrine2/lib/Doctrine/ORM/Query/Parser.php:2737
/Users/adrienbrault/Developer/php/mygithub/doctrine2/lib/Doctrine/ORM/Query/Parser.php:2228
/Users/adrienbrault/Developer/php/mygithub/doctrine2/lib/Doctrine/ORM/Query/Parser.php:2145
/Users/adrienbrault/Developer/php/mygithub/doctrine2/lib/Doctrine/ORM/Query/Parser.php:2121
/Users/adrienbrault/Developer/php/mygithub/doctrine2/lib/Doctrine/ORM/Query/Parser.php:2089
/Users/adrienbrault/Developer/php/mygithub/doctrine2/lib/Doctrine/ORM/Query/Parser.php:2064
/Users/adrienbrault/Developer/php/mygithub/doctrine2/lib/Doctrine/ORM/Query/Parser.php:1212
/Users/adrienbrault/Developer/php/mygithub/doctrine2/lib/Doctrine/ORM/Query/Parser.php:760
/Users/adrienbrault/Developer/php/mygithub/doctrine2/lib/Doctrine/ORM/Query/Parser.php:727
/Users/adrienbrault/Developer/php/mygithub/doctrine2/lib/Doctrine/ORM/Query/Parser.php:213
/Users/adrienbrault/Developer/php/mygithub/doctrine2/lib/Doctrine/ORM/Query/Parser.php:288
/Users/adrienbrault/Developer/php/mygithub/doctrine2/lib/Doctrine/ORM/Query.php:231
/Users/adrienbrault/Developer/php/mygithub/doctrine2/lib/Doctrine/ORM/Query.php:177
/Users/adrienbrault/Developer/php/mygithub/doctrine2/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php:1375
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I think that it&apos;s a bug and not a feature, because i tried to reproduce the last example from there &lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/dql-doctrine-query-language.html#dql-select-examples&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/dql-doctrine-query-language.html#dql-select-examples&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14027">DDC-2023</key>
            <summary>IDENTITY() in subquery throws error</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="adrienbrault">Adrien Brault</reporter>
                        <labels>
                    </labels>
                <created>Tue, 11 Sep 2012 12:51:03 +0000</created>
                <updated>Sun, 14 Apr 2013 12:43:37 +0000</updated>
                    <resolved>Sun, 14 Apr 2013 12:43:37 +0000</resolved>
                            <version>2.2</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="18625" author="asm89" created="Tue, 11 Sep 2012 13:12:05 +0000"  >&lt;p&gt;This is related to &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1557&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1557&lt;/a&gt;. It seems the fix was not backported to 2.2.&lt;/p&gt;</comment>
                    <comment id="19378" author="ocramius" created="Wed, 23 Jan 2013 21:57:27 +0000"  >&lt;p&gt;&lt;a href=&quot;http://doctrine-project.org/jira/secure/ViewProfile.jspa?name=adrienbrault&quot; class=&quot;user-hover&quot; rel=&quot;adrienbrault&quot;&gt;Adrien Brault&lt;/a&gt; does it work for you in 2.3?&lt;/p&gt;</comment>
                    <comment id="20010" author="beberlei" created="Sun, 14 Apr 2013 12:43:37 +0000"  >&lt;p&gt;Duplicate of &lt;a href=&quot;http://doctrine-project.org/jira/browse/DDC-1557&quot; title=&quot;SimpleSelectExpression does not accept DQL functions&quot;&gt;&lt;del&gt;DDC-1557&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2257] [GH-555] Failing test case for iterable ObjectHydrator</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2257</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 everzet:&lt;/p&gt;

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

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

&lt;p&gt;Here&apos;s the deal, whether you&apos;re using `ObjectHydrator::iterate()` on query with scalars, on each consequent iteration scalars go into advanced subarray. In terms of failing test case, we&apos;re getting:&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;iteration #1&lt;br/&gt;
  array(1) 
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: {    [0]=&amp;gt; array(2) {
      [&quot;id&quot;]=&amp;gt; string(1) &quot;1&quot;
      [&quot;name&quot;]=&amp;gt; string(6) &quot;romanb&quot;
    }&lt;br/&gt;
  }&lt;br/&gt;
- iteration #2&lt;br/&gt;
  array(1) {&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;=&amp;gt; array(2) {
      [&quot;id&quot;]=&amp;gt; string(1) &quot;2&quot;
      [&quot;name&quot;]=&amp;gt; string(5) &quot;jwage&quot;
    }&lt;br/&gt;
  }&lt;br/&gt;
- iteration #3&lt;br/&gt;
  array(1) {&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt;=&amp;gt; array(2) {
      [&quot;id&quot;]=&amp;gt; string(1) &quot;3&quot;
      [&quot;name&quot;]=&amp;gt; string(7) &quot;everzet&quot;
    }&lt;br/&gt;
  }&lt;br/&gt;
```&lt;br/&gt;
&lt;br/&gt;
Where in reality we expect:&lt;br/&gt;
&lt;br/&gt;
```&lt;br/&gt;
- iteration #1&lt;br/&gt;
  array(1) {&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;=&amp;gt; array(2) {
      [&quot;id&quot;]=&amp;gt; string(1) &quot;1&quot;
      [&quot;name&quot;]=&amp;gt; string(6) &quot;romanb&quot;
    }  }&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;iteration #2&lt;br/&gt;
  array(1) 
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: {    [0]=&amp;gt; array(2) {
      [&quot;id&quot;]=&amp;gt; string(1) &quot;2&quot;
      [&quot;name&quot;]=&amp;gt; string(5) &quot;jwage&quot;
    }  }&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;iteration #3&lt;br/&gt;
  array(1) 
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: {    [0]=&amp;gt; array(2) {
      [&quot;id&quot;]=&amp;gt; string(1) &quot;3&quot;
      [&quot;name&quot;]=&amp;gt; string(7) &quot;everzet&quot;
    }  }&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;```&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
                <environment></environment>
            <key id="14413">DDC-2257</key>
            <summary>[GH-555] Failing test case for iterable ObjectHydrator</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://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="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 25 Jan 2013 16:01:35 +0000</created>
                <updated>Sun, 14 Apr 2013 12:28:13 +0000</updated>
                    <resolved>Sun, 14 Apr 2013 12:27:50 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20006" author="beberlei" created="Sun, 14 Apr 2013 12:27:50 +0000"  >&lt;p&gt;Documented behavior&lt;/p&gt;</comment>
                    <comment id="20007" author="doctrinebot" created="Sun, 14 Apr 2013 12:28:13 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-555&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/555&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/555&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

&lt;hr /&gt;

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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


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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

&lt;p&gt;In the meantime, its not too hard/ugly to get a half-way decent embedded value yourself:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/** @Entity @HasLifecycleCallbacks */
class Foo {
    &lt;span class=&quot;code-comment&quot;&gt;// annotations not shown
&lt;/span&gt;    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $embedded;
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $value1; &lt;span class=&quot;code-comment&quot;&gt;// never reveal to &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;
&lt;/span&gt;    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $value2; &lt;span class=&quot;code-comment&quot;&gt;// never reveal to &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;
&lt;/span&gt;    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $value3; &lt;span class=&quot;code-comment&quot;&gt;// never reveal to &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;
&lt;/span&gt;
   &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getEmbedded() {
       &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;embedded;
   }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

&lt;div class=&quot;code panel&quot; style=&quot;b