<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sun May 19 13:16:32 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+DDC+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://www.doctrine-project.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Doctrine Project</title>
        <link>http://www.doctrine-project.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+DDC+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="2404"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DDC-2461] [GH-673] Namespace based command names</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2461</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of hell0w0rd:&lt;/p&gt;

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

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

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

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

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

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

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

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

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


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

<item>
            <title>[DDC-2458] [GH-671] [DDC-2435] Fix column name with numbers and non alphanumeric characters.</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="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-2456] [GH-669] Fixed generating column names for self referencing entity.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2456</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of hason:&lt;/p&gt;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-2452] Additional `WITH` condition in joins between JTI roots cause invalid SQL to be produced</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="10000" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <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-2444] NULL IN CASE WHEN</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="vahid4134">vahid sohrabloo</reporter>
                        <labels>
                    </labels>
                <created>Sun, 12 May 2013 07:56:49 +0000</created>
                <updated>Tue, 14 May 2013 08:21:23 +0000</updated>
                                    <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://www.doctrine-project.org/jira/browse/DDC-2208&quot; title=&quot;CASE WHEN ... WHEN doesn&amp;#39;t work&quot;&gt;DDC-2208&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2447] [GH-667] DQL: Allow parameter name to start with any allowed character</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="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-2429] Association-Override Problem in XSD Mapping?</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2429</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;From a mailinglist entry:&lt;/p&gt;

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

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

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

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

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

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



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

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

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


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

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

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

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

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

<item>
            <title>[DDC-2045] Unit of work use all columns for insert</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="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://www.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-2445] [GH-665] oo 	Add Null in ScalarExpression </title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2445</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of vahid-sohrabloo:&lt;/p&gt;

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

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

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

<item>
            <title>[DDC-2436] Inheritance on mappedSuperClass</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="2">Won&apos;t Fix</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/inprogress.png">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="scoolen">Sander Coolen</reporter>
                        <labels>
                    </labels>
                <created>Wed, 20 Jun 2012 15:06:08 +0000</created>
                <updated>Thu, 9 May 2013 22:14:27 +0000</updated>
                                    <version>2.2.0-RC1</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18195" author="beberlei" created="Thu, 5 Jul 2012 19:11:27 +0000"  >&lt;p&gt;Can you update to at least 2.2.1 and try again, because this fix here &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1652&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1652&lt;/a&gt; look like it could be related to your problem.&lt;/p&gt;</comment>
                    <comment id="18224" author="scoolen" created="Sat, 7 Jul 2012 14:46:47 +0000"  >&lt;p&gt;We&apos;re already using the 2.2.x-dev package. It does look similar to &lt;a href=&quot;http://www.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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/blocker.png">Blocker</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.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-2441] Incorrect SQL Query being generated</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="manseuk">Paul Mansell</reporter>
                        <labels>
                    </labels>
                <created>Thu, 9 May 2013 16:31:03 +0000</created>
                <updated>Thu, 9 May 2013 21:33:34 +0000</updated>
                                    <version>2.4</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

<item>
            <title>[DDC-2280] Database-first convert-mapping to XML fails to add length to varchar primary key in id tag</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.doctrine-project.org/jira/browse/DDC-2339</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of alex88:&lt;/p&gt;

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

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

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

<item>
            <title>[DDC-2439] [GH-662] Fixed a code block.</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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-2433] [GH-659] [wip] Pr mapping import</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Tue, 7 May 2013 13:40:30 +0000</created>
                <updated>Thu, 9 May 2013 11:47:47 +0000</updated>
                    <resolved>Thu, 9 May 2013 11:47:47 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</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>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2430] Incorrect results when using -&gt;matching on PersistentCollection</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="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-2387] convert-mapping not working correctly with composite primary keys/foreign keys in 2.4.0-RC1</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="succinct">Nicholas Van Dusen</reporter>
                        <labels>
                    </labels>
                <created>Wed, 3 Apr 2013 20:45:40 +0000</created>
                <updated>Thu, 9 May 2013 10:11:52 +0000</updated>
                    <resolved>Thu, 9 May 2013 10:11:52 +0000</resolved>
                                            <fixVersion>2.3.4</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>5</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>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2437] [GH-660] Fixed critical bug with position indexBy in DQL</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="10000" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/browse/DDC-2424</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;For a parent class:&lt;/p&gt;

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-2428] [GH-658] UPDATE clause supports ORDER BY and LIMIT</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/emoticons/wink.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;div class=&quot;code panel&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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 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://www.doctrine-project.org/jira/browse/DDC-2319</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of michaelperrin:&lt;/p&gt;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-2006] one2many to self inverts table aliasses and creates wrong db query</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                                <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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="2">Won&apos;t Fix</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.doctrine-project.org/jira/browse/DDC-2316</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Majkl578:&lt;/p&gt;

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

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

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

<item>
            <title>[DDC-2350] [GH-614] ObjectHydrator: fix entity namespaces.</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/trivial.png">Trivial</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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://www.doctrine-project.org/jira/browse/DDC-2167</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of beberlei:&lt;/p&gt;

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

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

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

<item>
            <title>[DDC-2133] Issue with Query::iterate and query mixed results</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=guilhermeblanco&quot; class=&quot;user-hover&quot; rel=&quot;guilhermeblanco&quot;&gt;Guilherme Blanco&lt;/a&gt; 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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;br/&gt;
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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                                <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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="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://www.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://www.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://www.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://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;, 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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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://www.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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/task.png">Task</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="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://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=benjamin&quot; class=&quot;user-hover&quot; rel=&quot;benjamin&quot;&gt;Benjamin Morel&lt;/a&gt; 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://www.doctrine-project.org/jira/browse/DDC-2078</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of kimhemsoe:&lt;/p&gt;

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

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

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

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

<item>
            <title>[DDC-2135] Setting column defaults using options in the annotations causes redundant alter statements </title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=beberlei&quot; class=&quot;user-hover&quot; rel=&quot;beberlei&quot;&gt;Benjamin Eberlei&lt;/a&gt;, 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://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=fabio.bat.silva&quot; class=&quot;user-hover&quot; rel=&quot;fabio.bat.silva&quot;&gt;Fabio B. Silva&lt;/a&gt; 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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="2">Won&apos;t Fix</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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://www.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://www.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-2235] Single table inheritance discriminator in WHERE when using arbitrary join syntax</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</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>Mon, 29 Apr 2013 14:56:54 +0000</updated>
                    <resolved>Sun, 14 Apr 2013 09:56:47 +0000</resolved>
                            <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>3</votes>
                        <watches>8</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://www.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://www.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://www.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>
                </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-2420] [GH-656] [DDC-2235] Fix for using a LEFT JOIN onto an entity with single table inheritance</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2420</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of tarnfeld:&lt;/p&gt;

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

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

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

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

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

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

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

<item>
            <title>[DDC-2415] CustomIdGenerator not inherited from MappedSuperclass</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="2">Won&apos;t Fix</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.doctrine-project.org/jira/browse/DDC-776</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am currently trying to work with BINARY columns with Doctrine 2 and MSSQL. In order to get my Entities working I had to create a custom Mapping Type for Binary columns. All went well in this case and I&apos;ve got it running.&lt;/p&gt;

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-2410] [GH-650] Fixed typo in SQLFilter addFilterConstraint first param</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=ocramius&quot; class=&quot;user-hover&quot; rel=&quot;ocramius&quot;&gt;Marco Pivetta&lt;/a&gt; &lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=beberlei&quot; class=&quot;user-hover&quot; rel=&quot;beberlei&quot;&gt;Benjamin Eberlei&lt;/a&gt;&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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/blocker.png">Blocker</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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://www.doctrine-project.org/jira/browse/DDC-2405</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;For (unit, acceptance, functional) testing purpose I need to change the strategy of my GameStuff Entity class.&lt;/p&gt;

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-2407] AbstractExporter _getIdGeneratorTypeString does not know about the UUID generator</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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>5</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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.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://www.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://www.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://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=noise085&quot; class=&quot;user-hover&quot; rel=&quot;noise085&quot;&gt;Enea Bette&lt;/a&gt; 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://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=noise085&quot; class=&quot;user-hover&quot; rel=&quot;noise085&quot;&gt;Enea Bette&lt;/a&gt; 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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="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://www.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://www.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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="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://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="ablock">Avi Block</reporter>
                        <labels>
                    </labels>
                <created>Sun, 1 Nov 2009 14:27:35 +0000</created>
                <updated>Sun, 14 Apr 2013 10:18:46 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>37</votes>
                        <watches>31</watches>
                        <comments>
                    <comment id="10511" author="beberlei" created="Thu, 5 Nov 2009 13:06:26 +0000"  >&lt;p&gt;formated snippets nicely&lt;/p&gt;</comment>
                    <comment id="11150" author="trashofmasters" created="Wed, 9 Dec 2009 17:59:53 +0000"  >&lt;p&gt;I need this feature too.&lt;/p&gt;

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

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

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

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

&lt;p&gt;&lt;b&gt;VO as a pattern&lt;/b&gt; is important building block of &lt;em&gt;domain model&lt;/em&gt;, which clearly indicates that &lt;b&gt;VO as a feature of Doctrine2&lt;/b&gt; should be tailor-made.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;To anyone of dev-team reading this issue: without VOs Doctrine is not yet DDD-ready, please hurry &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;
</comment>
                    <comment id="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://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="12978" author="jkleijn" created="Sun, 16 May 2010 11:50:31 +0000"  >&lt;p&gt;+1&lt;/p&gt;

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

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

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

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

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


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

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

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

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

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

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;&quot;Base.php&quot;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
 /* @MappedSuperclass */
&lt;span class=&quot;code-keyword&quot;&gt;abstract&lt;/span&gt; class Base {
  /* there&apos;re methods like _getParent(), _getPropertyName(), etc. used in code behind */
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;&quot;ValueBase.php&quot;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
&lt;span class=&quot;code-keyword&quot;&gt;abstract&lt;/span&gt; class ValueBase &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Base { 
   &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getValue() {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_getParent()-&amp;gt;{$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_getPropertyName()};
   }
   
   &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setValue($value) {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_getParent()-&amp;gt;{$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_getPropertyName()} = $value;
   }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;&quot;EntityBase.php&quot;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
/** @MappedSuperclass */
&lt;span class=&quot;code-keyword&quot;&gt;abstract&lt;/span&gt; class EntityBase &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Base {
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __call($name, $arguments) {
        /* get property object */
        $pattern = &apos;/^get(.*)$/u&apos;;
        preg_match($pattern, $name, $matches);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($matches[1])) {
            $propertyName = lcfirst($matches[1]);
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;get($propertyName);
        }

        /* set entity */
        $pattern = &apos;/^set(.*)$/u&apos;;
        preg_match($pattern, $name, $matches);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($matches[1])) {
            $propertyName = lcfirst($matches[1]);
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;set($propertyName, $arguments[0]);
        }
    }

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

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

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

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

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

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

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

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

&lt;p&gt;It would be nice, if this is support by Doctrine natively, because i have some performace problems with my implementation. If it&apos;s interest in my whole code i can send you. But of course there&apos;s some security holes so i&apos;ll send it privetely. Thanks for understand and for Doctrine of course.&lt;/p&gt;</comment>
                    <comment id="16166" author="mathiasverraes" created="Wed, 13 Jul 2011 06:22:23 +0000"  >&lt;p&gt;Note that Roman&apos;s workaround presented here does not work.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;   /** @PrePersist @PreUpdate */
   function _destructEmbedded() {
       &lt;span class=&quot;code-comment&quot;&gt;// destruct $embedded into $value1, $value2, $value3
&lt;/span&gt;   }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

&lt;p&gt;The downside is that you need to remember to call the method in every setter, but apart from that, there are no side effects, it always works and it&apos;s just one line of code &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;_constructEmbedded() keeps working as is, postLoad will always be triggered.&lt;/p&gt;</comment>
                    <comment id="17022" author="dbenjamin" created="Sun, 18 Dec 2011 10:45:26 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

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

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

&lt;p&gt;I have no doubts that you&apos;ve already took this in consideration, but i prefer pointing this out, just in case &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;


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

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

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

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

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

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

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

<item>
            <title>[DDC-2382] Multiple relations between two same entities breaks cascade operations</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2382</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * @Entity
 */

class User
{
/**
 * @Id
 * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
 * @GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;AUTO&quot;&lt;/span&gt;)
 */

&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;

/**
 * @OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Post&quot;&lt;/span&gt;, cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;remove&quot;&lt;/span&gt;}, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;author&quot;&lt;/span&gt;)
 */

 &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $posts;

/**
 * @OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Post&quot;&lt;/span&gt;)
 */

 &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $lastPost;

&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setLastPost( $post )
{
    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;lastPost = $post;
}

  &lt;span class=&quot;code-comment&quot;&gt;// ...skipped...
&lt;/span&gt;
}


/**
 * @Entity
 */

class Post
{
/**
 * @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;

/**
 *
 * @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;posts&quot;&lt;/span&gt;)
 * @JoinColumn(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; $author;

&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setAuthor( $author )
{
    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;author = $author;
}

&lt;span class=&quot;code-comment&quot;&gt;// ...skipped...
&lt;/span&gt;}

&lt;span class=&quot;code-comment&quot;&gt;// Let&apos;s create user and post
&lt;/span&gt;
$user = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; User();
$em-&amp;gt;persist($user);

$post = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Post();
$em-&amp;gt;persist($post);

$post-&amp;gt;setUser($user);
$user-&amp;gt;setLastPost($post);

$em-&amp;gt;flush();

&lt;span class=&quot;code-comment&quot;&gt;// and now remove user
&lt;/span&gt;
$user = $em-&amp;gt;find(&apos;User&apos;, 1);
$em-&amp;gt;remove($user);

$em-&amp;gt;flush(); 
&lt;span class=&quot;code-comment&quot;&gt;// &quot;The DELETE statement conflicted with the REFERENCE 
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// constraint...&quot;.
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// Doctrine removes record from &lt;span class=&quot;code-quote&quot;&gt;&quot;User&quot;&lt;/span&gt; table, ignoring associated records from &lt;span class=&quot;code-quote&quot;&gt;&quot;Post&quot;&lt;/span&gt; table. If i remove &lt;span class=&quot;code-quote&quot;&gt;&quot;lastPost&quot;&lt;/span&gt; relation 
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;//from User entity everything goes OK - at first Doctrine removes assiciated posts, then removes user itself.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14747">DDC-2382</key>
            <summary>Multiple relations between two same entities breaks cascade operations</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="drake_jc">Alex</reporter>
                        <labels>
                    </labels>
                <created>Mon, 1 Apr 2013 13:45:36 +0000</created>
                <updated>Sun, 14 Apr 2013 10:10:53 +0000</updated>
                    <resolved>Sun, 14 Apr 2013 10:10:53 +0000</resolved>
                            <version>2.3.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19999" author="beberlei" created="Sun, 14 Apr 2013 10:10:53 +0000"  >&lt;p&gt;Not an issue of Doctrine, you have to handle this case explicitly, because Doctrine has no way of doing so.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2383] Foreign relations on primary keys don&apos;t work on more than two entities (like Foo&lt;&gt;Bar&lt;&gt;Baz)</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2383</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;m trying to accomplish something like this:&lt;br/&gt;
&lt;a href=&quot;http://docs.doctrine-project.org/en/latest/tutorials/composite-primary-keys.html#use-case-2-simple-derived-identity&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/en/latest/tutorials/composite-primary-keys.html#use-case-2-simple-derived-identity&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For two entities (Foo&amp;lt;&amp;gt;Bar) it works as expected but adding another entity related to Bar (so it&apos;s Foo&amp;lt;&amp;gt;Bar&amp;lt;&amp;gt;Baz) ends up with this 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;
Fatal error: Uncaught exception &apos;Doctrine\ORM\Mapping\MappingException&apos; with message &apos;The column id must be mapped to a field in class Entity\Bar since it is referenced by a join column of another class.&apos; in C:\...\vendor\doctrine\orm\lib\Doctrine\ORM\Mapping\MappingException.php:203
Stack trace:
#0 C:\...\vendor\doctrine\orm\lib\Doctrine\ORM\Persisters\BasicEntityPersister.php(734): Doctrine\ORM\Mapping\MappingException::joinColumnMustPointToMappedField(&apos;Entity\Bar&apos;, &apos;id&apos;)
#1 C:\...\vendor\doctrine\orm\lib\Doctrine\ORM\UnitOfWork.php(2509): Doctrine\ORM\Persisters\BasicEntityPersister-&amp;gt;loadOneToOneEntity(Array, &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;(Entity\Bar))
#2 C:\...\vendor\doctrine\orm\lib\Doctrine\ORM\Internal\Hydration\ObjectHydrator.php(245): Doctrine\ORM\UnitOfWork-&amp;gt;createEntity(&apos;Entity\Bar&apos;, Array, Array)
#3 C:\...\vendor\doctrine\orm\lib\Doctrine\ORM\Internal\Hydration\ObjectHydrator.php(424): Doctrine\ORM\Internal\Hydration\Ob in C:\...\vendor\doctrine\orm\lib\Doctrine\ORM\Mapping\MappingException.php on line 203
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This error appears when there are some records in the database and I want to query for example all Foos.&lt;/p&gt;

&lt;p&gt;My entites 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;
&lt;span class=&quot;code-comment&quot;&gt;//Entity/Foo.php
&lt;/span&gt;
/** @Entity @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;foos&quot;&lt;/span&gt;) */
class Foo
{
    /** @Id @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;) @GeneratedValue */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;

    /** @OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Bar&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;foo&quot;&lt;/span&gt;) */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $bar;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getId()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;id;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getBar()
    {
        &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;bar;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setBar($bar)
    {
        $bar-&amp;gt;setFoo($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;bar = $bar;
    }
}

&lt;span class=&quot;code-comment&quot;&gt;//Entity/Bar.php
&lt;/span&gt;
/** @Entity @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;bars&quot;&lt;/span&gt;) */
class Bar
{
    /** @Id @OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Foo&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;bar&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;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; $foo;

    /** @OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Baz&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;bar&quot;&lt;/span&gt;) */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $baz;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __construct($foo)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;foo = $foo;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getId()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getFoo()-&amp;gt;getId();
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getFoo()
    {
        &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;foo;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setFoo($foo)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;foo = $foo;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getBaz()
    {
        &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;baz;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setBaz($baz)
    {
        $bar-&amp;gt;setBar($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;baz = $baz;
    }
}

&lt;span class=&quot;code-comment&quot;&gt;//Entity/Baz.php
&lt;/span&gt;
/** @Entity @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;bazes&quot;&lt;/span&gt;) */
class Baz
{
    /** @Id @OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Bar&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;baz&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;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; $bar;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __construct($bar)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;bar = $bar;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getId()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getBar()-&amp;gt;getId();
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getBar()
    {
        &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;bar;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setBar($bar)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;bar = $bar;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And fails on&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$fooRepository = $em-&amp;gt;getRepository(&apos;Entity\Foo&apos;);
$foos = $fooRepository-&amp;gt;findAll();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14748">DDC-2383</key>
            <summary>Foreign relations on primary keys don&apos;t work on more than two entities (like Foo&lt;&gt;Bar&lt;&gt;Baz)</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="7">Can&apos;t Fix</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="extreme">Jacek J&#281;drzejewski</reporter>
                        <labels>
                        <label>hydration</label>
                        <label>mapping</label>
                        <label>relations</label>
                    </labels>
                <created>Mon, 1 Apr 2013 20:01:54 +0000</created>
                <updated>Sun, 14 Apr 2013 10:05:59 +0000</updated>
                    <resolved>Sun, 14 Apr 2013 10:05:59 +0000</resolved>
                            <version>2.3</version>
                <version>2.4</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19920" author="extreme" created="Mon, 1 Apr 2013 21:21:26 +0000"  >&lt;p&gt;Attaching a test case which results in two exceptions - while creating the schema and while fetching entities.&lt;/p&gt;</comment>
                    <comment id="19998" author="beberlei" created="Sun, 14 Apr 2013 10:05:59 +0000"  >&lt;p&gt;This is sadly a restriction of the foreign keys as primary key feature.&lt;/p&gt;

&lt;p&gt;Due to the architecture of shared nothing Metadata instances we cannot validate this at mapping compile time, only at runtime, thus leading to this error.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11520" name="DDC2383Test.php" size="2946" author="extreme" created="Mon, 1 Apr 2013 21:19:50 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2361] [GH-623] Related to DDC-2282</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2361</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 AaronDDM:&lt;/p&gt;

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

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

&lt;p&gt;This is related to the patch&#65533;&#65533;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2282&quot; title=&quot;[GH-572] Fixed SQLServer ORDER BY problem in paginator CountOutputWalker&quot;&gt;&lt;del&gt;DDC-2282&lt;/del&gt;&lt;/a&gt;, the same patch also needs to be applied here, exact same issue.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14711">DDC-2361</key>
            <summary>[GH-623] Related to DDC-2282</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Mar 2013 22:56:57 +0000</created>
                <updated>Sun, 14 Apr 2013 09:57:22 +0000</updated>
                    <resolved>Sun, 14 Apr 2013 09:57:22 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19881" author="beberlei" created="Thu, 21 Mar 2013 22:57:08 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-623&amp;#93;&lt;/span&gt; was opened&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/623&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/623&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19886" author="beberlei" created="Sat, 23 Mar 2013 04:35:10 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-623&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/623&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/623&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2394] QueryExpressionVisitor has no implementation of Comparison::CONTAINS</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2394</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;Use case&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$criteria = Criteria::create();
$criteria
    -&amp;gt;andWhere(
        $criteria-&amp;gt;expr()-&amp;gt;contains(&apos;r.body&apos;, &apos;foo&apos;)
    )
;

$entities = $repo-&amp;gt;createQueryBuilder()-&amp;gt;addCriteria($criteria)-&amp;gt;getQuery()-&amp;gt;getResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Throws the following exception:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;RuntimeException: Unknown comparison &lt;span class=&quot;code-keyword&quot;&gt;operator&lt;/span&gt;: CONTAINS&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I except it to properly handle the &lt;tt&gt;CONTAINS&lt;/tt&gt; comparison and result in a &lt;tt&gt;LIKE&lt;/tt&gt; operator.&lt;/p&gt;

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

&lt;p&gt;I added a failing test case &amp;amp; a fix there: &lt;a href=&quot;https://github.com/borisguery/doctrine2/tree/DDC-2394&quot; class=&quot;external-link&quot;&gt;https://github.com/borisguery/doctrine2/tree/DDC-2394&lt;/a&gt;&lt;/p&gt;</description>
                <environment>n/a</environment>
            <key id="14768">DDC-2394</key>
            <summary>QueryExpressionVisitor has no implementation of Comparison::CONTAINS</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="bguery">Boris Gu&#233;ry</reporter>
                        <labels>
                        <label>criteria</label>
                        <label>expression</label>
                        <label>orm</label>
                        <label>query</label>
                    </labels>
                <created>Mon, 8 Apr 2013 17:34:13 +0000</created>
                <updated>Sun, 14 Apr 2013 09:21:21 +0000</updated>
                    <resolved>Sun, 14 Apr 2013 09:21:21 +0000</resolved>
                            <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19994" author="beberlei" created="Sun, 14 Apr 2013 09:21:21 +0000"  >&lt;p&gt;This was added in 2.4, you are probably using Collections 1.1 with ORM 2.3, where this occurs.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2395] [GH-645] Fixes Oracle Pagination bug when ordering is present (e.g. Oracle subquery ordering)</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2395</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 raykolbe:&lt;/p&gt;

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

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

&lt;p&gt;See&#65533;&#65533;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1800&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1800&lt;/a&gt; for a full description of the problem.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14771">DDC-2395</key>
            <summary>[GH-645] Fixes Oracle Pagination bug when ordering is present (e.g. Oracle subquery ordering)</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Tue, 9 Apr 2013 20:02:09 +0000</created>
                <updated>Sun, 14 Apr 2013 09:10:02 +0000</updated>
                    <resolved>Sun, 14 Apr 2013 09:10:02 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19970" author="doctrinebot" created="Tue, 9 Apr 2013 20:34:29 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-645&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/645&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/645&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2396] [GH-646] Oracle Pagination bug when ordering is present</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2396</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 raykolbe:&lt;/p&gt;

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

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

&lt;p&gt;Please reference &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1800&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1800&lt;/a&gt; and &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1958#comment-19969&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1958#comment-19969&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14772">DDC-2396</key>
            <summary>[GH-646] Oracle Pagination bug when ordering is present</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Tue, 9 Apr 2013 20:35:23 +0000</created>
                <updated>Sun, 14 Apr 2013 08:54:03 +0000</updated>
                    <resolved>Sun, 14 Apr 2013 08:54:03 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19973" author="doctrinebot" created="Wed, 10 Apr 2013 17:49:38 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-646&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/646&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/646&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2346] [GH-611] Fixed typo in hints. Caused slow loading of eager entities.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2346</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 stefankleff:&lt;/p&gt;

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

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

&lt;p&gt;This small typo prevents entities from being fetched with the deferred- eager-loading path. &lt;/p&gt;</description>
                <environment></environment>
            <key id="14686">DDC-2346</key>
            <summary>[GH-611] Fixed typo in hints. Caused slow loading of eager entities.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 12 Mar 2013 15:20:26 +0000</created>
                <updated>Sun, 14 Apr 2013 07:53:22 +0000</updated>
                    <resolved>Sun, 14 Apr 2013 07:53:22 +0000</resolved>
                                            <fixVersion>2.3.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19988" author="doctrinebot" created="Sun, 14 Apr 2013 07:43:49 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-611&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/611&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/611&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19989" author="beberlei" created="Sun, 14 Apr 2013 07:53:22 +0000"  >&lt;p&gt;Fixed and waiting in 2.3 release branch&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2399] unserializing returns proxyclass name with slashes</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2399</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I serialize a &quot;user&quot;-entity using the following code:&lt;/p&gt;

&lt;p&gt;$user-&amp;gt;getBusinessid()-&amp;gt;getId(); //this is necessary to load the proxy&lt;br/&gt;
$em-&amp;gt;detach($user);&lt;br/&gt;
$_SESSION&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;user&amp;#39;&amp;#93;&lt;/span&gt; = serialize($user);&lt;/p&gt;

&lt;p&gt;When I unserialize said entity with this code:&lt;/p&gt;

&lt;p&gt;$em = self::getEntityManager();&lt;br/&gt;
$user = unserialize($_SESSION&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;user&amp;#39;&amp;#93;&lt;/span&gt;);&lt;br/&gt;
return $em-&amp;gt;merge($user);&lt;/p&gt;

&lt;p&gt;I get an error like this:&lt;br/&gt;
require(): Failed opening required &apos;./core/project/Proxy/_&lt;em&gt;CG&lt;/em&gt;_/core/project/Entity/Businesses.php&apos; .&lt;/p&gt;

&lt;p&gt;The thing is that everything after _&lt;em&gt;CG&lt;/em&gt;_ should &lt;b&gt;not&lt;/b&gt; have any forward slashes. In that case the path would be completely correct.&lt;/p&gt;</description>
                <environment>OSX, PHP 5.4.9</environment>
            <key id="14778">DDC-2399</key>
            <summary>unserializing returns proxyclass name with slashes</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="6">Invalid</resolution>
                                <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="quintenvk">Quintenvk</reporter>
                        <labels>
                    </labels>
                <created>Fri, 12 Apr 2013 19:05:01 +0000</created>
                <updated>Fri, 12 Apr 2013 19:23:44 +0000</updated>
                    <resolved>Fri, 12 Apr 2013 19:16:01 +0000</resolved>
                            <version>2.3.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19986" author="ocramius" created="Fri, 12 Apr 2013 19:15:34 +0000"  >&lt;p&gt;There&apos;s an appositely coded autoloader in the ORM in 2.3 ( &lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/2.3.3/lib/Doctrine/ORM/Proxy/Autoloader.php&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/2.3.3/lib/Doctrine/ORM/Proxy/Autoloader.php&lt;/a&gt; ) and in common in 2.4-RC ( &lt;a href=&quot;https://github.com/doctrine/common/blob/2.4.0-RC1/lib/Doctrine/Common/Proxy/Autoloader.php&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/blob/2.4.0-RC1/lib/Doctrine/Common/Proxy/Autoloader.php&lt;/a&gt; ). Proxies are not PSR-0 compliant &lt;/p&gt;</comment>
                    <comment id="19987" author="quintenvk" created="Fri, 12 Apr 2013 19:23:44 +0000"  >&lt;p&gt;Ah, I hadn&apos;t found anything about that. Thank you!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2397] [GH-647] Bugfix/ddc 1048 cordoval</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2397</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 cordoval:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="14773">DDC-2397</key>
            <summary>[GH-647] Bugfix/ddc 1048 cordoval</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="doctrinebot">Doctrine Bot</reporter>
                        <labels>
                    </labels>
                <created>Wed, 10 Apr 2013 03:29:36 +0000</created>
                <updated>Fri, 12 Apr 2013 01:11:18 +0000</updated>
                    <resolved>Fri, 12 Apr 2013 01:11:18 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19972" author="cordoval" created="Wed, 10 Apr 2013 03:37:58 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1048&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1048&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;please check ^^&lt;/p&gt;</comment>
                    <comment id="19983" author="doctrinebot" created="Fri, 12 Apr 2013 01:07:10 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-647&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/647&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/647&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1048] Boolean type issue</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1048</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;m having issues working with Doctrine2 boolean type. My mapping is basic:	&lt;/p&gt;

&lt;div class=&quot;code panel&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: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;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;, name=&lt;span class=&quot;code-quote&quot;&gt;&quot;is_deleted&quot;&lt;/span&gt;)
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $isDeleted;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When I&apos;m trying to flush the object with $isDeleted=false (or true), the entity is not being added to the db. However when I set  $isDeleted=&apos;0&apos; (or &apos;1&apos;) everything works fine.&lt;/p&gt;

&lt;p&gt;I saw plenty of examples where people were using true and false, instead of &apos;0&apos; and &apos;1&apos;. But with MySQL it doesn&apos;t work. Doctrine maps boolean field as TINYINT(1) in MySQL.  And I can see in Symfony2 Profiler the parameter in the query is &quot;false&quot;/&quot;true&quot;, so here is data type conflict.&lt;/p&gt;

&lt;p&gt;Doctrine doesn&apos;t transform true/false to 1/0 values.&lt;/p&gt;</description>
                <environment>MySQL, pdo_mysql, Symfony2</environment>
            <key id="12432">DDC-1048</key>
            <summary>Boolean type issue</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="5">Cannot Reproduce</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="websirnik">Nikita Korotaev</reporter>
                        <labels>
                    </labels>
                <created>Sun, 27 Feb 2011 11:32:39 +0000</created>
                <updated>Fri, 12 Apr 2013 01:10:32 +0000</updated>
                    <resolved>Thu, 15 Mar 2012 21:46:08 +0000</resolved>
                            <version>2.0</version>
                                                <component>Mapping Drivers</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="15454" author="beberlei" created="Fri, 4 Mar 2011 17:09:02 +0000"  >&lt;p&gt;Boolean works fine for me with MySQL since forever, i cannot reproduce this. Can you come up with a reproducable test-case in our Testsuite? Otherwise odds are pretty slim to fix this, as i need to see whats happening.&lt;/p&gt;</comment>
                    <comment id="15457" author="websirnik" created="Fri, 4 Mar 2011 18:29:31 +0000"  >&lt;p&gt;Sorry don&apos;t know how to use your Testsuite.&lt;/p&gt;

&lt;p&gt;So basically what I have:&lt;/p&gt;

&lt;p&gt;Symfony 2 PR6 standard sandbox with the following config:&lt;/p&gt;

&lt;div class=&quot;code panel&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:
   dbal:
       dbname:   shop
       user:     root
       password: ~
       logging:  %kernel.debug%
   orm:
       auto_generate_proxy_classes: %kernel.debug%
       mappings:
           HelloBundle: ~
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then I have simple 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

namespace Sensio\HelloBundle\Entity;

/**
 * @orm:Entity()
 * @orm:Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;product&quot;&lt;/span&gt;)
 */
class Product
{
    /**
     * @orm:Id
     * @orm:GeneratedValue
     * @orm:Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;

    /** @orm:Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;text&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; $name;

    
    /** @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;private&lt;/span&gt; $inStock;
    
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getId()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;id;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setName($name)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;name = $name;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getName()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;name;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setInStock($inStock)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;inStock = $inStock;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getInStock()
    {
        &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;inStock;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Run the following commands:&lt;/p&gt;

&lt;div class=&quot;code panel&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:database:create
php app/console doctrine:schema:create
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And finally I have simple action in the HelloController:&lt;/p&gt;

&lt;div class=&quot;code panel&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 Sensio\HelloBundle\Controller;

use Sensio\HelloBundle\Entity\Product;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class HelloController &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Controller
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function indexAction($name)
    {
         $product = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Product();
         $product-&amp;gt;setName($name);
         $product-&amp;gt;setInStock(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;);
		
         $em = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;get(&apos;doctrine.orm.default_entity_manager&apos;);
         $em-&amp;gt;persist($product);
         $em-&amp;gt;flush();

         &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;render(&apos;HelloBundle:Hello:index.html.twig&apos;, array(&apos;name&apos; =&amp;gt; $name));

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

&lt;p&gt;Go to the &lt;a href=&quot;http://localhost/web/app_dev.php/hello/Product1&quot; class=&quot;external-link&quot;&gt;http://localhost/web/app_dev.php/hello/Product1&lt;/a&gt;&lt;br/&gt;
&amp;#8212;&lt;br/&gt;
When I set &apos;true&apos; for inStock attribute, and then flush object to the DB, it doesn&apos;t create a row. However when I write $product-&amp;gt;setInStock(&apos;1&apos;) - that&apos;s works and the row appears in the DB. And $product-&amp;gt;setInStock(1) that&apos;s doen&apos;t work again. That&apos;s a very strange behaviour, and I couldn&apos;t explain it anyhow.&lt;/p&gt;</comment>
                    <comment id="16585" author="beberlei" created="Sat, 15 Oct 2011 08:25:02 +0000"  >&lt;p&gt;This is pretty old. Do you still use boolean types and does it work? The code suggests you maybe used Doctrine 2.0.x back then, does this work with Doctrine 2.1.x for you?&lt;/p&gt;</comment>
                    <comment id="16780" author="asm89" created="Tue, 8 Nov 2011 22:11:46 +0000"  >&lt;p&gt;Lowered the priority of this issue until we receive more feedback. &lt;/p&gt;</comment>
                    <comment id="17598" author="asm89" created="Thu, 15 Mar 2012 21:46:08 +0000"  >&lt;p&gt;Closing because we were unable to reproduce and no further feedback was provided.&lt;/p&gt;</comment>
                    <comment id="17942" author="wildlyinaccurate" created="Sun, 13 May 2012 17:33:08 +0000"  >&lt;p&gt;Hi guys, I was able to reproduce similar behaviour. Simply adding a boolean column to an entity prevents Doctrine from persisting new entities to the database. I am using a freshly-checked-out 2.2.2 with the Laravel PHP framework. Boolean columns have worked for me previously and I wondered whether Laravel&apos;s autoloaders were interfering with Doctrine somehow (just a stab in the dark).&lt;/p&gt;

&lt;p&gt;Here is my Test 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

namespace Entity;

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

        /**
         * @Id
         * @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;)
         * @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;

        /**
         * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, length=40, 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; $string_col;

        &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getId()
        {
                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;id;
        }

        &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setStringCol($string_col)
        {
                $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;string_col = $string_col;
        }

        &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getStringCol()
        {
                &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;string_col;
        }

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

&lt;p&gt;Persisting a new Test entity like this works fine.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$test = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Entity\Test;
$test-&amp;gt;setStringCol(&apos;&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; value&apos;);
$em-&amp;gt;persist($test);
$em-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However, if I add a boolean column to the entity, the persist/flush operations seem to fail silently and the record is not inserted. The boolean column 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;/**
 * @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;, 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; $bool_col = &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="17943" author="wildlyinaccurate" created="Sun, 13 May 2012 17:35:01 +0000"  >&lt;p&gt;Sorry, forgot to say that explicitly setting the value of bool_col doesn&apos;t make a difference. I have also tried setting the value to (int) 1 or 0, with the same results.&lt;/p&gt;</comment>
                    <comment id="18026" author="tobre" created="Tue, 29 May 2012 11:40:01 +0000"  >&lt;p&gt;My development environment is Ubuntu Linux, these boolean types is working well. After new developer put project up on his Windows 7 WAMP machine exactly the same problem happened.&lt;br/&gt;
Firstly thought that MySQL is acting differently, but no, we connected MySQL to Linux server, still same problem. The solution was to replace boolean types to integers.&lt;/p&gt;

&lt;p&gt;So perhaps you couldn&apos;t reproduce it because you tested it in Linux. You should run the same test on the Windows machine.&lt;/p&gt;</comment>
                    <comment id="19159" author="piotrjura" created="Thu, 20 Dec 2012 11:26:01 +0000"  >&lt;p&gt;Run into same problem here with Doctrine 2.3.x and MySQL 5.5.16 running on Windows 7 with Symfony2. Using query builder:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unable to find source-code formatter for language: php.&lt;/span&gt; Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml&lt;/div&gt;&lt;pre&gt;
-&amp;gt;where($qb-&amp;gt;expr()-&amp;gt;eq(&apos;c.&lt;span class=&quot;code-keyword&quot;&gt;private&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;I have to use literal &apos;false&apos; or 0.&lt;/p&gt;</comment>
                    <comment id="19943" author="cordoval" created="Fri, 5 Apr 2013 05:55:27 +0000"  >&lt;p&gt;@beberlei @ocramius this should be reopened it is a present bug on 2.3+, i had the same problem rolled back and it works again.&lt;/p&gt;</comment>
                    <comment id="19944" author="ocramius" created="Fri, 5 Apr 2013 07:52:48 +0000"  >&lt;p&gt;Won&apos;t reopen without failing test case&lt;/p&gt;</comment>
                    <comment id="19971" author="cordoval" created="Wed, 10 Apr 2013 03:36:38 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/647&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/647&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19984" author="ocramius" created="Fri, 12 Apr 2013 01:10:32 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=cordoval&quot; class=&quot;user-hover&quot; rel=&quot;cordoval&quot;&gt;Luis Cordova&lt;/a&gt; your test is not related with this issue :\&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                <outwardlinks description="relates to">
                            <issuelink>
            <issuekey id="13045">DDC-1394</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2398] Add a &quot;use namespace&quot; like feature to DQL to have short/reusable entity classname</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2398</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I find not always portable-friendly the use of full class path in DQL.&lt;/p&gt;

&lt;p&gt;$query = $em-&amp;gt;createQuery(&apos;SELECT u FROM \MyProject\Model\User u WHERE u.age &amp;gt; 20&apos;);&lt;/p&gt;

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

&lt;p&gt;$query = $em-&amp;gt;createQuery(&apos;USE \MyProject\Model SELECT u FROM User u WHERE u.age &amp;gt; 20&apos;);&lt;/p&gt;

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

&lt;p&gt;$query = $em-&amp;gt;use(&apos;\MyProject\Model&apos;)-&amp;gt;createQuery(&apos;SELECT u FROM User u WHERE u.age &amp;gt; 20&apos;);&lt;/p&gt;

&lt;p&gt;And with a default namespace attached to the entity manager :&lt;/p&gt;

&lt;p&gt;$query = $em-&amp;gt;use()-&amp;gt;createQuery(&apos;SELECT u FROM User u WHERE u.age &amp;gt; 20&apos;);&lt;/p&gt;

</description>
                <environment></environment>
            <key id="14775">DDC-2398</key>
            <summary>Add a &quot;use namespace&quot; like feature to DQL to have short/reusable entity classname</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="6">Invalid</resolution>
                                <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="quazardous">David Berlioz</reporter>
                        <labels>
                        <label>Namespace</label>
                        <label>portability</label>
                    </labels>
                <created>Thu, 11 Apr 2013 09:26:02 +0000</created>
                <updated>Thu, 11 Apr 2013 10:06:13 +0000</updated>
                    <resolved>Thu, 11 Apr 2013 10:06:13 +0000</resolved>
                                                            <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19974" author="ocramius" created="Thu, 11 Apr 2013 09:27:48 +0000"  >&lt;p&gt;In strings, you always use the fully qualified class name, or an entity alias&lt;/p&gt;</comment>
                    <comment id="19975" author="quazardous" created="Thu, 11 Apr 2013 09:34:55 +0000"  >&lt;p&gt;yes &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/tongue.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; and so it&apos;s not symmetrical with PHP coding...&lt;br/&gt;
it&apos;s unesthetic and when you do code refactoring it&apos;s harder than just managing your use &quot;namespace&quot;;&lt;br/&gt;
but i&apos;ve put priority to minor ;p&lt;/p&gt;</comment>
                    <comment id="19976" author="ocramius" created="Thu, 11 Apr 2013 10:06:01 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=quazardous&quot; class=&quot;user-hover&quot; rel=&quot;quazardous&quot;&gt;David Berlioz&lt;/a&gt; I&apos;m closing this. Strings are values passed around in your system, and having their meaning depend on context is absolutely a no-go&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1958] pager produces wrong results on postgresql</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1958</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The query build by pager to get the subset of PKs to fetch produces wrong results on potgresql (and probably any database), that conforms to the SQL standard. The standard says, that if you wish to have the results in specific order, then you have to specify that by using an ORDER BY clause. If such a clause is not present the database can return the results in whatever order it sees fit.&lt;/p&gt;

&lt;p&gt;Testcase fixtures:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
CREATE TABLE test (
    id integer,
    name text
);

INSERT INTO test VALUES (1, &apos;c&apos;);
INSERT INTO test VALUES (2, &apos;a&apos;);
INSERT INTO test VALUES (3, &apos;e&apos;);
INSERT INTO test VALUES (4, &apos;b&apos;);
INSERT INTO test VALUES (5, &apos;d&apos;);
INSERT INTO test VALUES (6, &apos;a&apos;);
INSERT INTO test VALUES (7, &apos;g&apos;);
INSERT INTO test VALUES (8, &apos;h&apos;);
INSERT INTO test VALUES (9, &apos;e&apos;);
INSERT INTO test VALUES (10, &apos;j&apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Passing f.e.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$qb = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;repository
    -&amp;gt;createQueryBuilder(&apos;t&apos;)
    -&amp;gt;select(&apos;t&apos;)
    -&amp;gt;setFirstResult(0)
    -&amp;gt;setMaxResults(5)
    -&amp;gt;addOrderBy(&apos;t.name&apos;, &apos;ASC&apos;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;to pager produces SQL like this modified for readability&lt;/p&gt;

&lt;div class=&quot;code panel&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 DISTINCT id FROM (
    SELECT id, name FROM test ORDER BY name
  ) dctrn_result
  LIMIT 5 OFFSET 0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now there is nothing wrong with this modified query per se, but there is no ORDER BY clause in the outer query so according to the standard the DB can choose whatever order it seems fit. Now mysql chooses the same order, but postgresql does not and it&apos;s probably not the only DB doing so.&lt;/p&gt;

&lt;p&gt;If you are interested in the results, this is the output I&apos;m seeing:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;postgresql: 8,4,1,5,3&lt;/li&gt;
	&lt;li&gt;mysql     : 2,6,4,1,5&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I and my coworker came to the standard compliant solution it was also tested on the dataset above on both postgresql and mysql and it produced equal results. We have found only one corner case this won&apos;t work and IMHO that can&apos;t be fixed. The problem is when you do a sort on a field from a table that is in 1:n relation to the main table.. e.g  tables posts and tags, where one post can have a multiple tags and you want your results sorted by a tag.&lt;/p&gt;

&lt;p&gt;Recipe for a correct query is:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;remember the ORDER BY fields from original query and then remove them&lt;/li&gt;
	&lt;li&gt;wrap the original query with a DISTINCT query, but add the fields from ORDER BY to the SELECT part of that query and add the whole ORDER BY to the end of it, also add the PK to the order by clause, and add the LIMIT clause&lt;/li&gt;
	&lt;li&gt;wrap the resulting query into another query and select just the id.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;so if I take the example from above the SQL 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 id FROM (
  SELECT DISTINCT id, name FROM (
    SELECT id, name FROM test
  ) dctrn_result_inner
  ORDER BY name, id LIMIT 5 OFFSET 0
) dctrn_result
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>* Postgres 9.1, 9.2&lt;br/&gt;
* PHP 5.4</environment>
            <key id="13897">DDC-1958</key>
            <summary>pager produces wrong results on postgresql</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="mvrhov">Miha Vrhovnik</reporter>
                        <labels>
                        <label>paginator</label>
                    </labels>
                <created>Mon, 30 Jul 2012 14:11:37 +0000</created>
                <updated>Tue, 9 Apr 2013 20:22:45 +0000</updated>
                    <resolved>Mon, 12 Nov 2012 14:05:03 +0000</resolved>
                            <version>2.3</version>
                                <fixVersion>2.3.1</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="18958" author="sylfel" created="Thu, 8 Nov 2012 10:20:52 +0000"  >&lt;p&gt;I reproduce same problem with Postgres 7.4, Doctrine 2.3 whereas with doctrine 2.2, all is fine&lt;br/&gt;
Hope there&apos;ll a fix in next doctrine version&lt;/p&gt;</comment>
                    <comment id="19969" author="rkolbe" created="Tue, 9 Apr 2013 20:22:45 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1800&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1800&lt;/a&gt; This relates.&lt;/p&gt;

&lt;p&gt;I just published a PR for an Oracle fix, but your solution appears to work for Oracle as well (issue is the same).&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1800] Paginator results is wrong if your query use order by clause</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1800</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;NOTE: I didn&apos;t try this on other database, I&apos;m using Oracle.&lt;/p&gt;

&lt;p&gt;if my original fetchJoin query use an order by clause, the results is not keeping the provided order by clause and re-order them by id.&lt;/p&gt;

&lt;p&gt;here is my generated query to get the distinct records that get generated:&lt;/p&gt;

&lt;p&gt;SELECT distinct ID0&lt;br/&gt;
FROM &lt;br/&gt;
(&lt;br/&gt;
  SELECT f0_.id AS ID0, f0_.deal_type_id AS DEAL_TYPE_ID1, f0_.title AS TITLE2, f0_.deal_date AS DEAL_DATE3, f0_.amount AS AMOUNT4, &lt;br/&gt;
    f0_.abstract AS ABSTRACT5, f0_.created_date AS CREATED_DATE6, f0_.last_updated_date AS LAST_UPDATED_DATE7, &lt;br/&gt;
    f0_.object_status_id AS OBJECT_STATUS_ID8, f0_.published_date AS PUBLISHED_DATE9, f0_.publishing_status_id AS PUBLISHING_STATUS_ID10, &lt;br/&gt;
    f1_.id AS ID11, f1_.role_id AS ROLE_ID12, f1_.role_type_id AS ROLE_TYPE_ID13, f2_.id AS ID14, f3_.id AS ID15, f4_.id AS ID16, f5_.id AS ID17, &lt;br/&gt;
    c6_.id AS ID18, d7_.id AS ID19 &lt;br/&gt;
  FROM fo_deal f0_ &lt;br/&gt;
  INNER JOIN fo_deal_role f1_ ON f0_.id = f1_.deal_id &lt;br/&gt;
  INNER JOIN fo_people f2_ ON f1_.people_id = f2_.id &lt;br/&gt;
  INNER JOIN fo_property_deal f3_ ON f0_.id = f3_.deal_id &lt;br/&gt;
  INNER JOIN fo_property f4_ ON f3_.property_id = f4_.id &lt;br/&gt;
  LEFT JOIN fo_property_asset f5_ ON f4_.id = f5_.property_id &lt;br/&gt;
  LEFT JOIN co_asset c6_ ON f5_.asset_id = c6_.id &lt;br/&gt;
  LEFT JOIN ds_record d7_ ON c6_.ds_id = d7_.id &lt;br/&gt;
  WHERE f1_.people_id = 2 &lt;br/&gt;
  AND f0_.object_status_id &amp;lt;&amp;gt; 3 &lt;br/&gt;
  AND f0_.publishing_status_id = 2 &lt;br/&gt;
  ORDER BY f0_.deal_date DESC, f0_.published_date DESC&lt;br/&gt;
)&lt;/p&gt;

&lt;p&gt;running this query I get the id 30, 44 when the inner query return 44, 30&lt;/p&gt;

&lt;p&gt;here is the query that should get generated to take care of the order by clause:&lt;br/&gt;
SELECT distinct ID0, rownum+&lt;br/&gt;
FROM &lt;br/&gt;
(&lt;br/&gt;
  SELECT f0_.id AS ID0, f0_.deal_type_id AS DEAL_TYPE_ID1, f0_.title AS TITLE2, f0_.deal_date AS DEAL_DATE3, f0_.amount AS AMOUNT4, &lt;br/&gt;
    f0_.abstract AS ABSTRACT5, f0_.created_date AS CREATED_DATE6, f0_.last_updated_date AS LAST_UPDATED_DATE7, &lt;br/&gt;
    f0_.object_status_id AS OBJECT_STATUS_ID8, f0_.published_date AS PUBLISHED_DATE9, f0_.publishing_status_id AS PUBLISHING_STATUS_ID10, &lt;br/&gt;
    f1_.id AS ID11, f1_.role_id AS ROLE_ID12, f1_.role_type_id AS ROLE_TYPE_ID13, f2_.id AS ID14, f3_.id AS ID15, f4_.id AS ID16, f5_.id AS ID17, &lt;br/&gt;
    c6_.id AS ID18, d7_.id AS ID19 &lt;br/&gt;
  FROM fo_deal f0_ &lt;br/&gt;
  INNER JOIN fo_deal_role f1_ ON f0_.id = f1_.deal_id &lt;br/&gt;
  INNER JOIN fo_people f2_ ON f1_.people_id = f2_.id &lt;br/&gt;
  INNER JOIN fo_property_deal f3_ ON f0_.id = f3_.deal_id &lt;br/&gt;
  INNER JOIN fo_property f4_ ON f3_.property_id = f4_.id &lt;br/&gt;
  LEFT JOIN fo_property_asset f5_ ON f4_.id = f5_.property_id &lt;br/&gt;
  LEFT JOIN co_asset c6_ ON f5_.asset_id = c6_.id &lt;br/&gt;
  LEFT JOIN ds_record d7_ ON c6_.ds_id = d7_.id &lt;br/&gt;
  WHERE f1_.people_id = 2 &lt;br/&gt;
  AND f0_.object_status_id &amp;lt;&amp;gt; 3 &lt;br/&gt;
  AND f0_.publishing_status_id = 2 &lt;br/&gt;
  ORDER BY f0_.deal_date DESC, f0_.published_date DESC&lt;br/&gt;
) ORDER BY rownum ASC&lt;/p&gt;

&lt;p&gt;To fix this on the Paginator code:&lt;/p&gt;

&lt;p&gt;file: ORM/Tools/Pagination/LimitSubqueryOutputWalker.php&lt;br/&gt;
method: walkSelectStatement&lt;/p&gt;

&lt;p&gt;change: &lt;br/&gt;
$sql = sprintf(&apos;SELECT b.*, rownum as rn FROM (SELECT DISTINCT %s FROM (%s)) b&apos;, // AS _dctrn_result&apos;,&lt;br/&gt;
            implode(&apos;, &apos;, $sqlIdentifier), $sql);&lt;/p&gt;

&lt;p&gt;for:&lt;br/&gt;
$sql = sprintf(&apos;SELECT b.*, rownum as rn FROM (SELECT DISTINCT %s, numrow FROM (%s) ORDER BY numrow ASC) b&apos;, // AS _dctrn_result&apos;,&lt;br/&gt;
            implode(&apos;, &apos;, $sqlIdentifier), $sql);&lt;/p&gt;</description>
                <environment>linux oracle</environment>
            <key id="13664">DDC-1800</key>
            <summary>Paginator results is wrong if your query use order by clause</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="mdrolet">Marc Drolet</reporter>
                        <labels>
                    </labels>
                <created>Fri, 27 Apr 2012 19:52:20 +0000</created>
                <updated>Tue, 9 Apr 2013 20:03:37 +0000</updated>
                    <resolved>Wed, 29 Aug 2012 13:18:33 +0000</resolved>
                            <version>2.2.2</version>
                                <fixVersion>2.2.4</fixVersion>
                <fixVersion>2.3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="17946" author="mdrolet" created="Mon, 14 May 2012 14:30:41 +0000"  >&lt;p&gt;rownum instead of numrow.  sorry.&lt;/p&gt;

&lt;p&gt;$sql = sprintf(&apos;SELECT b.*, rownum as rn FROM (SELECT DISTINCT %s, rownum FROM (%s) ORDER BY rownum ASC) b&apos;,&lt;br/&gt;
            implode(&apos;, &apos;, $sqlIdentifier), $sql);&lt;/p&gt;</comment>
                    <comment id="18228" author="beberlei" created="Sat, 7 Jul 2012 16:20:28 +0000"  >&lt;p&gt;Doctrine 2.2.2 doesnt have the LimitSubqueryoutputWalker and Doctrine 2.3-dev does not have the line in the code. Can you make a more explicit statement of where the change is necessary?&lt;/p&gt;</comment>
                    <comment id="18254" author="mdrolet" created="Mon, 9 Jul 2012 13:44:59 +0000"  >&lt;p&gt;It&apos;s in the Pagination of version 2.2.2.  ORM/Tools/Pagination/LimitSubqueryOutputWalker.php&lt;/p&gt;</comment>
                    <comment id="18260" author="beberlei" created="Mon, 9 Jul 2012 15:15:11 +0000"  >&lt;p&gt;This is the 2.2 branch, &lt;a href=&quot;https://github.com/doctrine/doctrine2/tree/2.2/lib/Doctrine/ORM/Tools/Pagination&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/tree/2.2/lib/Doctrine/ORM/Tools/Pagination&lt;/a&gt; and &lt;a href=&quot;https://github.com/doctrine/doctrine2/tree/2.2.2/lib/Doctrine/ORM/Tools/Pagination&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/tree/2.2.2/lib/Doctrine/ORM/Tools/Pagination&lt;/a&gt; is the 2.2.2 tag.&lt;/p&gt;

&lt;p&gt;no LimitSubqueryOutputWalker.php in there.&lt;/p&gt;</comment>
                    <comment id="18577" author="beberlei" created="Wed, 29 Aug 2012 13:18:33 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                    <comment id="19966" author="rkolbe" created="Tue, 9 Apr 2013 17:25:07 +0000"  >&lt;p&gt;This issue is popping it&apos;s head up again!&lt;/p&gt;

&lt;p&gt;Benjamin, your tests don&apos;t test for the ordering problem unless those tests are happening somewhere else?&lt;/p&gt;

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

&lt;p&gt;I am performing a query as complex as Marc&apos;s and I experience the same exact issue. I have checked out today&apos;s latest master branch as well as the 2.3 tag with no change.&lt;/p&gt;

&lt;p&gt;Please advise.&lt;/p&gt;</comment>
                    <comment id="19968" author="rkolbe" created="Tue, 9 Apr 2013 20:03:37 +0000"  >&lt;p&gt;I have a PR in &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/645&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/645&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-544] Extract Interface on Doctrine\ORM\Repository</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-544</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;There should be an interface composed of all the methods on the Repository, so that in userland you can do something like:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;interface&lt;/span&gt; IMyRepository &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Doctrine\ORM\IEntityRepository
{

}

class MyRepository &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Doctrine\ORM\EntityRepository &lt;span class=&quot;code-keyword&quot;&gt;implements&lt;/span&gt; IMyRepository
{

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

&lt;p&gt;That way in your code you could type-hint for IMyRepository, or for the EntityRepository Interface even and it would be indefinately easier to mock or replace the implementation.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11274">DDC-544</key>
            <summary>Extract Interface on Doctrine\ORM\Repository</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="2">Won&apos;t Fix</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 27 Apr 2010 05:37:17 +0000</created>
                <updated>Tue, 9 Apr 2013 18:57:24 +0000</updated>
                    <resolved>Fri, 9 Jul 2010 17:37:22 +0000</resolved>
                            <version>2.0-ALPHA4</version>
                                <fixVersion>2.0-BETA3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="12770" author="romanb" created="Wed, 28 Apr 2010 04:10:27 +0000"  >&lt;p&gt;To match our naming conventions that should rather be: interface EntityRepository and the old EntityRepository =&amp;gt; BasicEntityRepository or similar.&lt;/p&gt;</comment>
                    <comment id="12835" author="shurakai" created="Tue, 4 May 2010 10:35:39 +0000"  >&lt;p&gt;Roman, do you mean that we should rename the file (and class) EntityRepository to BasicEntityRepository and create a new EntityRepository that contains an interface EntityRepository?&lt;/p&gt;

&lt;p&gt;If you want me to, I could do this.&lt;/p&gt;

&lt;p&gt;Regards&lt;br/&gt;
Christian&lt;/p&gt;</comment>
                    <comment id="12995" author="romanb" created="Wed, 19 May 2010 06:30:35 +0000"  >&lt;p&gt;@Christian: Yes, thats what I meant. I will schedule this for BETA3 though. I want BETA2 to be a smooth upgrade without any BC issues, if possible.&lt;/p&gt;</comment>
                    <comment id="13284" author="romanb" created="Sun, 13 Jun 2010 03:50:58 +0000"  >&lt;p&gt;I am wondering whether this is really necessary? There are not many methods on EntityRepository and its easy to create your own interface(s) for your repositories that include these few methods. To be consistent with our naming standards there would have to be a bc break which seems unnecessary to me, unless we invent some other name for the interface, i.e. &quot;ObjectRepository&quot;.&lt;/p&gt;</comment>
                    <comment id="13555" author="beberlei" created="Fri, 9 Jul 2010 17:37:22 +0000"  >&lt;p&gt;Wont fix&lt;/p&gt;</comment>
                    <comment id="19958" author="saem" created="Mon, 8 Apr 2013 18:51:48 +0000"  >&lt;p&gt;It&apos;s unfortunate this wasn&apos;t implemented, it&apos;s actually a significant issue for us. I have to say I completely disagree with Roman&apos;s reasoning in his last comment.&lt;/p&gt;

&lt;p&gt;We have a very large database and commensurately many repositories. We&apos;re now at a point that we need to fire our own application level events (as an example, we end up having to compose in services a lot), some of them originating within repositories (doctrine events are insufficient, and we need application specific ones). We&apos;re using Symfony2 for DIC and build repositories not through doctrine but via services. We consider using setter injection to be a significant anti-pattern, an object should be valid/fully-initialized post construction so we&apos;d rather not do that &amp;#8211; if you were wondering. Now for all our repositories that we would like to build in extra functionality we create our own repository class, compose in the doctrine repository and implement the interface by convention (we could write our own, but the mileage sucks). Now where we could have passed in an instance of anything obeying that interface we&apos;re stuck (there goes type hinting). We can avoid some drudgery through traits but it&apos;s still an unfortunate solution.&lt;/p&gt;

&lt;p&gt;If this is at all possible (even if it has a less than ideal name), we&apos;d very much appreciate this, thank you.&lt;/p&gt;

&lt;p&gt;PS. A BC break in beta would have been very easy and now it sucks even more.&lt;/p&gt;</comment>
                    <comment id="19959" author="ocramius" created="Mon, 8 Apr 2013 18:57:52 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=saem&quot; class=&quot;user-hover&quot; rel=&quot;saem&quot;&gt;Saem Ghani&lt;/a&gt; there is such an interface in doctrine common. Check Doctrine\Common\Persistence\ObjectRepository at &lt;a href=&quot;https://github.com/doctrine/common/blob/2.3.2/lib/Doctrine/Common/Persistence/ObjectRepository.php&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/blob/2.3.2/lib/Doctrine/Common/Persistence/ObjectRepository.php&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19960" author="saem" created="Mon, 8 Apr 2013 19:15:57 +0000"  >&lt;p&gt;Marco: I&apos;m afraid that is incomplete. EntityRepository has a number of methods that fall outside of the scope of those prototyped in ObjectRepository and Selectable interfaces that it implements.&lt;/p&gt;</comment>
                    <comment id="19961" author="beberlei" created="Mon, 8 Apr 2013 19:43:25 +0000"  >&lt;p&gt;Why don&apos;t you ship your own layer of repositories and disregard the Doctrine ones completly? I do that all the time, and then constructor injection is very simple as well.&lt;/p&gt;</comment>
                    <comment id="19962" author="saem" created="Mon, 8 Apr 2013 20:08:29 +0000"  >&lt;p&gt;Because the repositories provide features we use. Reusing/staying close to Symfony/Doctrine makes it easier to learn/train, and gives us herd immunity benefits around shared knowledge and most importantly testing. We&apos;re trying to reduce maintenance burden, this interface would not only help us do that but anyone else in a similar situation. Additionally, we have many projects most of them large, going across them we&apos;ve got something like 400+ tables.&lt;/p&gt;</comment>
                    <comment id="19964" author="ocramius" created="Mon, 8 Apr 2013 21:22:28 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=saem&quot; class=&quot;user-hover&quot; rel=&quot;saem&quot;&gt;Saem Ghani&lt;/a&gt; your last comment does not really provide any rationale behind extraction of the remaining methods into an interface. There&apos;s no advantage in extracting those methods to an own interface. createQueryBuilder, createResultSetMappingBuilder, createNamedQuery, createNativeNamedQuery, clear, __call, getEntityManager, getClassMetadata are all utility methods that are not good candidates for an interface. You can easily re-implement those on an existing entity manager.&lt;/p&gt;

&lt;p&gt;Just use the Doctrine\Common\Persistence\ObjectRepository API: you should actually stick to that to increase portability across the various object managers in doctrine project.&lt;/p&gt;

&lt;p&gt;If you need all those methods too, you are looking for inheritance, not composition (and probably are delegating too much responsibility to the repository).&lt;/p&gt;</comment>
                    <comment id="19967" author="saem" created="Tue, 9 Apr 2013 18:57:24 +0000"  >&lt;p&gt;Marco, rather than looking at each comment in isolation (which is what seems to be happening), please take things in aggregate. I&apos;ve provided the rationale in previous comments. If you require more information I can clarify further.&lt;/p&gt;

&lt;p&gt;Extracting as an interface would:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Make it easier to make mocks during testing (right now a mock EntityManager and ClassMetadata instance must also be mocked out), this is significant friction/noise during testing&lt;/li&gt;
	&lt;li&gt;Allow people to compose as opposed to inherit, especially important when you have features that are specific to relational stores&lt;/li&gt;
	&lt;li&gt;We have Entities that are represented by data in the database AND on the file system. All of a sudden inheriting from a doctrine EntityRepository makes just as much sense as inheriting from a FileSystemRepository (of our own making). All the while the responsibility is the same, load/store of Entities, the finders/query methods still make sense.&lt;/li&gt;
	&lt;li&gt;At the same time the finder API is very useful (duplicating the code would suck, as was suggested earlier), but having to manually maintain that contract with each doctrine release is an unnecessary burden, not just for us, but anyone else in our predicament&lt;/li&gt;
	&lt;li&gt;Creating our own interface means we can&apos;t abstract over 3rd party repositories provided by other bundles.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

&lt;p&gt;In Doctrine\ORM\Tools\SchemaTool&lt;br/&gt;
...&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; function _gatherRelationsSql($class, $table, $schema)
    {
        foreach ($class-&amp;gt;associationMappings as $fieldName =&amp;gt; $mapping) {

           &lt;span class=&quot;code-comment&quot;&gt;// &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($mapping[&apos;inherited&apos;])) { // - old version
&lt;/span&gt;
	/**
             * SSW
             * It&apos;s the solution
             */
	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($mapping[&apos;inherited&apos;]) &amp;amp;&amp;amp; !$class-&amp;gt;isInheritanceTypeNone() &amp;amp;&amp;amp; !$class-&amp;gt;isInheritanceTypeTablePerClass() ) {
                &lt;span class=&quot;code-keyword&quot;&gt;continue&lt;/span&gt;;
            }            

            $foreignClass = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getClassMetadata($mapping[&apos;targetEntity&apos;]);
...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

&lt;p&gt;I had found a solution again.&lt;br/&gt;
In Doctrine\ORM\Query\SqlWalker&lt;br/&gt;
...&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function walkSelectExpression($selectExpression)
...

                &lt;span class=&quot;code-comment&quot;&gt;// original =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($mapping[&apos;inherited&apos;])){
&lt;/span&gt;                &lt;span class=&quot;code-comment&quot;&gt;// It&apos;s the solution
&lt;/span&gt;                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($mapping[&apos;inherited&apos;]) &amp;amp;&amp;amp; !$class-&amp;gt;isInheritanceTypeNone() &amp;amp;&amp;amp; !$class-&amp;gt;isInheritanceTypeTablePerClass()) {
                    $tableName = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getClassMetadata($mapping[&apos;inherited&apos;])-&amp;gt;table[&apos;name&apos;];
                } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
                    $tableName = $class-&amp;gt;table[&apos;name&apos;];
                }
...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

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

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

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

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

&lt;p&gt;EDIT:&lt;br/&gt;
Maybe an example how I have done it with YAML would be helpful for others:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
User:
  type: entity
  fields:
    id:
      id: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      type: integer
      generator:
        strategy: IDENTITY
    email:
      type: string
      length: 150
      unique: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
    active:
      type: &lt;span class=&quot;code-object&quot;&gt;boolean&lt;/span&gt;
  indexes:
    indexActiveField: { name: idx_user_active, columns: [ active ] }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

<item>
            <title>[DDC-2393] Doctrine ORM put null to relation field when write persisting</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2393</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;There is my bundle, for more details:&lt;br/&gt;
&lt;a href=&quot;https://github.com/hell0w0rd/bad-doctrine-entities&quot; class=&quot;external-link&quot;&gt;https://github.com/hell0w0rd/bad-doctrine-entities&lt;/a&gt;&lt;/p&gt;</description>
                <environment>symfony2.2</environment>
            <key id="14766">DDC-2393</key>
            <summary>Doctrine ORM put null to relation field when write persisting</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="4">Incomplete</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="hell0w0rd">Nikita</reporter>
                        <labels>
                    </labels>
                <created>Sun, 7 Apr 2013 12:03:19 +0000</created>
                <updated>Sun, 7 Apr 2013 12:31:33 +0000</updated>
                    <resolved>Sun, 7 Apr 2013 12:31:31 +0000</resolved>
                            <version>2.3.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19952" author="ocramius" created="Sun, 7 Apr 2013 12:05:39 +0000"  >&lt;p&gt;Can you please make an example of what the failure you&apos;re experiencing looks like? What is being done? What is the expected result? What is the experienced behaviour?&lt;/p&gt;</comment>
                    <comment id="19953" author="hell0w0rd" created="Sun, 7 Apr 2013 12:11:33 +0000"  >&lt;p&gt;When controller persist object, I&apos;m expecting orm put not null into relation field in fact it is not so.&lt;/p&gt;</comment>
                    <comment id="19954" author="ocramius" created="Sun, 7 Apr 2013 12:15:38 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=hell0w0rd&quot; class=&quot;user-hover&quot; rel=&quot;hell0w0rd&quot;&gt;Nikita&lt;/a&gt; the example at &lt;a href=&quot;https://github.com/hell0w0rd/bad-doctrine-entities/blob/master/DeskBundle/Controller/PostController.php#L15-L21&quot; class=&quot;external-link&quot;&gt;https://github.com/hell0w0rd/bad-doctrine-entities/blob/master/DeskBundle/Controller/PostController.php#L15-L21&lt;/a&gt; is not enough to open an issue. Can you please build a simple script that does not involve third party components and that reproduces your problem? It should work only with the ORM.&lt;/p&gt;</comment>
                    <comment id="19955" author="hell0w0rd" created="Sun, 7 Apr 2013 12:25:09 +0000"  >&lt;p&gt;My issue is closely connected with third party components, because they decouple from each other - is not to decide&lt;/p&gt;</comment>
                    <comment id="19956" author="ocramius" created="Sun, 7 Apr 2013 12:30:44 +0000"  >&lt;p&gt;Then it&apos;s impossible for us to decide what the cause is. I&apos;m closing this one - consider reproducing the problem locally and then deciding whether this is an ORM or a symfony form problem.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2353] [GH-616] [DDC-2252] Fix delete many-to-many composite key</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2353</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/616&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/616&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-2252&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2252&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14697">DDC-2353</key>
            <summary>[GH-616] [DDC-2252] Fix delete many-to-many composite key</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 16 Mar 2013 04:24:39 +0000</created>
                <updated>Sat, 6 Apr 2013 17:58:10 +0000</updated>
                    <resolved>Sat, 6 Apr 2013 17:58:09 +0000</resolved>
                                            <fixVersion>2.3.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2358] [GH-621] [doc] adding some more doc and examples for lifecycle event listeners and subscribers</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2358</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 dbu:&lt;/p&gt;

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

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

&lt;p&gt;as requested in &lt;a href=&quot;https://github.com/symfony/symfony-docs/pull/2301&quot; class=&quot;external-link&quot;&gt;https://github.com/symfony/symfony-docs/pull/2301&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14705">DDC-2358</key>
            <summary>[GH-621] [doc] adding some more doc and examples for lifecycle event listeners and subscribers</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="dbu">David Buchmann</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 19 Mar 2013 23:46:58 +0000</created>
                <updated>Sat, 6 Apr 2013 15:05:08 +0000</updated>
                    <resolved>Sat, 6 Apr 2013 15:05:08 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2349] [GH-613] Added ability to eagerly load referenced entities with subclasses</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2349</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 stefankleff:&lt;/p&gt;

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

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

&lt;p&gt;This is a rather ugly implementation. But maybe someone knows how to do it in a better way &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/wink.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14691">DDC-2349</key>
            <summary>[GH-613] Added ability to eagerly load referenced entities with subclasses</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 13 Mar 2013 12:45:41 +0000</created>
                <updated>Sat, 6 Apr 2013 15:00:49 +0000</updated>
                    <resolved>Sat, 6 Apr 2013 15:00:49 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19849" author="beberlei" created="Wed, 13 Mar 2013 12:45:57 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-613&amp;#93;&lt;/span&gt; was opened&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/613&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/613&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19948" author="beberlei" created="Sat, 6 Apr 2013 15:00:43 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-613&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/613&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/613&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2188] DQL arithmetic priority is not considered in expression &apos;a/(b*c)&apos;</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2188</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;A DQL query that contains an arithmetic expression like &apos;a/(b*c)&apos; will be compiled to &apos;a/b*c&apos; in SQL and therefore the result of &apos;100/(2*2)&apos; will be 100, instead of 25.&lt;/p&gt;

&lt;p&gt;Note: I have tested it by mysql only&lt;/p&gt;</description>
                <environment></environment>
            <key id="14295">DDC-2188</key>
            <summary>DQL arithmetic priority is not considered in expression &apos;a/(b*c)&apos;</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="mdehghani">Mahdi Dehghani</reporter>
                        <labels>
                        <label>Cli</label>
                        <label>mysql</label>
                    </labels>
                <created>Wed, 5 Dec 2012 22:48:22 +0000</created>
                <updated>Sat, 6 Apr 2013 14:57:57 +0000</updated>
                    <resolved>Sat, 6 Apr 2013 14:57:57 +0000</resolved>
                            <version>2.3</version>
                                <fixVersion>2.4</fixVersion>
                                <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19866" author="ocramius" created="Sat, 16 Mar 2013 19:06:16 +0000"  >&lt;p&gt;Being handled in &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2355&quot; title=&quot;[GH-618] [DDC-2188] Fix arithmetic priority&quot;&gt;&lt;del&gt;DDC-2355&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2355] [GH-618] [DDC-2188] Fix arithmetic priority</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2355</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/618&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/618&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 patch fix &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2188&quot; title=&quot;DQL arithmetic priority is not considered in expression &amp;#39;a/(b*c)&amp;#39;&quot;&gt;&lt;del&gt;DDC-2188&lt;/del&gt;&lt;/a&gt;(&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2188&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2188&lt;/a&gt;),&lt;br/&gt;
Not sure if it could be considered a BC break.&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;</description>
                <environment></environment>
            <key id="14699">DDC-2355</key>
            <summary>[GH-618] [DDC-2188] Fix arithmetic priority</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 16 Mar 2013 17:41:27 +0000</created>
                <updated>Sat, 6 Apr 2013 14:57:44 +0000</updated>
                    <resolved>Sat, 6 Apr 2013 14:57:44 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2392] [GH-644] Fixed typos</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2392</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 pborreli:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="14765">DDC-2392</key>
            <summary>[GH-644] Fixed typos</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 6 Apr 2013 14:16:11 +0000</created>
                <updated>Sat, 6 Apr 2013 14:50:28 +0000</updated>
                    <resolved>Sat, 6 Apr 2013 14:50:28 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

<item>
            <title>[DDC-2224] convertToDatabaseValueSQL() is not honored for DQL query parameters</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2224</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Following discussion on Google Groups:&lt;br/&gt;
&lt;a href=&quot;https://groups.google.com/d/msg/doctrine-dev/-/gG-VGiAGQiMJ&quot; class=&quot;external-link&quot;&gt;https://groups.google.com/d/msg/doctrine-dev/-/gG-VGiAGQiMJ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When using a mapping type which declares &lt;tt&gt;convertToDatabaseValueSQL()&lt;/tt&gt;, this method is not invoked when passing a value as parameter to a DQL query.&lt;/p&gt;

&lt;p&gt;For example, if I declare a mapping type &lt;tt&gt;MyType&lt;/tt&gt;:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
class MyType &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; \Doctrine\DBAL\Types\Type
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function canRequireSQLConversion()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; sprintf(&apos;FUNCTION(%s)&apos;, $sqlExpr);
    }

    &lt;span class=&quot;code-comment&quot;&gt;// ...
&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And pass a parameter with this type to a DQL query:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$query = $em-&amp;gt;createQuery(&apos;SELECT e FROM Entity e WHERE e.field = :field&apos;);
$query-&amp;gt;setParameter(&apos;field&apos;, $value, &apos;MyType&apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I would expect the following SQL to be generated:&lt;/p&gt;

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

&lt;p&gt;But the current SQL generated is the following:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
SELECT ... WHERE ... = ?
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14350">DDC-2224</key>
            <summary>convertToDatabaseValueSQL() is not honored for DQL query parameters</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="benjamin">Benjamin Morel</reporter>
                        <labels>
                    </labels>
                <created>Sat, 5 Jan 2013 14:01:07 +0000</created>
                <updated>Thu, 4 Apr 2013 17:51:22 +0000</updated>
                    <resolved>Thu, 4 Apr 2013 17:51:22 +0000</resolved>
                            <version>Git Master</version>
                <version>2.3.1</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19488" author="mnapoli" created="Fri, 8 Feb 2013 10:00:44 +0000"  >&lt;p&gt;Fix proposal: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/574&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/574&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19489" author="mnapoli" created="Fri, 8 Feb 2013 10:16:49 +0000"  >&lt;p&gt;It turns out convertToDatabaseValue() is not called as well.&lt;/p&gt;

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

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
class MyType &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; \Doctrine\DBAL\Types\Type
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function convertToDatabaseValue($value, AbstractPlatform $platform)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; serialize($value);
    }

    &lt;span class=&quot;code-comment&quot;&gt;// ...
&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The SQL generated should not change, but the parameter should go through &quot;convertToDatabaseValue&quot;, which is not the case.&lt;/p&gt;</comment>
                    <comment id="19490" author="benjamin" created="Fri, 8 Feb 2013 10:25:09 +0000"  >&lt;p&gt;Have you passed the type as the third parameter to setParameter() ?&lt;br/&gt;
Because this works fine for me!&lt;/p&gt;</comment>
                    <comment id="19491" author="mnapoli" created="Fri, 8 Feb 2013 10:29:16 +0000"  >&lt;p&gt;You are right!&lt;/p&gt;

&lt;p&gt;But shouldn&apos;t the Type mapping be taken into account anyway? I makes sense to me at least (a column has a type, when I specify a parameter for this column, it is for this type), but maybe that was just designed that way?&lt;/p&gt;</comment>
                    <comment id="19492" author="benjamin" created="Fri, 8 Feb 2013 10:49:23 +0000"  >&lt;p&gt;That would make sense, but I think that because of the flexibility of DQL, it&apos;s not always obvious what type you want to use.&lt;br/&gt;
Say you have some complex expression 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 entity.field = SomeDQLFunction(:value, entity.otherField)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then we can&apos;t be sure what mapping type to use here (unless we can infer it from &lt;tt&gt;SomeDQLFunction&lt;/tt&gt;, but this is yet another story).&lt;br/&gt;
Though I do agree that would be great to have the type inferred automatically when you do a simple:&lt;/p&gt;

&lt;div class=&quot;code panel&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 entity.field = :value
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Here, there&apos;s no ambiguity, and if &lt;tt&gt;entity.field&lt;/tt&gt; has a custom mapping type, then I can&apos;t see a reason why it shouldn&apos;t be applied to the parameter by default.&lt;/p&gt;</comment>
                    <comment id="19493" author="mnapoli" created="Fri, 8 Feb 2013 11:27:10 +0000"  >&lt;p&gt;I made a failing test case, I&apos;ll see if I can work on that.&lt;/p&gt;

&lt;p&gt;I will open a separate ticket for this.&lt;/p&gt;

&lt;p&gt;Edit: &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2290&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2290&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                <outwardlinks description="duplicates">
                            <issuelink>
            <issuekey id="14380">DDC-2240</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                    <attachment id="11369" name="DDC2224Test.php" size="1539" author="benjamin" created="Fri, 11 Jan 2013 16:24:51 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2389] [GH-642] replaced direct class in instance creation</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2389</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 dmishh:&lt;/p&gt;

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

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

&lt;p&gt;return new EntityManager() -&amp;gt; return new static() on line 945&lt;br/&gt;
made code more reusable&lt;/p&gt;</description>
                <environment></environment>
            <key id="14758">DDC-2389</key>
            <summary>[GH-642] replaced direct class in instance creation</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 4 Apr 2013 14:46:01 +0000</created>
                <updated>Thu, 4 Apr 2013 14:47:37 +0000</updated>
                    <resolved>Thu, 4 Apr 2013 14:47:37 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19936" author="beberlei" created="Thu, 4 Apr 2013 14:47:12 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-642&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/642&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/642&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19937" author="ocramius" created="Thu, 4 Apr 2013 14:47:37 +0000"  >&lt;p&gt;EntityManager should not be extended&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2386] [GH-641] Added yml example in ordered-associations.rst</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2386</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 bksunday:&lt;/p&gt;

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

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

&lt;p&gt;Added missing yaml example of ordered-associations, and put php, xml and yml codes into a configuration-block instead of separate code-blocks&lt;/p&gt;</description>
                <environment></environment>
            <key id="14754">DDC-2386</key>
            <summary>[GH-641] Added yml example in ordered-associations.rst</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 3 Apr 2013 16:33:26 +0000</created>
                <updated>Wed, 3 Apr 2013 16:37:26 +0000</updated>
                    <resolved>Wed, 3 Apr 2013 16:37:26 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19933" author="beberlei" created="Wed, 3 Apr 2013 16:36:26 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-641&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/641&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/641&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19934" author="ocramius" created="Wed, 3 Apr 2013 16:36:44 +0000"  >&lt;p&gt;merged&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

&lt;p&gt;into Doctrine/DBAL/Statement.php, I&apos;ve add this method:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
     * Binds a parameter value to the statement.
     * This is implemented &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; way &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; oracle only. Other drivers are redirected to bindValue method.
     *
     * The value will be bound with to the type provided (that required to be a table type).
     *
     * @param &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; $name The name or position of the parameter.
     * @param Array $value The value of the parameter.
     * @param &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; $type The name of the type to use to bind.
     * @&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;boolean&lt;/span&gt; TRUE on success, FALSE on failure.
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function bindList($name, Array $value, $type)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (&apos;oracle&apos; !== $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;platform-&amp;gt;getName())
        {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;bindValue($name, $value, $type);
        }
        &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
        {
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;stmt-&amp;gt;bindList($name, $value, $type);
        }
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;into Doctrine/DBAL/Driver/Statement.php I&apos;ve add:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
     * @TODO: docs
     */
    function bindList($param, Array $values, $type);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;into Doctrine/DBAL/Driver/OCI8/OCI8Statement.php I&apos;ve add this method:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
     * {@inheritdoc}
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function bindList($param, Array $value, $type)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!($list = oci_new_collection($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_dbh, $type)))
        {
            &lt;span class=&quot;code-comment&quot;&gt;//&lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; OCI8Exception::fromErrorInfo($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;errorInfo());
&lt;/span&gt;        }

        foreach ($value as $entry)
        {
            $list-&amp;gt;append($entry);
        }
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!oci_bind_by_name($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_sth, $param, $list, -1, OCI_B_NTY))
        {
            &lt;span class=&quot;code-comment&quot;&gt;//&lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; OCI8Exception::fromErrorInfo($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;errorInfo());
&lt;/span&gt;        }
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;// NOTE: we should probably add the bindList to all driver Statement object. &lt;/p&gt;

&lt;p&gt;into your code you can use it this way:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$sql = &quot;
    SELECT *
    FROM test
    WHERE id IN
    (
        SELECT *
        FROM
        (
            CAST (: p_ids AS list_int_type)
        )
    )
&quot;;
$stmt = connection-&amp;gt;prepare($sql);
$stmt-&amp;gt;bindList(&apos;: p_ids&apos;, $ids, &apos;list_int_type&apos;);
$stmt-&amp;gt;execute();
$rs = $stmt-&amp;gt;fetchAll(PDO::FETCH_ASSOC);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-2332] [UnitOfWork::doPersist()] The spl_objact_hash() generate not unique hash!</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="fchris82">Kriszti&#225;n Ferenczi</reporter>
                        <labels>
                    </labels>
                <created>Tue, 5 Mar 2013 11:20:00 +0000</created>
                <updated>Mon, 1 Apr 2013 21:47:37 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="19808" author="ocramius" created="Tue, 5 Mar 2013 11:23:09 +0000"  >&lt;p&gt;Please provide either a code example or a test case. As it stands, this issue is incomplete&lt;/p&gt;</comment>
                    <comment id="19809" author="beberlei" created="Tue, 5 Mar 2013 11:35:10 +0000"  >&lt;p&gt;Are you calling EntityManager#clear() inbetween? Because PHP reuses the hashes. The ORM accounts for this.&lt;/p&gt;</comment>
                    <comment id="19811" author="beberlei" created="Tue, 5 Mar 2013 12:37:54 +0000"  >&lt;p&gt;This is not a reproduce case, i don&apos;t want to execute your whole project. &lt;/p&gt;

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

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

<item>
            <title>[DDC-2380] [GH-638] Fixed typos in docblocks.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2380</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 dustinmoorman:&lt;/p&gt;

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

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

&lt;p&gt;Hello again, I&apos;m committing the mini fixes in docblock documentation - swapping &apos;an SQL&apos; for &apos;a SQL&apos;.&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;</description>
                <environment></environment>
            <key id="14744">DDC-2380</key>
            <summary>[GH-638] Fixed typos in docblocks.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 30 Mar 2013 05:39:56 +0000</created>
                <updated>Mon, 1 Apr 2013 21:40:46 +0000</updated>
                    <resolved>Mon, 1 Apr 2013 21:40:46 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19923" author="beberlei" created="Mon, 1 Apr 2013 21:40:35 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-638&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/638&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/638&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1987] Cascading &quot;refresh&quot; does not work on lazy loaded associations</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1987</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;If the cascade option for an association includes the &quot;refresh&quot; keyword, the associated entites are only refreshed, if the collection is not lazy loaded.&lt;/p&gt;

&lt;p&gt;The problem is that first the &quot;parent&quot; entity is reloaded, so the associations PersistentCollection is replaced with a new one that has not been initialized yet. And then in cascadeRefresh, the code explicitly avoids initializing that collection, so there will never be any entities in the wrapped ArrayCollection that the operation may cascade to.&lt;/p&gt;

&lt;p&gt;I can see at least two possible solutions for this problem. One would be to swap the order of the operations, so that the cascading happens first. This would cascade based on the current object model state (pre-refresh), so entities that had been detached would not be refreshed.&lt;/p&gt;

&lt;p&gt;The other would be to remember which collections had already been loaded, and to initialize the corresponding new collections before performing the cascading. That would cascade based on the refreshed state, so in this case, entities that had been newly attached would not be refreshed.&lt;/p&gt;

&lt;p&gt;My current use-case would work with the first one, but I guess there will be some use-cases that would require the second one... :-/&lt;/p&gt;</description>
                <environment></environment>
            <key id="13971">DDC-1987</key>
            <summary>Cascading &quot;refresh&quot; does not work on lazy loaded associations</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="sbeining">Sascha Beining</reporter>
                        <labels>
                    </labels>
                <created>Fri, 17 Aug 2012 14:15:04 +0000</created>
                <updated>Sun, 31 Mar 2013 11:14:31 +0000</updated>
                    <resolved>Sun, 31 Mar 2013 11:14:15 +0000</resolved>
                            <version>2.1.7</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="18573" author="beberlei" created="Wed, 29 Aug 2012 12:57:54 +0000"  >&lt;p&gt;Tricky issue. I share your analysis and ask myself if there is really a use-case for 2. If you ask for a refresh of the current state, that obviously means the current associations. Hence cascading first would be the solution here.&lt;/p&gt;

&lt;p&gt;The problem is that the entities are still in memory and a consecutive access of the &quot;new&quot; collection returns them in their non-refreshed state.&lt;/p&gt;

&lt;p&gt;You could help with solving this issue, can you create a TestCase like the ones in tests/Doctrine/Tests/ORM/Functional/Ticket/* and attach it here? It would be best against master, but ok if you do it against 2.1.7.&lt;/p&gt;
</comment>
                    <comment id="19382" author="ocramius" created="Wed, 23 Jan 2013 22:13:17 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=sbeining&quot; class=&quot;user-hover&quot; rel=&quot;sbeining&quot;&gt;Sascha Beining&lt;/a&gt; 2.1 is not supported anymore. Can you verify if this behaviour is still reproducible in 2.3?&lt;/p&gt;</comment>
                    <comment id="19519" author="asm89" created="Sun, 10 Feb 2013 11:50:21 +0000"  >&lt;p&gt;ping! &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="19907" author="beberlei" created="Sun, 31 Mar 2013 11:14:15 +0000"  >&lt;p&gt;closing in favor of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2143&quot; title=&quot;$em-&amp;gt;refresh($entity) doesn&amp;#39;t refresh associations cleared with clear()&quot;&gt;&lt;del&gt;DDC-2143&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                <outwardlinks description="duplicates">
                            <issuelink>
            <issuekey id="14222">DDC-2143</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2365] [GH-626] default discriminator map - full namespace</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2365</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/626&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/626&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Using Symfony2, if you have two entities with the same name in different bundles, automatic discriminator map detection will trow MappingException.&lt;/p&gt;

&lt;p&gt;If the namespace is included, there should be no more duplicate key issues.&lt;/p&gt;

&lt;p&gt;(In this case, setting the map manually is not an option)&lt;/p&gt;</description>
                <environment></environment>
            <key id="14717">DDC-2365</key>
            <summary>[GH-626] default discriminator map - full namespace</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 22 Mar 2013 20:13:44 +0000</created>
                <updated>Sat, 30 Mar 2013 23:08:27 +0000</updated>
                    <resolved>Sat, 30 Mar 2013 23:08:27 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19905" author="beberlei" created="Sat, 30 Mar 2013 23:08:20 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-626&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/626&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/626&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2376] [GH-635] Function test for addManyToOne database column mapping</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2376</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/635&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/635&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;When the PHPDriver is used to create a ManyToOne relationship with a table which has a primary key other than id the primary key is not associated correctly.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14733">DDC-2376</key>
            <summary>[GH-635] Function test for addManyToOne database column mapping</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 27 Mar 2013 20:33:22 +0000</created>
                <updated>Sat, 30 Mar 2013 21:43:42 +0000</updated>
                    <resolved>Sat, 30 Mar 2013 21:43:39 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19904" author="beberlei" created="Sat, 30 Mar 2013 21:43:05 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-635&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/635&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/635&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1149] Optimize OneToMany and ManyToMany without join</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1149</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
/**
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;users&quot;&lt;/span&gt;)
 */
class User {

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

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

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

}

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

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

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

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

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

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

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

&lt;p&gt;I run&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;git clone git:&lt;span class=&quot;code-comment&quot;&gt;//github.com/doctrine/doctrine2.git
&lt;/span&gt;git clone git:&lt;span class=&quot;code-comment&quot;&gt;//github.com/doctrine/common.git
&lt;/span&gt;git clone git:&lt;span class=&quot;code-comment&quot;&gt;//github.com/doctrine/dbal.git&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

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

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

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

&lt;p&gt;but additional &lt;b&gt;users_count&lt;/b&gt; queries for&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;foreach($users as $user) $user-&amp;gt;languages-&amp;gt;toArray()&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

<item>
            <title>[DDC-2379] [GH-637] Update association-mapping.rst</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2379</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 choomz:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="14742">DDC-2379</key>
            <summary>[GH-637] Update association-mapping.rst</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 29 Mar 2013 15:41:00 +0000</created>
                <updated>Sat, 30 Mar 2013 13:56:28 +0000</updated>
                    <resolved>Sat, 30 Mar 2013 13:56:28 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19903" author="beberlei" created="Sat, 30 Mar 2013 13:48:18 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-637&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/637&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/637&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

<item>
            <title>[DDC-2378] Efficient count using Selectable</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2378</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I&apos;m currently using intensively the Criteria and Selectable interfaces to provide a generic REST library.&lt;/p&gt;

&lt;p&gt;However, I&apos;ve found a problem when I want to paginate data:&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;count&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;return&lt;/span&gt; count($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;selectable-&amp;gt;matching(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Criteria()));
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The problem is that EntityRepository returns an ArrayCollection and, hence, load the whole collection which is inefficient. It would be nice if it could return a PersistentCollection instead with lazy-load and perform an optimized count.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</description>
                <environment></environment>
            <key id="14738">DDC-2378</key>
            <summary>Efficient count using Selectable</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="3">Duplicate</resolution>
                                <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="bakura">Micha&#235;l Gallego</reporter>
                        <labels>
                        <label>criteria</label>
                        <label>selectable</label>
                    </labels>
                <created>Thu, 28 Mar 2013 18:56:33 +0000</created>
                <updated>Thu, 28 Mar 2013 23:56:42 +0000</updated>
                    <resolved>Thu, 28 Mar 2013 23:56:42 +0000</resolved>
                            <version>2.3.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19902" author="stof" created="Thu, 28 Mar 2013 20:12:19 +0000"  >&lt;p&gt;duplicate of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2217&quot; title=&quot;Return a lazy collection from PersistentCollection::match($criteria)&quot;&gt;DDC-2217&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

&lt;p&gt;Let&apos;s keep it as it is (generating at each request) for dev environments: works fine &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

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

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

<item>
            <title>[DDC-2377] [GH-636] Fixed typos in documentation.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2377</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 dustinmoorman:&lt;/p&gt;

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

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

&lt;p&gt;Hello again everyone! I went ahead and fixed the rest of the instances in the documentation that used &apos;an SQL&apos;. I also fixed an instance of &apos;a alias&apos; to be &apos;an alias&apos;, which is proper since alias begins with a vowel. &lt;/p&gt;</description>
                <environment></environment>
            <key id="14735">DDC-2377</key>
            <summary>[GH-636] Fixed typos in documentation.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 28 Mar 2013 03:48:58 +0000</created>
                <updated>Thu, 28 Mar 2013 06:46:14 +0000</updated>
                    <resolved>Thu, 28 Mar 2013 06:46:14 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19900" author="beberlei" created="Thu, 28 Mar 2013 04:26:31 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-636&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/636&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/636&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2375] Join with multiples tables</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2375</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Dear Friends, I&apos;ve a question about Join with multiple tables.&lt;br/&gt;
I&apos;ve 3 tables: Country, State, City, and I need get country_name from City Entity.&lt;br/&gt;
Any suggestion?&lt;/p&gt;

&lt;p&gt;Table City:&lt;br/&gt;
city_id&lt;br/&gt;
state_id&lt;br/&gt;
city_name&lt;/p&gt;

&lt;p&gt;Table State&lt;br/&gt;
state_id&lt;br/&gt;
country_id&lt;br/&gt;
state_name&lt;/p&gt;

&lt;p&gt;Table Country&lt;br/&gt;
country_id&lt;br/&gt;
country_name&lt;/p&gt;


&lt;p&gt;This is my Entity City:&lt;/p&gt;

&lt;div class=&quot;code panel&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 &lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;\Entity;

use Doctrine\ORM\Mapping as ORM,
Doctrine\Common\Collections\ArrayCollection;

/**

    SysCity
    *
    @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;sys_city&quot;&lt;/span&gt;)
    @ORM\Entity(repositoryClass=&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;\Entity\SysCityRepository&quot;&lt;/span&gt;)
    */
    class SysCity
    {
    /*
    Instantiate all methods gets and sets
    */

&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __construct($options = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
{ Configurator::configure($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;, $options); }

/**

    @&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_city&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    @ORM\Id
    @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;private&lt;/span&gt; $idCity;

/**

    @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
    *
    @ORM\Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;city&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, length=255, 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; $city;

/**

    @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; \SysState
    *
    @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;\Entity\SysState&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;state&quot;&lt;/span&gt;)
    @ORM\JoinColumns( { * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id_state&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id_state&quot;&lt;/span&gt;) * }

    )
    */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $idState;

/**

    @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; \SysCountry
    *
    @ORM\ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;\Entity\SysCountry&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;country&quot;&lt;/span&gt;)
    @ORM\JoinTable(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;sys_state&quot;&lt;/span&gt;,
    joinColumns= {@ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id_state&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id_state&quot;&lt;/span&gt;)}

    ,
    inverseJoinColumns= {@ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id_country&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id_country&quot;&lt;/span&gt;)}
    )
    */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $idCountry;

&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getIdCity()
{ &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;idCity; }

&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setIdCity($idCity)
{ $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;idCity = $idCity; &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;; }

&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getCity()
{ &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;city; }

&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setCity($city)
{ $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;city = $city; &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;; }

&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getIdState()
{ &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;idState; }

&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setIdState($idState)
{ $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;idState = $idState; &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;; }

&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getIdCountry()
{ &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;idCountry; }

&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setIdCountry($idCountry)
{ $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;idCountry = $idCountry; &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;; }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Thanks a lot!&lt;/p&gt;</description>
                <environment></environment>
            <key id="14732">DDC-2375</key>
            <summary>Join with multiples tables</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="acrivelari">Adriano Crivelari</reporter>
                        <labels>
                    </labels>
                <created>Wed, 27 Mar 2013 14:25:49 +0000</created>
                <updated>Wed, 27 Mar 2013 14:39:30 +0000</updated>
                    <resolved>Wed, 27 Mar 2013 14:39:30 +0000</resolved>
                                                            <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19899" author="ocramius" created="Wed, 27 Mar 2013 14:39:30 +0000"  >&lt;p&gt;This is an issue tracker, not a support forum. Please ask your questions on the &lt;a href=&quot;http://groups.google.com/group/doctrine-user&quot; class=&quot;external-link&quot;&gt;http://groups.google.com/group/doctrine-user&lt;/a&gt; mailing list or on &lt;a href=&quot;http://stackoverflow.com/&quot; class=&quot;external-link&quot;&gt;http://stackoverflow.com/&lt;/a&gt; or on IRC on &lt;a href=&quot;irc://irc.freenode.net#doctrine&quot; class=&quot;external-link&quot;&gt;irc://irc.freenode.net#doctrine&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2373] [GH-633] [DDC-2042] Added &quot;targetEntity&quot; to AssociationOverride</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2373</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 spezifanta:&lt;/p&gt;

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

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

&lt;p&gt;Hey,&lt;/p&gt;

&lt;p&gt;I needed to override &quot;targetEntity&quot; so I forked Doctrine and applyed it myself. Just after that I found a Ticket &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2042&quot; title=&quot;Metadata association overriding : allow to override &amp;#39;targetEntity&amp;#39;&quot;&gt;DDC-2042&lt;/a&gt; in your Jira so I added a unit test to and would be more than happy to see this commit get merged in to the main master (at some point &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/wink.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;).&lt;/p&gt;

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

&lt;p&gt;I will stick around in the #doctrine-dev on Freenode for any questions. My nick there is &quot;fanta&quot;.&lt;/p&gt;

&lt;p&gt;Keep up the good work.&lt;/p&gt;

&lt;p&gt;/**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@ORM\Entity&lt;/li&gt;
	&lt;li&gt;@ORM\Table(name=&quot;customer&quot;)&lt;/li&gt;
	&lt;li&gt;@ORM\AssociationOverrides(
{
 *      @ORM\AssociationOverride(name=&quot;products&quot;,
 *          targetEntity=&quot;MyNewProduct&quot;
 *      )
 * }
&lt;p&gt;)&lt;br/&gt;
 */&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
                <environment></environment>
            <key id="14729">DDC-2373</key>
            <summary>[GH-633] [DDC-2042] Added &quot;targetEntity&quot; to AssociationOverride</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 26 Mar 2013 22:27:26 +0000</created>
                <updated>Wed, 27 Mar 2013 06:40:39 +0000</updated>
                    <resolved>Wed, 27 Mar 2013 06:40:23 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19898" author="beberlei" created="Wed, 27 Mar 2013 06:39:57 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-633&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/633&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/633&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2371] [GH-631] Fix typo in one of the orderBy examples.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2371</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 aaronmu:&lt;/p&gt;

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

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

&lt;p&gt;Fix typo in one of the orderBy examples.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14727">DDC-2371</key>
            <summary>[GH-631] Fix typo in one of the orderBy examples.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 26 Mar 2013 15:48:13 +0000</created>
                <updated>Wed, 27 Mar 2013 02:19:31 +0000</updated>
                    <resolved>Wed, 27 Mar 2013 02:19:31 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19896" author="beberlei" created="Tue, 26 Mar 2013 16:18:08 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-631&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/631&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/631&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

<item>
            <title>[DDC-2366] [GH-627] update document on Doctrine cache provider</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2366</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 chuanma:&lt;/p&gt;

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

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

&lt;p&gt;A number of methods have been deleted long time ago. But they still show up on the document page.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/caching.html#deleting&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/caching.html#deleting&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/caching.html#counting&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/caching.html#counting&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I checked source code. Most of the methods don&apos;t exist. They are better to be removed from the doc. I tried to use those functions and was surprised that they didn&apos;t exist.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14718">DDC-2366</key>
            <summary>[GH-627] update document on Doctrine cache provider</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 22 Mar 2013 22:50:11 +0000</created>
                <updated>Sun, 24 Mar 2013 20:22:32 +0000</updated>
                    <resolved>Sun, 24 Mar 2013 20:22:31 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19893" author="beberlei" created="Sun, 24 Mar 2013 20:22:26 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-627&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/627&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/627&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2359] ClassMetadataFactory::wakeupReflection() is called twice</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2359</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;ClassMetadataFactory::wakeupReflection() is called in Common\...\AbstractClassMetadataFactory::loadMetadata() at the end of the method. A few lines after that ORM\...\ClassMetadatafactory::doLoadMeadata() is called, where wakeupReflection() was already called. I think this has been overlooked during the refactoring of the factories. I think the call in doLoadMetadata() is redundant..&lt;/p&gt;</description>
                <environment></environment>
            <key id="14707">DDC-2359</key>
            <summary>ClassMetadataFactory::wakeupReflection() is called twice</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="dershao">Stefan Kleff</reporter>
                        <labels>
                    </labels>
                <created>Wed, 20 Mar 2013 14:01:27 +0000</created>
                <updated>Sun, 24 Mar 2013 19:24:09 +0000</updated>
                    <resolved>Sun, 24 Mar 2013 19:24:09 +0000</resolved>
                            <version>Git Master</version>
                <version>2.3.2</version>
                                <fixVersion>2.4</fixVersion>
                                <component>Mapping Drivers</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19891" author="ocramius" created="Sun, 24 Mar 2013 18:51:50 +0000"  >&lt;p&gt;Fix at &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2369&quot; title=&quot;[GH-630] Hotfix for DDC-2359&quot;&gt;&lt;del&gt;DDC-2369&lt;/del&gt;&lt;/a&gt; - &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/630&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/630&lt;/a&gt; &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

&lt;p&gt;`Doctrine\ORM\Mapping\ClassMetadataFactory#wakeupReflection` is called twice as of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2359&quot; title=&quot;ClassMetadataFactory::wakeupReflection() is called twice&quot;&gt;&lt;del&gt;DDC-2359&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14723">DDC-2369</key>
            <summary>[GH-630] Hotfix for DDC-2359</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 24 Mar 2013 18:42:28 +0000</created>
                <updated>Sun, 24 Mar 2013 19:23:57 +0000</updated>
                    <resolved>Sun, 24 Mar 2013 19:23:57 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19890" author="beberlei" created="Sun, 24 Mar 2013 18:42:34 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-630&amp;#93;&lt;/span&gt; was opened&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/630&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/630&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19892" author="beberlei" created="Sun, 24 Mar 2013 19:23:40 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-630&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/630&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/630&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2368] [GH-629] Fixed typos in Doctrine Mapping Types section.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2368</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 dustinmoorman:&lt;/p&gt;

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

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

&lt;p&gt;Hello guys! I am fixing some of the documentation in ``basic-mapping.rst`` that display an incorrect use of &apos;an&apos; where &apos;a&apos; should reside. Specifically in regards to instances of &apos;an SQL&apos;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14720">DDC-2368</key>
            <summary>[GH-629] Fixed typos in Doctrine Mapping Types section.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 24 Mar 2013 08:21:14 +0000</created>
                <updated>Sun, 24 Mar 2013 17:00:55 +0000</updated>
                    <resolved>Sun, 24 Mar 2013 17:00:55 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19889" author="beberlei" created="Sun, 24 Mar 2013 16:28:27 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-629&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/629&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/629&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2367] [GH-628] [Docs] Fix field name in inversedby parameter</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2367</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 franmomu:&lt;/p&gt;

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

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

</description>
                <environment></environment>
            <key id="14719">DDC-2367</key>
            <summary>[GH-628] [Docs] Fix field name in inversedby parameter</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 24 Mar 2013 01:09:12 +0000</created>
                <updated>Sun, 24 Mar 2013 16:57:09 +0000</updated>
                    <resolved>Sun, 24 Mar 2013 16:57:09 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19888" author="beberlei" created="Sun, 24 Mar 2013 16:28:04 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-628&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/628&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/628&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

<item>
            <title>[DDC-1858] LIKE and IS NULL operators not supported in HAVING clause</title>
                <link>http://www.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://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/inprogress.png">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="abhoryo">PETIT Yoann</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Jun 2012 20:04:14 +0000</created>
                <updated>Wed, 20 Mar 2013 16:01:11 +0000</updated>
                                    <version>2.2.2</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>3</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="18053" author="ocramius" created="Fri, 8 Jun 2012 07:00:39 +0000"  >&lt;p&gt;I think this has already been fixed in latest master and 2.1.7. Could you just give it a try and eventually confirm?&lt;/p&gt;</comment>
                    <comment id="18058" author="abhoryo" created="Fri, 8 Jun 2012 07:22:34 +0000"  >&lt;p&gt;Already try with 2.17, 2.20 and 2.2.2. This hasn&apos;t been fixed.&lt;/p&gt;</comment>
                    <comment id="18157" author="bdiang" created="Wed, 4 Jul 2012 08:07:03 +0000"  >&lt;p&gt;I&apos;m also having this issue (2.2.2). Is there any workaround for this?&lt;/p&gt;

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

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

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

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

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

<item>
            <title>[DDC-2357] [GH-620] Chaining for EM</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2357</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 pomaxa:&lt;/p&gt;

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

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

&lt;p&gt;Chaining for EM methods persist()/flush(), to write more elegant code $em-&amp;gt;persist($account)-&amp;gt;flush();&lt;/p&gt;</description>
                <environment></environment>
            <key id="14701">DDC-2357</key>
            <summary>[GH-620] Chaining for EM</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 18 Mar 2013 15:59:35 +0000</created>
                <updated>Mon, 18 Mar 2013 16:18:58 +0000</updated>
                    <resolved>Mon, 18 Mar 2013 16:18:53 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19873" author="beberlei" created="Mon, 18 Mar 2013 16:18:44 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-620&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/620&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/620&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19874" author="ocramius" created="Mon, 18 Mar 2013 16:18:58 +0000"  >&lt;p&gt;Fluid interfaces on the persistence API are discouraged&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2090] MultiTableUpdateExecutor works incorrect with query cache enabled</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2090</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Doctrine\ORM\Query\Exec\MultiTableUpdateExecutor works incorrect with query cache enabled.&lt;br/&gt;
I execute two similar update-queries with different parameters, but the second query is never executed in database.&lt;/p&gt;

&lt;p&gt;There is todo-task in code:&lt;/p&gt;

&lt;p&gt;//FIXME (URGENT): With query cache the parameter is out of date. Move to execute() stage.&lt;/p&gt;

&lt;p&gt;This is important issue. Much time spent in debugging.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14147">DDC-2090</key>
            <summary>MultiTableUpdateExecutor works incorrect with query cache enabled</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="feedbee">Valera Leontyev</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Oct 2012 13:39:45 +0000</created>
                <updated>Sun, 17 Mar 2013 20:50:48 +0000</updated>
                    <resolved>Sun, 17 Mar 2013 20:40:44 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.4</fixVersion>
                <fixVersion>2.3.3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="18852" author="feedbee" created="Fri, 19 Oct 2012 13:40:49 +0000"  >&lt;p&gt;Workaround is to disable query cache per every multitable update query: &lt;a href=&quot;http://stackoverflow.com/questions/12969460/doctrine-query-cache-update&quot; class=&quot;external-link&quot;&gt;http://stackoverflow.com/questions/12969460/doctrine-query-cache-update&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19870" author="fabio.bat.silva" created="Sun, 17 Mar 2013 20:40:44 +0000"  >&lt;p&gt;Fixed : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/60b8bc63a1a4819cf112cfbbc7cca06b5792aba6&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/60b8bc63a1a4819cf112cfbbc7cca06b5792aba6&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19871" author="beberlei" created="Sun, 17 Mar 2013 20:50:48 +0000"  >&lt;p&gt;Merged into 2.3 for release with 2.3.3&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2356] [GH-619] [DDC-2090] Fix MultiTableUpdateExecutor with query cache</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2356</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/619&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/619&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-2090&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2090&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14700">DDC-2356</key>
            <summary>[GH-619] [DDC-2090] Fix MultiTableUpdateExecutor with query cache</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 17 Mar 2013 20:06:27 +0000</created>
                <updated>Sun, 17 Mar 2013 20:39:58 +0000</updated>
                    <resolved>Sun, 17 Mar 2013 20:39:54 +0000</resolved>
                                            <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19868" author="beberlei" created="Sun, 17 Mar 2013 20:35:40 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-619&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/619&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/619&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19869" author="fabio.bat.silva" created="Sun, 17 Mar 2013 20:39:58 +0000"  >&lt;p&gt;Merged : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/60b8bc63a1a4819cf112cfbbc7cca06b5792aba6&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/60b8bc63a1a4819cf112cfbbc7cca06b5792aba6&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2088] [GH-485] Back ported changes of SimpleConditionalExpression</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2088</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 sstok:&lt;/p&gt;

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

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

&lt;p&gt;This following query fails.&lt;/p&gt;

&lt;p&gt;```&lt;br/&gt;
SELECT I FROM Rollerworks\Bundle\RecordFilterBundle\Tests\Fixtures\BaseBundle\Entity\ECommerce\ECommerceInvoice I WHERE ((RECORD_FILTER_FIELD_CONVERSION(&apos;invoice_customer&apos;, I.customer) BETWEEN :invoice_customer_0 AND :invoice_customer_1) AND (RECORD_FILTER_FIELD_CONVERSION(&apos;invoice_customer&apos;, I.customer) NOT BETWEEN :invoice_customer_2 AND :invoice_customer_3))&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;With this message.&lt;br/&gt;
```&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;Syntax Error&amp;#93;&lt;/span&gt; line 0, col 306: Error: Expected =, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, &amp;gt;, &amp;gt;=, !=, got &apos;NOT&apos;&lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;It only happens in version 2.2, 2.3 is working as expected.&lt;/p&gt;

&lt;p&gt;I have traced the fix to one very simple change in SimpleConditionalExpression and only seem to happen when using an custom function NOT and having nested parenthesis.&lt;/p&gt;

&lt;p&gt;As far as I can tell its BC.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14144">DDC-2088</key>
            <summary>[GH-485] Back ported changes of SimpleConditionalExpression</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Oct 2012 09:49:50 +0000</created>
                <updated>Sun, 17 Mar 2013 16:10:31 +0000</updated>
                    <resolved>Sun, 17 Mar 2013 16:10:26 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19867" author="fabio.bat.silva" created="Sun, 17 Mar 2013 16:10:31 +0000"  >&lt;p&gt;Closed.  &lt;br/&gt;
More details, see &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/485&quot; class=&quot;external-link&quot;&gt;485&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-1666] orphanRemoval does not work with oneToOne: Duplicate entry Error</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1666</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;orphanRemoval does not work with oneToOne.&lt;br/&gt;
Im getting &quot;duplicate entry&quot; errors after replacing the oneToOne object.&lt;br/&gt;
Doctrine seems to insert the new data before removing the old one.&lt;br/&gt;
if i remove the unique constraint by hand in the database it works.&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;Mysql Error&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/*
Error:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry &apos;1&apos; &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; key &apos;UNIQ_9D8DDB05579B502F&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;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;Models and YAML Mapping&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/*
Contact:
  type: entity
  table: contact
  fields:
    _id:
      id: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      type: integer
      unsigned: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      nullable: &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
      generator:
        strategy: AUTO
      column: id
  oneToOne:
    _standingData:
      targetEntity: StandingData
      mappedBy: _contact
      cascade: [&lt;span class=&quot;code-quote&quot;&gt;&quot;persist&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;merge&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;remove&quot;&lt;/span&gt;] 
      orphanRemoval: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
*/

class Contact
{
    &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; $_standingData;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function newStandingData(StandingData $sd)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_standingData = $sd;
        $sd-&amp;gt;setContact($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;);
    }
}

/*
StandingData:
  type: entity
  table: standing_data
  fields:
    _id:
      id: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      type: integer
      unsigned: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      nullable: &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
      generator:
        strategy: AUTO
      column: id
  oneToOne:
    _contact:
      targetEntity: Contact
      inversedBy: _standingData
      joinColumns:
        contact_id:
          referencedColumnName: id
          onDelete: cascade
*/

class StandingData
{
    &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; $_contact;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setContact(Contact $c)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_contact = $c;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;Script&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;// Create &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Contact
&lt;/span&gt;$contact = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Contact();
$contact-&amp;gt;newStandingData(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \StandingData());
$em-&amp;gt;persist($contact);
$em-&amp;gt;flush();

&lt;span class=&quot;code-comment&quot;&gt;// Try to change StandingData
&lt;/span&gt;$contact-&amp;gt;newStandingData(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \StandingData());
$em-&amp;gt;flush();


&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13471">DDC-1666</key>
            <summary>orphanRemoval does not work with oneToOne: Duplicate entry Error</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="gutzuwissen">Mario Knippfeld</reporter>
                        <labels>
                    </labels>
                <created>Thu, 23 Feb 2012 09:31:48 +0000</created>
                <updated>Thu, 14 Mar 2013 22:43:25 +0000</updated>
                    <resolved>Thu, 14 Mar 2013 22:43:25 +0000</resolved>
                            <version>2.2</version>
                                <fixVersion>2.3.3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="17586" author="beberlei" created="Wed, 14 Mar 2012 21:47:38 +0000"  >&lt;p&gt;This is a necessary restriction for the internals of Doctrine to always work correctly.&lt;/p&gt;</comment>
                    <comment id="17841" author="acasademont" created="Thu, 12 Apr 2012 18:01:04 +0000"  >&lt;p&gt;+1 on this one. So what&apos;s the point of orphanRemoval in OneToOne if it can never be done? Maybe onetoones should not create a unique index but a normal one.&lt;/p&gt;

&lt;p&gt;If it is really a won&apos;t fix, then the docs should reflect that.&lt;/p&gt;</comment>
                    <comment id="17842" author="acasademont" created="Thu, 12 Apr 20