<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu Jun 20 08:31:44 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+DDC+AND+resolution+%3D+Unresolved+AND+assignee+%3D+beberlei+ORDER+BY+priority+DESC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://www.doctrine-project.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Doctrine Project</title>
        <link>http://www.doctrine-project.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+DDC+AND+resolution+%3D+Unresolved+AND+assignee+%3D+beberlei+ORDER+BY+priority+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="295" total="295"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<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-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="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="fchris82">Kriszti&#225;n Ferenczi</reporter>
                        <labels>
                    </labels>
                <created>Tue, 5 Mar 2013 11:20:00 +0000</created>
                <updated>Thu, 30 May 2013 05:04:37 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="19808" author="ocramius" created="Tue, 5 Mar 2013 11:23:09 +0000"  >&lt;p&gt;Please provide either a code example or a test case. As it stands, this issue is incomplete&lt;/p&gt;</comment>
                    <comment id="19809" author="beberlei" created="Tue, 5 Mar 2013 11:35:10 +0000"  >&lt;p&gt;Are you calling EntityManager#clear() inbetween? Because PHP reuses the hashes. The ORM accounts for this.&lt;/p&gt;</comment>
                    <comment id="19811" author="beberlei" created="Tue, 5 Mar 2013 12:37:54 +0000"  >&lt;p&gt;This is not a reproduce case, i don&apos;t want to execute your whole project. &lt;/p&gt;

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

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

<item>
            <title>[DDC-813] Validate Schema should complain on bi-directional relationships with mapped superclasses</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-813</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;@ManyToOne and @OneToOne on mapped superclasses have to be unidirectional. The Schema Validator should verify this.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11948">DDC-813</key>
            <summary>Validate Schema should complain on bi-directional relationships with mapped superclasses</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 21 Sep 2010 18:13:26 +0000</created>
                <updated>Mon, 29 Oct 2012 09:13:47 +0000</updated>
                                    <version>2.0-BETA4</version>
                                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1285] Select by multiple ids</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1285</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;How do you look at adding findByIds(array $ids) to EntityManager and UnitOfWork? This would allow fetching multiple entities from a database at one request and would be very useful for caching - there would be even some kind of IdentityMap kept in memcached or any other caching engine, that supports multiple id retrieval: i&apos;ve been using such an architecture in multiple projects and it turned out to be very effective. There were two basic methods - findIdsByFilter(array $filter) and findEntitiesByIds(array $ids). The latter one had a caching proxy, replicating entities to a cache storage. If this idea proceeds - I&apos;d be glad to cover it with more details.&lt;/p&gt;

&lt;p&gt;This topic on StackOverflow could also help:&lt;br/&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/276709/design-pattern-for-memcached-data-caching&quot; class=&quot;external-link&quot;&gt;http://stackoverflow.com/questions/276709/design-pattern-for-memcached-data-caching&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="12842">DDC-1285</key>
            <summary>Select by multiple ids</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/inprogress.png">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="serge.smertin">Serge Smertin</reporter>
                        <labels>
                    </labels>
                <created>Fri, 22 Jul 2011 12:30:34 +0000</created>
                <updated>Fri, 11 Jan 2013 01:13:32 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>Mapping Drivers</component>
                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17071" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:21:15 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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




&lt;p&gt;Another problem appears while persisting new Payment. &lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$payment = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Entities\Payment();
...
$order = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;getRepository(&apos;\Entities\Order&apos;)-&amp;gt;find(46320);
$payment-&amp;gt;setOrder($order);
$order-&amp;gt;addPayments($payment);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;persist($payment);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I get this error: Fatal error: Uncaught exception &apos;PDOException&apos; with message &apos;SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;23000&amp;#93;&lt;/span&gt;: Integrity constraint violation: 1048 Column &apos;scode&apos; cannot be null&apos; in /usr/share/php/Doctrine/DBAL/Statement.php:131&lt;/p&gt;

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

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

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

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

<item>
            <title>[DDC-1262] Have proxies copy docblocks aswell</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1262</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Whenever a Proxy is generated it does not copy the docblocks.&lt;/p&gt;

&lt;p&gt;This means when you do something like &quot;$refl = new ReflectionObject($proxy)&quot; you might be in trouble.&lt;/p&gt;

&lt;p&gt;However if we add docblocks then we have to make sure that proxies do not magically appear as entities by throwing an exception in the AnnotationDriver.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12805">DDC-1262</key>
            <summary>Have proxies copy docblocks aswell</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 9 Jul 2011 12:29:21 +0000</created>
                <updated>Sat, 9 Jul 2011 12:29:21 +0000</updated>
                                    <version>2.0.6</version>
                <version>2.1</version>
                <version>Git Master</version>
                                <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

<item>
            <title>[DDC-1259] Atomic creation of Proxy files</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1259</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;From 265e5086ea51ebcafc73f91abc64334d17e2f416 Mon Sep 17 00:00:00 2001
From: Karsten Dambekalns &amp;lt;karsten@typo3.org&amp;gt;
Date: Wed, 25 May 2011 12:11:55 +0200
Subject: [PATCH 4/5] Use temporary file and rename &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; proxy class creation

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

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

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

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

&amp;lt;spaces&amp;gt;&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;;&amp;lt;/spaces&amp;gt;
}&apos;;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; </description>
                <environment></environment>
            <key id="12757">DDC-1235</key>
            <summary>Provide fluent interfaces in stub methods</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="h-andreas">Andreas H&#246;rnicke</reporter>
                        <labels>
                    </labels>
                <created>Tue, 28 Jun 2011 07:58:16 +0000</created>
                <updated>Mon, 29 Oct 2012 09:18:11 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18895" author="stof" created="Mon, 29 Oct 2012 09:18:11 +0000"  >&lt;p&gt;@beberlei this should be closed as it is the case since 2.2&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1229] generate entity interactive dialog: id column</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1229</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;according to Stof, this bug &lt;a href=&quot;https://github.com/sensio/SensioGeneratorBundle/issues/21&quot; class=&quot;external-link&quot;&gt;https://github.com/sensio/SensioGeneratorBundle/issues/21&lt;/a&gt; comes from the doctrine tools implementation:&lt;/p&gt;


&lt;p&gt;in the dialog, i first specified that i want a field id of type integer. the result was&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;Doctrine\ORM\Mapping\MappingException&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Duplicate definition of column &apos;id&apos; on entity &apos;Liip\DemoBundle\Entity\Event&apos; in a field or discriminator column mapping.&lt;/p&gt;

&lt;p&gt;and no file was created.&lt;/p&gt;

&lt;p&gt;The dialog should tell me i can not create a field named id. (Or better ask first if i want my id column named id or something else.)&lt;/p&gt;

&lt;p&gt;It would be nice if it would write some file even if its not valid, with a warning on top. As it is, i lost all my work of specifying fields. (Luckily was just playing around)&lt;/p&gt;</description>
                <environment></environment>
            <key id="12751">DDC-1229</key>
            <summary>generate entity interactive dialog: id column</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="dbu">David Buchmann</reporter>
                        <labels>
                    </labels>
                <created>Mon, 27 Jun 2011 07:06:45 +0000</created>
                <updated>Tue, 28 Jun 2011 19:42:25 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16092" author="beberlei" created="Tue, 28 Jun 2011 19:42:25 +0000"  >&lt;p&gt;not a bug, its a feature (though a dumb one). Improvement in a next version.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1219] Remove dependancy on Collection interface in Domain Objects</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1219</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Short: This issue is all about being able to use doctrine with naked domain objects without any use of doctrine classes.&lt;br/&gt;
I &apos;m not talking about PersistentCollection here, fully aware of that being tied into Doctrine, but those are injected, this is all about code dependency on ArrayCollection.&lt;/p&gt;


&lt;p&gt;Seems like some of the UnitOfWork code is cable of handling other types of arrays, 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;    // If $actualData[$name] is not a Collection then use an ArrayCollection.
    if ( ! $actualData[$name] instanceof Collection) {
        $actualData[$name] = new ArrayCollection($actualData[$name]);
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But in __cascade* functions this is not the case in all but two:&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 ($relatedEntities instanceof Collection) {
        if ($relatedEntities instanceof PersistentCollection) {
            // Unwrap so that foreach() does not initialize
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;2 however have:&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 (($relatedEntities instanceof Collection || is_array($relatedEntities))) {
        if ($relatedEntities instanceof PersistentCollection) {
            // Unwrap so that foreach() does not initialize
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;Would it be an idea to do &quot;instanceof Traversable&quot; instead of &quot; instanceof Collection&quot;? &lt;/p&gt;</description>
                <environment></environment>
            <key id="12730">DDC-1219</key>
            <summary>Remove dependancy on Collection interface in Domain Objects</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="anderom">Andr&#233; R.</reporter>
                        <labels>
                    </labels>
                <created>Tue, 21 Jun 2011 11:13:39 +0000</created>
                <updated>Mon, 4 Jul 2011 21:47:46 +0000</updated>
                                    <version>2.1</version>
                                <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16035" author="anderom" created="Tue, 21 Jun 2011 11:21:07 +0000"  >&lt;p&gt;Note: If the fist code block is always performed before the last 2 blocks then there is no issue here, just a need to make it more clear in Doc that this is possible but that you should not rely custom implementation as PersistentCollection will be injected when loaded from db.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1217] Use the DBAL ReservedKeywordsValidator in orm:validate-schema</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1217</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;DBAL provides a ReservedKeywordsValidator to check whether a word is reserved. But this tool is not used by the ORM when validating the schema. It would be useful to use it to avoid WTF from users getting a PDOException when creating their schema because of this.&lt;br/&gt;
The other solution if you don&apos;t want to add this in orm:validate-schema would be to create a dedicated command.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12727">DDC-1217</key>
            <summary>Use the DBAL ReservedKeywordsValidator in orm:validate-schema</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, 20 Jun 2011 22:04:34 +0000</created>
                <updated>Mon, 20 Jun 2011 22:04:34 +0000</updated>
                                    <version>2.0.6</version>
                <version>Git Master</version>
                                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1200] Derived Id Generator</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1200</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;For usage with the foreign key as primary key features described in &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-117&quot; title=&quot;Allow @Id on @ManyToOne fields&quot;&gt;&lt;del&gt;DDC-117&lt;/del&gt;&lt;/a&gt; a derived id generator would be tons of useful. It is essentially a post generate id generator (sort of late pre insert though) assigned generator.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12705">DDC-1200</key>
            <summary>Derived Id Generator</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, 9 Jun 2011 20:46:56 +0000</created>
                <updated>Wed, 9 Nov 2011 21:41:30 +0000</updated>
                                    <version>Git Master</version>
                                <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>3</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="16788" author="yourwebmaker" created="Wed, 9 Nov 2011 21:41:30 +0000"  >&lt;p&gt;When this will be fixed?&lt;/p&gt;

&lt;p&gt;I think this is related to &lt;a href=&quot;http://groups.google.com/group/doctrine-user/browse_thread/thread/7e1cfa9c4c99af31&quot; class=&quot;external-link&quot;&gt;http://groups.google.com/group/doctrine-user/browse_thread/thread/7e1cfa9c4c99af31&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="12891">DDC-1315</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1201] DQL Example about count(*) related entity is wrong</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1201</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;DQL Example about count&lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/star_yellow.gif&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; related entity is wrong&lt;/p&gt;</description>
                <environment></environment>
            <key id="12706">DDC-1201</key>
            <summary>DQL Example about count(*) related entity is wrong</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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, 10 Jun 2011 13:31:19 +0000</created>
                <updated>Mon, 10 Oct 2011 10:00:44 +0000</updated>
                                    <version>2.1.1</version>
                                                <component>Documentation</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="16568" author="gedrox" created="Mon, 10 Oct 2011 10:00:18 +0000"  >&lt;p&gt;Also similar DQL in documentation URL &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.1/en/reference/dql-doctrine-query-language.html#pure-and-mixed-results&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.1/en/reference/dql-doctrine-query-language.html#pure-and-mixed-results&lt;/a&gt; fails parsing stage:&lt;/p&gt;

&lt;div class=&quot;code panel&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 = &lt;span class=&quot;code-quote&quot;&gt;&quot;SELECT u, &apos;some scalar string&apos;, count(u.groups) AS num FROM User u JOIN u.groups g GROUP BY u.id&quot;&lt;/span&gt;;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;with 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;  [Doctrine\ORM\Query\QueryException]                                                                                                                         
  [Semantical Error] line 0, col 40 near &apos;localizations)&apos;: Error: Invalid PathExpression. StateFieldPathExpression or SingleValuedAssociationField expected. 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Should be &quot;count(g.id)&quot; instead of &quot;count(u.groups)&quot;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1197] Proxies should handle variable argument lists</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1197</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This is a contingency issue for &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/60&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/60&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&quot;Fix to allow for proxy generated classes to respect methods in parent which may use func_get_args internally. Previously they would be passed nothing and thus fail. Also reduces need to build up argumentString. &quot;&lt;/p&gt;</description>
                <environment></environment>
            <key id="12699">DDC-1197</key>
            <summary>Proxies should handle variable argument lists</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, 5 Jun 2011 08:52:14 +0000</created>
                <updated>Sun, 5 Jun 2011 08:52:14 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1178] Have access to &quot;original&quot; metadata in events subscribed to loadClassMetadata</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1178</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;If you subscribe to loadClassMetadata you will usually modify the metadata for some classes.&lt;br/&gt;
The problem is, that that data has to be loaded from somewhere. But later down the chain you can&apos;t get to it. Now data specific to what you need in your loadClassMetadata  would ideally reside in the same location.&lt;br/&gt;
If we take for example a file, than all data for a specific entity is in the same file.&lt;/p&gt;

&lt;p&gt;My proposal would be to add function get(Original|Raw)MappingData into interface Doctrine\ORM\Mapping\Driver\Driver which would either return raw data or data in a object specific for that Driver or null if it doesn&apos;t make sense for that driver. Please note, that when loading from e.g XmlDriver we should return simplexmlnode or dom node as loadClassMetadata  should be in its own namespace and not pollute the Doctrine one.&lt;/p&gt;
</description>
                <environment></environment>
            <key id="12676">DDC-1178</key>
            <summary>Have access to &quot;original&quot; metadata in events subscribed to loadClassMetadata</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="mvrhov">Miha Vrhovnik</reporter>
                        <labels>
                    </labels>
                <created>Fri, 27 May 2011 17:56:21 +0000</created>
                <updated>Fri, 27 May 2011 18:31:28 +0000</updated>
                                    <version>2.x</version>
                                <fixVersion>2.x</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15892" author="gediminasm" created="Fri, 27 May 2011 18:31:28 +0000"  >&lt;p&gt;Sounds logic, each driver would expect NULL or data (wrapped specifically for the driver used)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-1144] How insert a AES_ENCRYPT value in a table field</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1144</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi there,&lt;br/&gt;
I&apos;m trying to insert an encrypted data:&lt;/p&gt;

&lt;p&gt;Because &apos;&quot;INSERT statements are not allowed in DQL, ....&quot; i processed like this:&lt;br/&gt;
&amp;lt;?php&lt;br/&gt;
...&lt;br/&gt;
// controller&lt;br/&gt;
$membre = new \Entity\TMembre();&lt;br/&gt;
$membre-&amp;gt;setPassword($password);&lt;br/&gt;
$em-&amp;gt;persist($membre);&lt;br/&gt;
$em-&amp;gt;flush();&lt;br/&gt;
...&lt;br/&gt;
?&amp;gt;&lt;br/&gt;
//entity&lt;br/&gt;
&amp;lt;?php&lt;br/&gt;
namespace Entity;&lt;br/&gt;
/**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;TMembre&lt;br/&gt;
 *&lt;/li&gt;
	&lt;li&gt;@Table(name=&quot;t_membre&quot;)&lt;/li&gt;
	&lt;li&gt;@Entity(repositoryClass=&quot;Repository\TMembreRepository&quot;)&lt;br/&gt;
 */&lt;br/&gt;
class TMembre&lt;br/&gt;
{&lt;br/&gt;
    /**&lt;/li&gt;
	&lt;li&gt;Set password     *&lt;/li&gt;
	&lt;li&gt;@param string $password     */&lt;br/&gt;
    public function setPassword($password)
    {
    	$this-&amp;gt;email = &quot;AES_ENCRYPT(&apos;&quot;.$email.&quot;&apos;,&apos;&quot;._MYSQL_CRYPT.&quot;&apos;)&quot;; =&amp;gt; insert this entire string without executing encryption
    	$this-&amp;gt;email = new \Doctrine\ORM\Query\Expr\Func(&quot;AES_ENCRYPT&quot;,array(&quot;&apos;&quot;.$email.&quot;&apos;&quot;,&quot;&apos;&quot;._MYSQL_CRYPT.&quot;&apos;&quot;)); =&amp;gt; does not work
    }
&lt;p&gt;}&lt;br/&gt;
?&amp;gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;How can i do ?&lt;br/&gt;
Add this method to Doctrine\ORM\Query\Expr class ?&lt;/p&gt;

&lt;p&gt;/**&lt;br/&gt;
    public function aesEncrypt($value)&lt;/p&gt;
    {
       return &quot;AES_ENCRYPT(&apos;&quot;.$value.&quot;&apos;,&apos;&quot;._MYSQL_CRYPT.&quot;&apos;)&quot;
    }

&lt;p&gt;Best regards&lt;/p&gt;

&lt;p&gt;David&lt;/p&gt;</description>
                <environment>Win XP, MySql5, Php5.3, ZendFramework 1.11.4</environment>
            <key id="12626">DDC-1144</key>
            <summary>How insert a AES_ENCRYPT value in a table field</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="dquintard">dquintard</reporter>
                        <labels>
                    </labels>
                <created>Tue, 10 May 2011 19:58:28 +0000</created>
                <updated>Tue, 10 May 2011 19:58:28 +0000</updated>
                                    <version>2.0.4</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1137] SchemaTool#getUpdateSchemaSql() does not respect database identifier in table names</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1137</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Given two databases, &apos;foo&apos; and &apos;bar&apos;, with entities in /Entities/Foo/ annotated as follows:&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;/**
 * Test
 *
 * @Table(name=&quot;foo.test&quot;)
 * @Entity
 */
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Create an EntityManager instance 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;$connectionOptions = array( 
    &apos;dbname&apos; =&amp;gt; &apos;Foo&apos;, 
    &apos;driver&apos; =&amp;gt; &apos;pdo_mysql&apos;, 
    &amp;lt;..etc..&amp;gt;
);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Use EntityManager#getClassMetaData( &quot;Entities\\Foo&lt;br class=&quot;atl-forced-newline&quot; /&gt;Test&quot; ) to pass to SchemaTool#createSchema() and Doctrine appropriately creates a database table foo.test&lt;/p&gt;

&lt;p&gt;Use EntityManager#getClassMetaData( &quot;Entities\\Foo&lt;br class=&quot;atl-forced-newline&quot; /&gt;Test&quot; ) to pass to SchemaTool#updateSchema() and Doctrine fails with Exception&lt;br/&gt;
-&amp;gt; SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;42S01&amp;#93;&lt;/span&gt;: Base table or view already exists: 1050 Table &apos;test&apos; already exists&lt;/p&gt;

&lt;p&gt;Inserting&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;die( print_r( $fromSchema, 1 ) . print_r( $toSchema, 1 ) . print_r( $schemaDiff, 1 ) );&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;into Doctrine/ORM/Tools/SchemaTool.php line 632 shows $fromSchema outputs&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;[_tables:protected] =&amp;gt; Array
        (
            [test]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;but $toSchema outputs&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;[_tables:protected] =&amp;gt; Array
        (
            [foo.test]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;which causes $schemaDiff to output&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;[newTables] =&amp;gt; Array
        (
            [foo.test]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In summary, Doctrine/DBAL/Schema/Comparator considers foo.test a new table, because Doctrine/DBAL/Schema/AbstractSchemaManager lists its table as &quot;test&quot; rather than &quot;foo.test&quot;. &lt;/p&gt;
</description>
                <environment>Linux 2.6.18-194.32.1.el5.centos.plus x86_64 GNU/Linux&lt;br/&gt;
</environment>
            <key id="12614">DDC-1137</key>
            <summary>SchemaTool#getUpdateSchemaSql() does not respect database identifier in table names</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="hlomas">Hugh Lomas</reporter>
                        <labels>
                    </labels>
                <created>Thu, 5 May 2011 17:23:11 +0000</created>
                <updated>Sat, 14 May 2011 10:10:20 +0000</updated>
                                    <version>2.0.4</version>
                                                <component>ORM</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15808" author="hlomas" created="Thu, 5 May 2011 18:37:09 +0000"  >&lt;p&gt;It seems that changing AbstractSchemaManager.php to the following corrected the issue for me, however I am not sure of any repercussions that may arise as a result, being unfamiliar with the codebase.&lt;/p&gt;

&lt;div class=&quot;panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;Doctrine/DBAL/Schema/AbstractSchemaManager.php line 228&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;panelContent&quot;&gt;
&lt;p&gt;return new Table( $tableName, $columns, $indexes, $foreignKeys, false, array());&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;Doctrine/DBAL/Schema/AbstractSchemaManager.php line 228&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;panelContent&quot;&gt;
&lt;p&gt;return new Table( &lt;font color=&quot;green&quot;&gt;$this-&amp;gt;_conn-&amp;gt;getDatabase() . &quot;.&quot; . &lt;/font&gt; $tableName, $columns, $indexes, $foreignKeys, false, array());&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;
</comment>
                    <comment id="15850" author="beberlei" created="Sat, 14 May 2011 10:10:09 +0000"  >&lt;p&gt;Multi databases are not supported by schema manager and schema tool yet.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1106] Wrong inversedBy in example</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1106</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;on page &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.0/en/reference/working-with-objects.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/reference/working-with-objects.html&lt;/a&gt;&lt;br/&gt;
section :  8.1. Association Example Entities, first example. Please see the .jpg in attachement(it explains clearly what I think is an error)&lt;br/&gt;
Regards.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12547">DDC-1106</key>
            <summary>Wrong inversedBy in example</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="cristobal">cristobal castro</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Apr 2011 20:09:29 +0000</created>
                <updated>Thu, 7 Apr 2011 20:09:29 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                    <attachment id="10967" name="screen-shot.zip" size="200671" author="cristobal" created="Thu, 7 Apr 2011 20:09:29 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

<item>
            <title>[DDC-1032] ensure the dateformat Y-m-d gets used by the MsSQL-Server 2005</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1032</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;To ensure that the MsSQL-Server 2005 (and maybe higher) uses the format that is specified in the MsSqlPlatform class (Y-m-d)&lt;br/&gt;
set it via &apos;SET DATEFORMAT ymd&apos; .&lt;/p&gt;

&lt;p&gt;This should be done directly after the connection has be opened.&lt;/p&gt;</description>
                <environment>php5.3.5; MsSQL-Server 2005; W2K8; Apache2; MS pdo_sqlsrv_ts_vc6 driver</environment>
            <key id="12386">DDC-1032</key>
            <summary>ensure the dateformat Y-m-d gets used by the MsSQL-Server 2005</summary>
                <type id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/subtask_alternate.png">Sub-task</type>
                    <parent id="12379">DDC-1028</parent>
                        <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="le_shatai">Martin Weise</reporter>
                        <labels>
                    </labels>
                <created>Mon, 14 Feb 2011 11:09:21 +0000</created>
                <updated>Mon, 14 Feb 2011 11:10:57 +0000</updated>
                                    <version>2.0.1</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15306" author="le_shatai" created="Mon, 14 Feb 2011 11:10:57 +0000"  >&lt;p&gt;Issue created as wished from Juozas Kaziukenas.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1025] Please repalce &apos;Doctrine\XXX\YYY&apos; with &apos;\Doctrine\XXX\YYY&apos; in code and document</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1025</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It will help us use the namespace and code autocomplete in some IDE.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12370">DDC-1025</key>
            <summary>Please repalce &apos;Doctrine\XXX\YYY&apos; with &apos;\Doctrine\XXX\YYY&apos; in code and document</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="wsyb">ben yan</reporter>
                        <labels>
                    </labels>
                <created>Wed, 9 Feb 2011 21:33:28 +0000</created>
                <updated>Tue, 13 Dec 2011 20:41:16 +0000</updated>
                                    <version>2.0.1</version>
                                                <component>Documentation</component>
                <component>DQL</component>
                <component>Mapping Drivers</component>
                <component>ORM</component>
                <component>Tools</component>
                        <due></due>
                    <votes>7</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="15717" author="matthieu" created="Fri, 8 Apr 2011 17:51:14 +0000"  >&lt;p&gt;Hi, do you have any more information about this ?&lt;/p&gt;

&lt;p&gt;I&apos;m confused because the php documentation uses the Doctrine\XXX way, and everywhere I&apos;ve seen, it is used like that.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                    <comment id="15718" author="k-fish" created="Mon, 11 Apr 2011 04:41:27 +0000"  >&lt;p&gt;The issue is simple and logical. &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;When an IDE (I am using PhpStorm and it does it like this) sees a namespace in a file, upon seeing namespaces afterwards, it sees them as absolute if they have a leading backslash, or relative when it does not. This affects the resolution of classes for type navigation, code inspection, ...  The same rules as for actual PHP code should be used within comments.&lt;/p&gt;

&lt;p&gt;Here is an example:&lt;/p&gt;

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

class Bar {

  /**
   * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Baz
   */
  &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $baz;

  /**
   * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; \Quux
   */
  &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $quux;

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

&lt;p&gt;The IDE will think $baz is \Foo\Baz and $quux will be seen as being \Quux. Now if you have some reference to Doctrine here, and it was relative, the IDE would assume it&apos;s \Foo\Doctrine\...&lt;/p&gt;</comment>
                    <comment id="15719" author="beberlei" created="Mon, 11 Apr 2011 04:57:42 +0000"  >&lt;p&gt;Well yes, but since all our code examples have no leading namespace argument this means the code is in the default namespace, making Doctrine\XXX\YY a relative namespace that is actually valid.&lt;/p&gt;</comment>
                    <comment id="15720" author="k-fish" created="Mon, 11 Apr 2011 05:46:52 +0000"  >&lt;p&gt;Yes, but the source code docblocks are what is meant here as far as I am concerned.&lt;/p&gt;</comment>
                    <comment id="15838" author="morfi" created="Fri, 13 May 2011 11:08:57 +0000"  >&lt;p&gt;Example (Entitymanager.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;namespace Doctrine\ORM;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;div class=&quot;code panel&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 used Configuration.
  *
  * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Doctrine\ORM\Configuration
  */
   &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $config;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Result:&lt;br/&gt;
&lt;b&gt;Doctrine\ORM\Doctrine\ORM\Configuration&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;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;/**
  * The used Configuration.
  *
  * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Configuration
  */
   &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $config;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Or&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
  * The used Configuration.
  *
  * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; \Doctrine\ORM\Configuration
  */
   &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $config;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="15887" author="mvrhov" created="Fri, 27 May 2011 09:36:15 +0000"  >&lt;p&gt;Why don&apos;t you take this to the PhpStorm tracker as it surely is a bug in IDE?&lt;/p&gt;</comment>
                    <comment id="15888" author="k-fish" created="Fri, 27 May 2011 12:43:39 +0000"  >&lt;p&gt;Miha, what makes you think it&apos;s an IDE bug? In a class in namespace Foo another class named Bar is \Foo\Bar, but \Bar is \Bar. Why is it a bug if the IDE follows the namespace resolution rules?&lt;/p&gt;
</comment>
                    <comment id="16146" author="mridgway" created="Mon, 11 Jul 2011 17:34:05 +0000"  >&lt;p&gt;The issue is that PHPStorm and NetBeans have different class resolution rules. I also use PHPStorm and most of Doctrine does not resolve auto-completion correctly because of this issue.&lt;/p&gt;

&lt;p&gt;I&apos;d be willing to work on this if it would be accepted.&lt;/p&gt;</comment>
                    <comment id="16535" author="andrewmackrodt" created="Thu, 29 Sep 2011 11:58:52 +0000"  >&lt;p&gt;I&apos;ve been evaluating PhpStorm and also came across this issue; I believe the problem is due to Doctrine rather than being a bug with the IDE although it would be nice if PhpStorm would assume namespaces are absolute if they&apos;re not resolved upon an initial lookup.&lt;/p&gt;

&lt;p&gt;I created a quick c# app to append the beginning forward slash to any @var or @return attributes within Doctrine&apos;s source. It&apos;s working for me with Doctrine 2.1.2 and PhpStorm (IntelliJ): &lt;a href=&quot;http://pastebin.com/4HxiWvJA&quot; class=&quot;external-link&quot;&gt;http://pastebin.com/4HxiWvJA&lt;/a&gt; - hopefully this will be of use for anyone else using these IDEs;. Note: the application doesn&apos;t detect multiple line annotations although the only one I&apos;m aware of is the getAST method in Doctrine\ORM\Query.php.&lt;/p&gt;</comment>
                    <comment id="16978" author="beberlei" created="Tue, 13 Dec 2011 20:41:09 +0000"  >&lt;p&gt;This issue is referenced in Github Pull-Request GH-215&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/215&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/215&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="16979" author="beberlei" created="Tue, 13 Dec 2011 20:41:16 +0000"  >&lt;p&gt;This issue is referenced in Github Pull-Request GH-216&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/216&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/216&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1016] Example code does not reflect real code</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1016</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.0/en/reference/working-with-objects.html#entity-state&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/reference/working-with-objects.html#entity-state&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the switch cases all the UnitOfWork constants are invalid.&lt;/p&gt;

&lt;p&gt;Example:&lt;br/&gt;
UnitOfWork::NEW instead of being UnitOfWork::STATE_NEW&lt;/p&gt;</description>
                <environment>Website</environment>
            <key id="12355">DDC-1016</key>
            <summary>Example code does not reflect real code</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="thoth">thoth</reporter>
                        <labels>
                    </labels>
                <created>Thu, 3 Feb 2011 17:10:50 +0000</created>
                <updated>Thu, 3 Feb 2011 17:10:50 +0000</updated>
                                    <version>2.0.1</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1011] Finding out if a model is persist</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1011</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;To find out if a model is persist, is missing in the documentation of doctrine 2.&lt;/p&gt;

&lt;p&gt;To become the state of an model you must call the entitymanager-&amp;gt;getUnitOfWork()-&amp;gt;getEntityState(model) &lt;/p&gt;</description>
                <environment></environment>
            <key id="12345">DDC-1011</key>
            <summary>Finding out if a model is persist</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ronny.deter@erento.com">Ronny Deter</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 Feb 2011 03:57:24 +0000</created>
                <updated>Wed, 2 Feb 2011 03:57:24 +0000</updated>
                                    <version>2.0</version>
                                                <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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


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

<item>
            <title>[DDC-999] DQL always needs a FROM clause, should be changed</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-999</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Sometimes a developer needs to issue a query without a FROM clause. This especially occurs using the QueryBuilder, when you may or may not have a table to select from, but call a stored procedure always.&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;$query = $em&amp;gt;createQuery(&apos;SELECT (1+1)&apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The above query fails because the lexer expects T_FROM. If you replace (1+1) with a stored procedure, this example makes more sense.&lt;/p&gt;

&lt;p&gt;One might argue about that you should use DBAL directly, but I disagree, because it always can happen that you end up in a situation 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 = $em-&amp;gt;createQueryBuilder();

$qb-&amp;gt;select(&lt;span class=&quot;code-quote&quot;&gt;&quot;SOMEFANCYPROCEDURE()&quot;&lt;/span&gt;);

&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($condition) {
  $qb = $qb-&amp;gt;from(&lt;span class=&quot;code-quote&quot;&gt;&quot;additionalTable t&quot;&lt;/span&gt;);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="12319">DDC-999</key>
            <summary>DQL always needs a FROM clause, should be changed</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="felicitus">Timo A. Hummel</reporter>
                        <labels>
                    </labels>
                <created>Sun, 23 Jan 2011 20:25:54 +0000</created>
                <updated>Sun, 23 Jan 2011 20:26:34 +0000</updated>
                                    <version>2.0</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-993] Cookbook: Overriding the ID Generator during a database migration</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-993</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;If you need to override the ID Generator, e.g. during a migration, you can do that in your migration script as follows:&lt;/p&gt;

&lt;div class=&quot;panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;Overriding the ID generator&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;panelContent&quot;&gt;
&lt;p&gt;$em-&amp;gt;getClassMetadata(&apos;foo\bar\Entity&apos;)-&amp;gt;setIdGenerator(new \Doctrine\ORM\Id\AssignedGenerator());&lt;br/&gt;
$em-&amp;gt;getClassMetadata(&apos;foo\bar\Entity&apos;)-&amp;gt;setIdGeneratorType(constant(&apos;Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_NONE&apos;));&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Make sure that both calls equal to the same generator type. You can now modify the @Id fields in your entities. Additionally, make sure that you set the IdGenerator &lt;b&gt;after&lt;/b&gt; you created the database using e.g. SchemaTool-&amp;gt;create().&lt;/p&gt;</description>
                <environment></environment>
            <key id="12311">DDC-993</key>
            <summary>Cookbook: Overriding the ID Generator during a database migration</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="felicitus">Timo A. Hummel</reporter>
                        <labels>
                    </labels>
                <created>Wed, 19 Jan 2011 13:33:27 +0000</created>
                <updated>Sun, 28 Oct 2012 15:33:51 +0000</updated>
                                    <version>2.0</version>
                                                <component>Documentation</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="18892" author="kosen" created="Sat, 27 Oct 2012 21:36:37 +0000"  >&lt;p&gt;Hi, this doesn&apos;t seem to work for me. I have written a small database export / import utility. As long as I use the automatic ID generation, everything works flawlessly, but I&apos;m trying to preserve the existing IDs. I do exactly what you&apos;ve suggested in your post. It works for @OneToOne relations, but I get the following error messages when persisting entities that are parts of @ManyToOne relations:&lt;br/&gt;
Notice: Undefined index: &lt;span class=&quot;error&quot;&gt;&amp;#91;....&amp;#93;&lt;/span&gt; in &lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt;Doctrine/ORM/UnitOfWork.php on line 2655&lt;br/&gt;
I&apos;m using version 2.2.2&lt;br/&gt;
Am I doing something wrong?&lt;/p&gt;</comment>
                    <comment id="18894" author="kosen" created="Sun, 28 Oct 2012 15:33:51 +0000"  >&lt;p&gt;Never mind. I&apos;ve upgraded to Doctrine 2.3.0 and it works as expected.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-972] MySql MyISAM support</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-972</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;We can not set MySql Engine for MyISAM. MySqlPlatform has a _getCreateTableSQL where you can pass some options with the engine param.&lt;br/&gt;
Not able to set it up from yml, xml or annotation schema.&lt;/p&gt;</description>
                <environment>All</environment>
            <key id="12284">DDC-972</key>
            <summary>MySql MyISAM support</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="nisnardi">nicolas isnardi</reporter>
                        <labels>
                    </labels>
                <created>Fri, 7 Jan 2011 18:25:07 +0000</created>
                <updated>Fri, 13 Jul 2012 09:53:50 +0000</updated>
                                    <version>2.0</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="15866" author="cedrictailly" created="Thu, 19 May 2011 10:55:00 +0000"  >&lt;p&gt;I have the same problem and I didn&apos;t found documentation to select the engine for a given table.&lt;/p&gt;

&lt;p&gt;I tried to understand the code by myself and made modifications of my Doctrine v2.0.5, perhaps this is not the best one but here is a beginning of a solution :&lt;/p&gt;

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

&lt;p&gt;@ ORM\Mapping\Driver\DoctrineAnnotations.php:100&lt;/p&gt;

&lt;p&gt;  final class Table extends Annotation &lt;/p&gt;
{
      public $name;
      public $schema;
      public $indexes;
      public $uniqueConstraints;
      public $engine;
  }

&lt;p&gt;@ ORM\Mapping\Driver\AnnotationDriver.php:144&lt;/p&gt;

&lt;p&gt;  $primaryTable = array(&lt;br/&gt;
      &apos;name&apos; =&amp;gt; $tableAnnot-&amp;gt;name,&lt;br/&gt;
      &apos;schema&apos; =&amp;gt; $tableAnnot-&amp;gt;schema,&lt;br/&gt;
      &apos;engine&apos; =&amp;gt; $tableAnnot-&amp;gt;engine&lt;br/&gt;
  );&lt;/p&gt;

&lt;p&gt;@ ORM\Tools\SchemaTool.php:133&lt;/p&gt;

&lt;p&gt;  $table = $schema-&amp;gt;createTable($class-&amp;gt;getQuotedTableName($this-&amp;gt;_platform));&lt;/p&gt;

&lt;p&gt;  if ( isset($class-&amp;gt;table&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;engine&amp;quot;&amp;#93;&lt;/span&gt;) )&lt;br/&gt;
    $table-&amp;gt;addOption(&quot;engine&quot;,$class-&amp;gt;table&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;engine&amp;quot;&amp;#93;&lt;/span&gt;);&lt;/p&gt;

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

&lt;p&gt;...and to define for instance the MyISAM engine in annotations :&lt;/p&gt;

&lt;p&gt;  /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@Entity&lt;/li&gt;
	&lt;li&gt;@Table(engine=&quot;MyISAM&quot;)&lt;br/&gt;
   */&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Because there is no foreign key on MyISAM tables, there are still problems on the schema creation/update when Doctrine executes the corresponding &quot;alter table&quot; SQL commands.&lt;/p&gt;</comment>
                    <comment id="18298" author="gabrielnn77" created="Thu, 12 Jul 2012 13:34:20 +0000"  >&lt;p&gt;in Doctrine 2.2.2 will be&lt;/p&gt;

&lt;p&gt;Doctrine/ORM/Tools/SchemaTool.php-149-                  ///     PATCH   ------------------------------------&lt;br/&gt;
Doctrine/ORM/Tools/SchemaTool.php-150-                  if ( isset($class-&amp;gt;table&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;engine&amp;quot;&amp;#93;&lt;/span&gt;) )&lt;br/&gt;
Doctrine/ORM/Tools/SchemaTool.php-151-                          $table-&amp;gt;addOption(&quot;engine&quot;,$class-&amp;gt;table&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;engine&amp;quot;&amp;#93;&lt;/span&gt;);&lt;br/&gt;
Doctrine/ORM/Tools/SchemaTool.php-152-                  ///     PATCH   ------------------------------------&lt;/p&gt;


&lt;p&gt;Doctrine/ORM/Mapping/ClassMetadataInfo.php-1719-                ///     PATCH   ------------------------------------&lt;br/&gt;
Doctrine/ORM/Mapping/ClassMetadataInfo.php-1720-                if (isset($table&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;engine&amp;#39;&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
Doctrine/ORM/Mapping/ClassMetadataInfo.php-1721-                        $this-&amp;gt;table[&apos;engine&apos;] = $table[&apos;engine&apos;];
Doctrine/ORM/Mapping/ClassMetadataInfo.php-1722-                }
&lt;p&gt;Doctrine/ORM/Mapping/ClassMetadataInfo.php-1723-                ///     PATCH   ------------------------------------&lt;/p&gt;


&lt;p&gt;Doctrine/ORM/Mapping/Table.php-42-      ///     PATCH   ------------------------------------&lt;br/&gt;
Doctrine/ORM/Mapping/Table.php-43-      /** @var string */&lt;br/&gt;
Doctrine/ORM/Mapping/Table.php-44-    public $engine;&lt;br/&gt;
Doctrine/ORM/Mapping/Table.php-45-      ///     PATCH   ------------------------------------&lt;/p&gt;


&lt;p&gt;Doctrine/ORM/Mapping/Driver/AnnotationDriver.php-181-                   ///     PATCH   ------------------------------------&lt;br/&gt;
Doctrine/ORM/Mapping/Driver/AnnotationDriver.php-182-                   $primaryTable&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;engine&amp;#39;&amp;#93;&lt;/span&gt; = $tableAnnot-&amp;gt;engine;&lt;br/&gt;
Doctrine/ORM/Mapping/Driver/AnnotationDriver.php-183-                   ///     PATCH   ------------------------------------&lt;/p&gt;


&lt;p&gt;i found a problem in ManyToMany relations, the intermediate table will be InnoDB&lt;/p&gt;</comment>
                    <comment id="18299" author="beberlei" created="Fri, 13 Jul 2012 08:23:21 +0000"  >&lt;p&gt;You can do all tables as MyISAM already through metadata using @Table(options=&lt;/p&gt;
{&quot;engine&quot;: &quot;MyISAM&quot;}
&lt;p&gt;) except Many-To-Many Join Tables. But you could create a listener to the &quot;postSchemaGenerate&quot; event and accept the schema instance there, modify everything accordingly.&lt;/p&gt;</comment>
                    <comment id="18300" author="stof" created="Fri, 13 Jul 2012 08:50:47 +0000"  >&lt;p&gt;should we add the support of the options for the @JoinTable annotation ?&lt;/p&gt;</comment>
                    <comment id="18303" author="beberlei" created="Fri, 13 Jul 2012 09:53:50 +0000"  >&lt;p&gt;Yes, that is probably what this ticket boils down to &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-952] Several features to batch eager selects more efficently</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-952</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This ticket aggregates several strategies to optimize batching of eager selects.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12257">DDC-952</key>
            <summary>Several features to batch eager selects more efficently</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>Mon, 27 Dec 2010 18:14:21 +0000</created>
                <updated>Mon, 4 Jul 2011 21:47:46 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15074" author="beberlei" created="Fri, 31 Dec 2010 06:47:18 +0000"  >&lt;p&gt;Requirements for batching of eager loads:&lt;/p&gt;

&lt;p&gt;1. Since we are using an IN() query for this we can only support this feature for entities that have a single column primary key.&lt;br/&gt;
2. If we want to support composite keys we need to build it as WHERE ( (id1 = ? AND id2 = ?) OR (id1 = ? AND id2 = ?)) but this is currently not possible with the way how internally the $criteria array is used.&lt;/p&gt;</comment>
                    <comment id="15075" author="beberlei" created="Fri, 31 Dec 2010 07:38:56 +0000"  >&lt;p&gt;Next item to think about: What if an exception or event breaks the flow and &quot;triggerEagerLoads()&quot; is never called?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
            <subtask id="10197">DDC-53</subtask>
            <subtask id="11731">DDC-733</subtask>
            <subtask id="11736">DDC-734</subtask>
            <subtask id="12076">DDC-865</subtask>
            <subtask id="12249">DDC-914</subtask>
            <subtask id="12269">DDC-963</subtask>
            <subtask id="12453">DDC-1060</subtask>
        </subtasks>
        </item>

<item>
            <title>[DDC-948] incorrect link from the types page to known vendor issues</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-948</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/docs/dbal/2.0/en/reference/types.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/dbal/2.0/en/reference/types.html&lt;/a&gt; links to &lt;a href=&quot;http://www.doctrine-project.org/docs/dbal/2.0/en/known-vendor-issues&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/dbal/2.0/en/known-vendor-issues&lt;/a&gt; instead of &lt;a href=&quot;http://www.doctrine-project.org/docs/dbal/2.0/en/reference/known-vendor-issues.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/dbal/2.0/en/reference/known-vendor-issues.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also noticed that the documentation still says &quot;Doctrine DBAL v2.0.0-BETA4 documentation&quot;&lt;/p&gt;</description>
                <environment></environment>
            <key id="12253">DDC-948</key>
            <summary>incorrect link from the types page to known vendor issues</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="lsmith">Lukas Kahwe</reporter>
                        <labels>
                    </labels>
                <created>Sat, 25 Dec 2010 07:23:30 +0000</created>
                <updated>Sat, 25 Dec 2010 07:35:23 +0000</updated>
                                                                    <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15016" author="lsmith" created="Sat, 25 Dec 2010 07:35:23 +0000"  >&lt;p&gt;err sorry .. this is of course a DBAL doc issue not and ORM issue.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-923] Add note about DateTime Query Parameter Type Hint</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-923</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="12215">DDC-923</key>
            <summary>Add note about DateTime Query Parameter Type Hint</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Dec 2010 03:11:43 +0000</created>
                <updated>Fri, 10 Dec 2010 03:11:43 +0000</updated>
                                                                    <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1475] Documentation for One-To-Many, Bidirectional Association does not have YAML example</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1475</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When you are looking for a config example for the bidirectional mapping of an one-to-many association you will just find an example with XML, but not with YAML or PHP. It would be nice if somebody could add an example or a link to the bidirectional one-to-one association, because it should be the same, right?&lt;/p&gt;

&lt;p&gt;Here the link to the example: &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.0/en/reference/association-mapping.html#one-to-many-bidirectional&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/reference/association-mapping.html#one-to-many-bidirectional&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13154">DDC-1475</key>
            <summary>Documentation for One-To-Many, Bidirectional Association does not have YAML example</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="naitsirch">Christian Stoller</reporter>
                        <labels>
                    </labels>
                <created>Mon, 7 Nov 2011 11:33:59 +0000</created>
                <updated>Mon, 7 Nov 2011 11:35:13 +0000</updated>
                                                                    <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1465] Fetching partial objects doesn&apos;t work if HINT_FORCE_PARTIAL_LOAD is not explicitly used</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1465</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Using the DQL &quot;partial&quot; keyword is not enough to get a partial entity as a result.&lt;br/&gt;
The DQL hint HINT_FORCE_PARTIAL_LOAD must be used as well.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$q = $em-&amp;gt;createQuery(&apos;SELECT partial r.{id,comment} FROM Entities\Rating r WHERE r.id=3&apos;);
$r = $q-&amp;gt;getResult() /* HYDRATE_OBJECT is the &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt; hydration mode */
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Here, $r contains the full Entity, a SELECT * has been sent&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$q = $em-&amp;gt;createQuery(&apos;SELECT partial r.{id,comment} FROM Entities\Rating r WHERE r.id=3&apos;);
$q-&amp;gt;setHint(Doctrine\ORM\Query::HINT_FORCE_PARTIAL_LOAD, 1);

$r = $q-&amp;gt;getResult() /* HYDRATE_OBJECT is the &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt; hydration mode */
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Here, $r contains only the selected fields, hence a true partial Entity&lt;/p&gt;</description>
                <environment></environment>
            <key id="13141">DDC-1465</key>
            <summary>Fetching partial objects doesn&apos;t work if HINT_FORCE_PARTIAL_LOAD is not explicitly used</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="jpauli">Julien Pauli</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 Nov 2011 11:08:02 +0000</created>
                <updated>Fri, 11 Nov 2011 09:28:12 +0000</updated>
                                    <version>2.1.2</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                            <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                <outwardlinks description="duplicates">
                            <issuelink>
            <issuekey id="11442">DDC-624</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

<item>
            <title>[DDC-1450] UnitOfWork Transaction Rollback Support</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1450</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The UnitOfWork does not handle the case very well where a rollback is necessary. Can this be optimized?&lt;/p&gt;</description>
                <environment></environment>
            <key id="13122">DDC-1450</key>
            <summary>UnitOfWork Transaction Rollback Support</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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, 24 Oct 2011 07:51:09 +0000</created>
                <updated>Tue, 20 Dec 2011 22:21:37 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17073" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:21:37 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1443] Subscribers reachs maximum nesting level when creating association on pre/postPersist with cascade persist</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1443</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Suppose a situation where:&lt;/p&gt;

&lt;p&gt;A -&amp;gt; B&lt;/p&gt;

&lt;p&gt;Where the OneToOne unidirectional association contains cascade persist.&lt;/p&gt;

&lt;p&gt;If I decide to save an entity B that should create an A instance, it goes into maximum nesting level no matter if I track prePersist or postPersist.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13108">DDC-1443</key>
            <summary>Subscribers reachs maximum nesting level when creating association on pre/postPersist with cascade persist</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="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Thu, 20 Oct 2011 16:57:36 +0000</created>
                <updated>Sat, 29 Oct 2011 07:27:24 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16676" author="guilhermeblanco" created="Thu, 20 Oct 2011 18:54:45 +0000"  >&lt;p&gt;Failing test case&lt;/p&gt;</comment>
                    <comment id="16677" author="guilhermeblanco" created="Thu, 20 Oct 2011 20:10:08 +0000"  >&lt;p&gt;Uploading a new version, now passing successfully, but consuming the onFlush event (which should not be ideal).&lt;/p&gt;</comment>
                    <comment id="16720" author="beberlei" created="Sat, 29 Oct 2011 07:27:24 +0000"  >&lt;p&gt;Ah yes, this never worked. The transaction stuff will fix that. You have to use scheduleForInsert() something inside prePersist.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11080" name="DDC1443Test.php" size="3664" author="guilhermeblanco" created="Thu, 20 Oct 2011 20:10:08 +0000" />
                    <attachment id="11079" name="DDC1443Test.php" size="3383" author="guilhermeblanco" created="Thu, 20 Oct 2011 18:54:45 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

<item>
            <title>[DDC-1441] Metadata cannot be loaded for not registered proxy objects</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1441</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;We are using several Doctrine managers in our project with the same entity classes and different database tables.&lt;/p&gt;

&lt;p&gt;The problem appears when we are willing to merge entity with lazy associations from one manager to another. The second entity manager instance hasn&apos;t got the proxy object metadata defined yet so it fails with Doctrine\ORM\Mapping\MappingException exception &quot;Class EntityProxy is not a valid entity or mapped super class.&quot;.&lt;/p&gt;

&lt;p&gt;If both entity managers share the proxy objects the problem can be fixed by calling &lt;/p&gt;

&lt;div class=&quot;code panel&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;getProxyFactory()-&amp;gt;getProxy(&apos;Entity&apos;, -1);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;which will register the entity metadata for the proxy classname as well.&lt;/p&gt;

&lt;p&gt;Still if the proxy configuration differs, there is no fix found without changing the Doctrine ORM code.&lt;/p&gt;

&lt;p&gt;The fix inside the Doctrine would be to detect Proxy classes before loading the metadata and load the metadata for it&apos;s parent class instead. Please see the diff attached with proposed solution.&lt;/p&gt;

&lt;p&gt;Also I think this issue could arise when unserialized entity objects will be merged into the entity manager. I will try creating test case for this.&lt;/p&gt;</description>
                <environment>MySQL, Ubuntu, PHP 5.3.6</environment>
            <key id="13106">DDC-1441</key>
            <summary>Metadata cannot be loaded for not registered proxy objects</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="gedrox">Aigars Gedroics</reporter>
                        <labels>
                    </labels>
                <created>Thu, 20 Oct 2011 13:02:43 +0000</created>
                <updated>Thu, 5 Apr 2012 08:39:55 +0000</updated>
                                    <version>2.1.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16913" author="gedrox" created="Thu, 24 Nov 2011 14:45:46 +0000"  >&lt;p&gt;Test case attached.&lt;/p&gt;</comment>
                    <comment id="17768" author="gedrox" created="Thu, 5 Apr 2012 08:39:55 +0000"  >&lt;p&gt;See my pull request in &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/332&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/332&lt;/a&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11116" name="DDC1441Test.php" size="2539" author="gedrox" created="Thu, 24 Nov 2011 14:45:46 +0000" />
                    <attachment id="11077" name="not-loaded-proxy-patch.diff" size="1096" author="gedrox" created="Thu, 20 Oct 2011 13:02:43 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

<item>
            <title>[DDC-1429] Add a method to the unit of work that merges any detached entity into UoW without calling SQL</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1429</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This is for those that know what they are doing &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="13094">DDC-1429</key>
            <summary>Add a method to the unit of work that merges any detached entity into UoW without calling SQL</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, 17 Oct 2011 22:05:01 +0000</created>
                <updated>Mon, 17 Oct 2011 22:05:01 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

<item>
            <title>[DDC-1390]  Lazy loading does not work for the relationships of an entity instance, whose class inherits from another entity class</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1390</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Lazy loading does not work for the relationships of an instance of an entity, whose class inherits from another entity class.&lt;/p&gt;

&lt;p&gt;Assume there are two entity classes, A and B, where A inherits from B.&lt;/p&gt;

&lt;p&gt;Now let $a be an instance of A, e. g. the result of &quot;SELECT a FROM \A WHERE a.id = 1&quot;.&lt;/p&gt;

&lt;p&gt;Outputting $a will confirm it is a valid instance of a proxy object inheriting from A.&lt;/p&gt;

&lt;p&gt;Assume that the database row corresponding to $a contains a non-null foreign key that actually links to an existing row in another table, corresponding to another entity instance of a different class.&lt;/p&gt;

&lt;p&gt;Now, $a-&amp;gt;someRelationship will always returns null in this scenario. I assume this is unintended behaviour, because clearly, the other entity should be lazily loaded on accessing it, and there is a value in the database.&lt;/p&gt;

&lt;p&gt;The fetch annotation attribute on that relationship has not been explicitly set, so I assume it is set to the default value, which, according to the docs, should be &quot;lazy&quot;.&lt;/p&gt;

&lt;p&gt;The loading only fails when accessing the relationships of an entity instance, whose class inherits from another entity class. For entity instances, whose classes do not inherit from another entity class, lazy loading of their relationships works as expected.&lt;/p&gt;

&lt;p&gt;I had a look at the proxy objects and verified that they are present and override the __get method with an implementation containing a call to the load() method. Still, the loading won&apos;t work for some reason.&lt;/p&gt;

&lt;p&gt;This could be related to Bug &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1389&quot; title=&quot;Querying subclass entities using DQL results in broken SQL being generated&quot;&gt;&lt;del&gt;DDC-1389&lt;/del&gt;&lt;/a&gt; (&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1389&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1389&lt;/a&gt;) which also happens exclusively in an inheritance scenario. Maybe the current implementation of inheritance is generally wrong or incomplete.&lt;/p&gt;</description>
                <environment>Debian Linux 6.0, MySQL 5.0.51a</environment>
            <key id="13036">DDC-1390</key>
            <summary> Lazy loading does not work for the relationships of an entity instance, whose class inherits from another entity 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="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="dalvarez">Daniel Alvarez Arribas</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Sep 2011 17:22:51 +0000</created>
                <updated>Sun, 6 Jan 2013 08:59:31 +0000</updated>
                                    <version>2.1.1</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="16760" author="beberlei" created="Mon, 31 Oct 2011 22:31:10 +0000"  >&lt;p&gt;Did this get fixed with the correction of your data?&lt;/p&gt;</comment>
                    <comment id="16762" author="dalvarez" created="Tue, 1 Nov 2011 06:22:55 +0000"  >&lt;p&gt;No it did not. This issue is completely unrelated to the other one.&lt;/p&gt;

&lt;p&gt;For this, I have manually implemented workarounds, fetching the associations using DQL queries. Lazy loading in the inheritance scenario above still would not work.&lt;/p&gt;</comment>
                    <comment id="16763" author="beberlei" created="Tue, 1 Nov 2011 11:22:56 +0000"  >&lt;p&gt;So A is an entity in a hierachy A -&amp;gt; B, and &quot;someRelationship&quot; is a field on A or on B &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; towards an Entity C that is in an inheritance hierachy or not? &lt;/p&gt;

&lt;p&gt;Could you post parts of the mappings (entity docblock and the relationship)?&lt;/p&gt;</comment>
                    <comment id="16772" author="dalvarez" created="Sun, 6 Nov 2011 17:05:25 +0000"  >&lt;p&gt;Hey, thanks for taking care of this.&lt;/p&gt;

&lt;p&gt;I attached the entities involved in the szenario to this issue.&lt;/p&gt;

&lt;p&gt;I had problems lazy loading entities through the following associations:&lt;/p&gt;

&lt;p&gt;  Run.invoiceCreatorResult&lt;br/&gt;
  Run.commissionNoteCreatorResult&lt;br/&gt;
  Run.consumerInvoiceExporterResult&lt;/p&gt;

&lt;p&gt;as well as&lt;/p&gt;

&lt;p&gt;  InvoiceCreatorResult.dataVersion&lt;br/&gt;
  CommissionNoteCreatorResult.dataVersion&lt;br/&gt;
  ConsumerInvoiceExporterResult.dataVersion&lt;/p&gt;


&lt;p&gt;In this scenario, InvoiceCreatorResult, CommissionNoteCreatorResult and ConsumerInvoiceExporterResult all inherit from Result, which in turn inherits from a mapped superclass DataObject. Run and DataVersion inherit from DataObject directly.&lt;/p&gt;

&lt;p&gt;The associations where lazy loading does not work are associations both to and from the entity classes InvoiceCreatorResult, CommissionNoteCreatorResult and ConsumerInvoiceExporterResult.&lt;/p&gt;</comment>
                    <comment id="16859" author="beberlei" created="Fri, 18 Nov 2011 13:52:28 +0000"  >&lt;blockquote&gt;
&lt;p&gt;Now let $a be an instance of A, e. g. the result of &quot;SELECT a FROM \A WHERE a.id = 1&quot;.&lt;/p&gt;

&lt;p&gt;Outputting $a will confirm it is a valid instance of a proxy object inheriting from A.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Just a short Q on understanding: Why is $a a proxy of A if you select it explicitly?&lt;/p&gt;</comment>
                    <comment id="16861" author="beberlei" created="Fri, 18 Nov 2011 14:21:35 +0000"  >&lt;p&gt;This a working test-case with a model that i believe resembles yours exactly.&lt;/p&gt;

&lt;p&gt;I also put your models into another test and ran schema validation on them, which works out without problems.&lt;/p&gt;

&lt;p&gt;From the workflow with proxies, maybe &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1452&quot; title=&quot;ObjectHydrator bug: hydration of entity with self (cyclic) relation through ref entity&quot;&gt;&lt;del&gt;DDC-1452&lt;/del&gt;&lt;/a&gt; might be related to your issue?&lt;/p&gt;</comment>
                    <comment id="16871" author="dalvarez" created="Fri, 18 Nov 2011 17:47:53 +0000"  >&lt;p&gt;Regarding the proxy question, I just ment the query to be an example to further illustrate the type of $a. It was redundant and unnecessary though and probably misleading. Sorry for that. I did not select anything in the actual scenario. $a is merely some object of type A. No queries are involved.&lt;/p&gt;</comment>
                    <comment id="16873" author="dalvarez" created="Fri, 18 Nov 2011 18:16:24 +0000"  >&lt;p&gt;Have you been able to make the tests fail with the original data provided?&lt;/p&gt;

&lt;p&gt;If not, I could set up a test case and post it.&lt;/p&gt;</comment>
                    <comment id="16874" author="beberlei" created="Fri, 18 Nov 2011 18:38:02 +0000"  >&lt;p&gt;No i only checked the validity of mappings with the original data. If you could setup a testcase that would be really great.&lt;/p&gt;</comment>
                    <comment id="16890" author="dalvarez" created="Sat, 19 Nov 2011 16:05:52 +0000"  >&lt;p&gt;I will set up a test case and upload it. I&apos;ll see if I can do it one of the next evenings.&lt;/p&gt;</comment>
                    <comment id="17011" author="beberlei" created="Sat, 17 Dec 2011 13:26:19 +0000"  >&lt;p&gt;I tried again, also extended &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1390&quot; title=&quot; Lazy loading does not work for the relationships of an entity instance, whose class inherits from another entity class&quot;&gt;DDC-1390&lt;/a&gt;, but it was impossible for me to reproduce this. I ran this against master, 2.1.x and 2.1.1 specifically.&lt;/p&gt;</comment>
                    <comment id="19217" author="dalvarez" created="Sat, 5 Jan 2013 18:42:17 +0000"  >&lt;p&gt;Sorry, I got swamped with work. Now I am working on this dedicatedly, testing against the latest release. Will let you know once I have a testcase.&lt;/p&gt;</comment>
                    <comment id="19218" author="beberlei" created="Sun, 6 Jan 2013 08:59:31 +0000"  >&lt;p&gt;Good to hear, thanks for the persistent work on this.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11100" name="CommissionNoteCreatorResult.php" size="891" author="dalvarez" created="Sun, 6 Nov 2011 16:56:50 +0000" />
                    <attachment id="11101" name="ConsumerInvoiceExporterResult.php" size="353" author="dalvarez" created="Sun, 6 Nov 2011 16:56:50 +0000" />
                    <attachment id="11096" name="DataObject.php" size="1338" author="dalvarez" created="Sun, 6 Nov 2011 16:54:35 +0000" />
                    <attachment id="11102" name="DataVersion.php" size="1314" author="dalvarez" created="Sun, 6 Nov 2011 16:58:35 +0000" />
                    <attachment id="11112" name="DDC1390Test.php" size="2412" author="beberlei" created="Fri, 18 Nov 2011 14:21:35 +0000" />
                    <attachment id="11099" name="InvoiceCreatorResult.php" size="835" author="dalvarez" created="Sun, 6 Nov 2011 16:55:13 +0000" />
                    <attachment id="11098" name="Result.php" size="1669" author="dalvarez" created="Sun, 6 Nov 2011 16:54:35 +0000" />
                    <attachment id="11097" name="Run.php" size="1817" author="dalvarez" created="Sun, 6 Nov 2011 16:54:35 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1380] Standardize proxy class naming</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1380</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;see &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/125&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/125&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13024">DDC-1380</key>
            <summary>Standardize proxy class naming</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="johannes">Johannes Schmitt</reporter>
                        <labels>
                    </labels>
                <created>Sun, 18 Sep 2011 11:14:10 +0000</created>
                <updated>Sun, 18 Sep 2011 11:14:10 +0000</updated>
                                    <version>2.x</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

<item>
            <title>[DDC-1357] Queries with multiple joins resulting in multiple scalar results for each top level entity only retain one scalar value for each entity</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1357</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Consider this example:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;select g.id, u.id, u.status, count(p.phonenumber) numPhones from Group
     * g join g.user u join u.phonenumbers p group by g.id, u.status, u.id&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;With data:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;phonenumbers:
    [1, 2, 3, 4, 5, 6]
users:
    [{id: 1, status: developer, phonenumbers: [1, 2]},
     {id: 2, status: developer, phonenumbers: [3]},
     {id: 3, status: developer, phonenumbers: [4, 5, 6]}]
groups:
    [{id: 1, users: [1, 2]]},
     {id:2, users: [3]}]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The result currently 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;array(
    array(
        0 =&amp;gt; object(CmsGroup) {
            &apos;id&apos; =&amp;gt; 1,
            &apos;users&apos; =&amp;gt; Collection(
                object(CmsUser) { &apos;id&apos; =&amp;gt; 1 },
                object(CmsUser) { &apos;id&apos; =&amp;gt; 2 }
            )
         },
        &apos;numPhones&apos; =&amp;gt; 1
    ),
    array(
        0 =&amp;gt; object(CmsGroup) {
            &apos;id&apos; =&amp;gt; 2,
            &apos;users&apos; =&amp;gt; Collection(
                object(CmsUser) { &apos;id&apos; =&amp;gt; 3 }
            )
        },
        &apos;numPhones&apos; =&amp;gt; 3
    )
)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Note that the first entry contains only one value numPhones =&amp;gt; 1, even though there are two users associated with that group. One of whom has 2 phone numbers and the other has 1.&lt;/p&gt;

&lt;p&gt;The result I would expect 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;array(
    array(
        0 =&amp;gt; object(CmsGroup) {
            &apos;id&apos; =&amp;gt; 1,
            &apos;users&apos; =&amp;gt; Collection(
                object(CmsUser) { &apos;id&apos; =&amp;gt; 1 },
                object(CmsUser) { &apos;id&apos; =&amp;gt; 2 }
            )
         },
        &apos;numPhones&apos; =&amp;gt; array(2, 1)
    ),
    array(
        0 =&amp;gt; object(CmsGroup) {
            &apos;id&apos; =&amp;gt; 2,
            &apos;users&apos; =&amp;gt; Collection(
                object(CmsUser) { &apos;id&apos; =&amp;gt; 3 }
            )
        },
        &apos;numPhones&apos; =&amp;gt; array(3)
    )
)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The difference is that numPhones for each row now contains an array of the&lt;br/&gt;
scalar values matching the corresponding users.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12991">DDC-1357</key>
            <summary>Queries with multiple joins resulting in multiple scalar results for each top level entity only retain one scalar value for each entity</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="naderman">Nils Adermann</reporter>
                        <labels>
                    </labels>
                <created>Thu, 1 Sep 2011 22:46:17 +0000</created>
                <updated>Thu, 1 Sep 2011 22:50:05 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16410" author="naderman" created="Thu, 1 Sep 2011 22:49:22 +0000"  >&lt;p&gt;You can find a test case for the correct result here: &lt;a href=&quot;https://github.com/naderman/doctrine2/commit/a1ca3d9847cbc514fc951fb0b221b26fe03a6619&quot; class=&quot;external-link&quot;&gt;https://github.com/naderman/doctrine2/commit/a1ca3d9847cbc514fc951fb0b221b26fe03a6619&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1347] Github-PR-110 by shesek: Support NULL in EntityRepository&apos;s magic findBy and findOneBy methods</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1347</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of &lt;/p&gt;
{username}
&lt;p&gt;:&lt;/p&gt;

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

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

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

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

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

&lt;p&gt;Url: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/109&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/109&lt;/a&gt;&lt;/p&gt;
</description>
                <environment></environment>
            <key id="12941">DDC-1342</key>
            <summary>Github-PR-109: Remove trailing spaces</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 21 Aug 2011 14:12:43 +0000</created>
                <updated>Sun, 21 Aug 2011 14:12:43 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1320] Ship Immutable date time with Doctrine Common, use in ORM - Should implement __toString()</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1320</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="12904">DDC-1320</key>
            <summary>Ship Immutable date time with Doctrine Common, use in ORM - Should implement __toString()</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, 6 Aug 2011 17:05:04 +0000</created>
                <updated>Mon, 31 Oct 2011 19:16:21 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16745" author="beberlei" created="Mon, 31 Oct 2011 19:16:21 +0000"  >&lt;p&gt;Has to be pushed back as immutable date time cannot be implemented in userland that well.&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10002">
                <name>Dependency</name>
                                <outwardlinks description="depends on">
                            <issuelink>
            <issuekey id="12896">DDC-1316</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1308] Add cache for transient information and invalidation for ClassMetadata</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1308</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Two different things have to be improved in the caching:&lt;/p&gt;

&lt;p&gt;1. The information isTransient() has to be moved to the ClassMetadataFactory and cached there.&lt;br/&gt;
2. The information getAllClassMetadataNames() can be cached&lt;br/&gt;
3. A debug/development mode should be introduced, leading to filemtime caching and checks so that you can use ApcCache and such in development.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12882">DDC-1308</key>
            <summary>Add cache for transient information and invalidation for ClassMetadata</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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, 31 Jul 2011 18:45:24 +0000</created>
                <updated>Tue, 20 Dec 2011 22:20:51 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17069" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:20:51 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

<item>
            <title>[DDC-2104] BasicEntityPersister::load() doesn&apos;t allow for cache usage</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2104</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;BasicEntityPersister::load() calls:&lt;br/&gt;
$stmt = $this-&amp;gt;_conn-&amp;gt;executeQuery($sql, $params, $types);&lt;br/&gt;
on line 665 of master/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php&lt;/p&gt;

&lt;p&gt;The executeQuery function has an optional fourth parameter to pass a QueryCacheProfile variable to use caching on the query.  This is ignored/not implemented by BasicEntityPersister::load()&lt;/p&gt;</description>
                <environment>This is a new feature,  not a bug</environment>
            <key id="14169">DDC-2104</key>
            <summary>BasicEntityPersister::load() doesn&apos;t allow for cache usage</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="dmcfaul">Dan McFaul</reporter>
                        <labels>
                    </labels>
                <created>Thu, 25 Oct 2012 19:43:26 +0000</created>
                <updated>Mon, 12 Nov 2012 14:51:07 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2102] Make optional SubselectFromClause</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2102</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Subselect ::= SimpleSelectClause &lt;span class=&quot;error&quot;&gt;&amp;#91;SubselectFromClause&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;WhereClause&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;GroupByClause&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;HavingClause&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;OrderByClause&amp;#93;&lt;/span&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14166">DDC-2102</key>
            <summary>Make optional SubselectFromClause</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="hason">Martin Haso&#328;</reporter>
                        <labels>
                    </labels>
                <created>Thu, 25 Oct 2012 11:32:54 +0000</created>
                <updated>Thu, 25 Oct 2012 11:32:54 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2100] Getting Started: Code First PHP fatal error:Call to undefined method Bug::setDescription()</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2100</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/tutorials/getting-started.html&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/tutorials/getting-started.html&lt;/a&gt;&lt;br/&gt;
in file create_bug.php&lt;br/&gt;
$bug-&amp;gt;setDescription(&quot;Something does not work!&quot;);&lt;br/&gt;
but the class Bug do not have setDescription function.&lt;/p&gt;

&lt;p&gt;ps:&lt;br/&gt;
try find &quot;setDescription&quot; on that page. there is only one .&lt;/p&gt;</description>
                <environment>ubuntu 1204 php5.3.8</environment>
            <key id="14164">DDC-2100</key>
            <summary>Getting Started: Code First PHP fatal error:Call to undefined method Bug::setDescription()</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="bronze1man">bronze1man</reporter>
                        <labels>
                    </labels>
                <created>Wed, 24 Oct 2012 14:28:15 +0000</created>
                <updated>Wed, 24 Oct 2012 14:30:06 +0000</updated>
                                    <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2093] Doctrine Criteria does not support sorting by relationed field</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2093</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-none&quot;&gt;
// Here I call Criteria filter
public function getWalletsActive() {
	$criteria = Criteria::create()
		-&amp;gt;where(Criteria::expr()-&amp;gt;eq(&quot;isRemoved&quot;, &quot;0&quot;))
		-&amp;gt;orderBy(array(&quot;currency.id&quot; =&amp;gt; &quot;ASC&quot;));
	return $this-&amp;gt;wallets-&amp;gt;matching($criteria);
}

// Relation
/**
 * @var Currency
 *
 * @ORM\ManyToOne(targetEntity=&quot;Currency&quot;)
 * @ORM\JoinColumns({
 * @ORM\JoinColumn(name=&quot;id_currency&quot;, referencedColumnName=&quot;id&quot;)
 * })
 */
protected $currency;

// File BasicEntityPersister.php
// This cause the problem:
if ( ! isset($this-&amp;gt;_class-&amp;gt;fieldMappings[$fieldName])) {
    throw ORMException::unrecognizedField($fieldName);
}
// There are no relations in $this-&amp;gt;_class-&amp;gt;fieldMappings at all!
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14150">DDC-2093</key>
            <summary>Doctrine Criteria does not support sorting by relationed field</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="nick4fake">Bogdan Yurov</reporter>
                        <labels>
                    </labels>
                <created>Sat, 20 Oct 2012 09:10:02 +0000</created>
                <updated>Sun, 6 Jan 2013 18:29:28 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19237" author="beberlei" created="Sun, 6 Jan 2013 18:29:28 +0000"  >&lt;p&gt;Mark as improvement.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2089] Modify OneToMany to allow unidirectional associations without the need of a JoinTable</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2089</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;As I sayd in the title, it would be nice if the ORM layer could permit to map a 1:n association in the db as an unidirectional OneToMany in the classes, without using a JoinTable in the database.&lt;br/&gt;
This would permit us to get rid of the unnecessary database JoinTable, which creates disorder and decreases performance for no valuable reason.&lt;/p&gt;

&lt;p&gt;Is it possible?&lt;/p&gt;</description>
                <environment>Debian Wheezy, Mysql 5.1, Apache2, PHP 5.4</environment>
            <key id="14145">DDC-2089</key>
            <summary>Modify OneToMany to allow unidirectional associations without the need of a JoinTable</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="noise085">Enea Bette</reporter>
                        <labels>
                        <label>onetomany</label>
                        <label>persister</label>
                        <label>unidirectional</label>
                    </labels>
                <created>Fri, 19 Oct 2012 10:11:55 +0000</created>
                <updated>Sun, 16 Dec 2012 17:42:11 +0000</updated>
                                    <version>2.x</version>
                                <fixVersion>2.4</fixVersion>
                <fixVersion>3.0</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19150" author="noise085" created="Sun, 16 Dec 2012 17:42:11 +0000"  >&lt;p&gt;A little up... for inspiration from JPA &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;&lt;a href=&quot;http://en.wikibooks.org/wiki/Java_Persistence/OneToMany#Undirectional_OneToMany.2C_No_Inverse_ManyToOne.2C_No_Join_Table_.28JPA_2.0_ONLY.29&quot; class=&quot;external-link&quot;&gt;http://en.wikibooks.org/wiki/Java_Persistence/OneToMany#Undirectional_OneToMany.2C_No_Inverse_ManyToOne.2C_No_Join_Table_.28JPA_2.0_ONLY.29&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-2042] Metadata association overriding : allow to override &apos;targetEntity&apos;</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2042</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;While associating object to an descriminated table I wasn&apos;t enable to fix the entityTarget (only one can be set in entity annotation).&lt;/p&gt;

&lt;p&gt;It could be resolve by adding the possibility to override &apos;targetEntity&apos; value in Doctrine\ORM\Mapping\ClassMetadataInfo::ClassMetadataInfo().&lt;/p&gt;

&lt;p&gt;Such as :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;if (isset($overrideMapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;targetEntity&amp;#39;&amp;#93;&lt;/span&gt;)) {&lt;br/&gt;
    $mapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;targetEntity&amp;#39;&amp;#93;&lt;/span&gt; = $overrideMapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;targetEntity&amp;#39;&amp;#93;&lt;/span&gt;;&lt;br/&gt;
}&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;That would need to add a control on the new targetEntity in Doctrine\ORM\Mapping\ClassMetadataInfo::_validateAndCompleteAssociationMapping().&lt;/p&gt;

&lt;p&gt;Such as :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;if ( ! ClassLoader::classExists($mapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;targetEntity&amp;#39;&amp;#93;&lt;/span&gt;) ) {&lt;br/&gt;
throw MappingException::invalidTargetEntityClass($mapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;targetEntity&amp;#39;&amp;#93;&lt;/span&gt;, $this-&amp;gt;name, $mapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;fieldName&amp;#39;&amp;#93;&lt;/span&gt;);&lt;br/&gt;
}&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;cro.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14067">DDC-2042</key>
            <summary>Metadata association overriding : allow to override &apos;targetEntity&apos;</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="cro">Charles Rouillon</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Sep 2012 08:57:40 +0000</created>
                <updated>Wed, 26 Sep 2012 08:59:38 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2043] Extra cache operation in DBAL\Cache\ResultCacheStatement.php</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2043</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This is the closeCursor() method in DBAL\Cache\ResultCacheStatement.php:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function closeCursor()
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;statement-&amp;gt;closeCursor();
        &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;emptied &amp;amp;&amp;amp; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;data !== &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;) {
            $data = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;resultCache-&amp;gt;fetch($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;cacheKey);
            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ( ! $data) {
                $data = array();
            }
            $data[$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;realKey] = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;data;

            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;resultCache-&amp;gt;save($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;cacheKey, $data, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;lifetime);
            unset($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;data);
        }
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We are using Memcache and I noticed an extra GET operation on all cache misses. In the code above I believe the fetch call is not necessary and that the code would do the same without it. &lt;br/&gt;
Also, may I ask why is the SQL used as a key in the cached data?&lt;/p&gt;</description>
                <environment>CentOS, PHP 5.3.10</environment>
            <key id="14069">DDC-2043</key>
            <summary>Extra cache operation in DBAL\Cache\ResultCacheStatement.php</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="bogdan.albei">Bogdan Albei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Sep 2012 11:59:59 +0000</created>
                <updated>Wed, 26 Sep 2012 14:18:04 +0000</updated>
                                    <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="18733" author="stof" created="Wed, 26 Sep 2012 14:12:15 +0000"  >&lt;p&gt;The SQL is used as a key because it is what identifies the query which is done (well, the statement and the parameters)&lt;/p&gt;</comment>
                    <comment id="18734" author="bogdan.albei" created="Wed, 26 Sep 2012 14:18:04 +0000"  >&lt;p&gt;The cacheKey already identifies the query(or at least it should). Would we have cases where different queries would want to use the same cache key?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2021] Array Data in Member OF</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2021</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi.&lt;br/&gt;
First sorry for my bad english.&lt;br/&gt;
In &lt;br/&gt;
SELECT u.id FROM CmsUser u WHERE :groupId MEMBER OF u.groups&lt;br/&gt;
DQL we can&apos;t use Array of groupId like&lt;/p&gt;</description>
                <environment></environment>
            <key id="14024">DDC-2021</key>
            <summary>Array Data in Member OF</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="vahid4134">vahid sohrabloo</reporter>
                        <labels>
                        <label>array</label>
                        <label>dql</label>
                    </labels>
                <created>Sun, 9 Sep 2012 09:10:02 +0000</created>
                <updated>Sun, 9 Sep 2012 09:10:02 +0000</updated>
                                    <version>2.2.3</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-1991] Add parameter indexBy to EntityRepository-&gt;createQueryBuilder()</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1991</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;createQueryBuilder() currently doesn&#8217;t have a parameter to set the third option on the FROM fragment: indexBy. Right now you have to read it, create a new From with the read properties and your desired indexBy value and replace the existing one on the QueryBuilder.&lt;/p&gt;

&lt;p&gt;Should be ten minutes&#8217; work including tests. Thanks a lot!&lt;/p&gt;</description>
                <environment></environment>
            <key id="13977">DDC-1991</key>
            <summary>Add parameter indexBy to EntityRepository-&gt;createQueryBuilder()</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="corphi">Philipp Cordes</reporter>
                        <labels>
                    </labels>
                <created>Mon, 20 Aug 2012 07:52:31 +0000</created>
                <updated>Mon, 20 Aug 2012 07:52:31 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1986] findBy hydration with limit and offset with Oracle database (oci8 driver)</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1986</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I tried to use the findBy method with limit and offset parameters against an Oracle database using oci8 driver.&lt;/p&gt;

&lt;p&gt;The query seems to executed successfully but the hydrator fails when hydrating data as there is a DOCTRINE_ROWNUM column appending the &quot;limit&quot; clause.&lt;/p&gt;

&lt;p&gt;Here is the exception thrown :  &quot;Notice: Undefined index: DOCTRINE_ROWNUM in &lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt;/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php line 183&quot;&lt;/p&gt;

&lt;p&gt;I was thinking about something like this to fix this issue &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;:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;add an attribute (platformExtraColumns) to the platform class, storing every column added by methods like doModifyLimitQuery&lt;/li&gt;
	&lt;li&gt;check in hydrator method hydrateRowData if the column exists among the extra columns attribute of the custom platform&lt;/li&gt;
	&lt;li&gt;don&apos;t use the column if true&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Maybe there is a better approach, what are your thoughts?&lt;/p&gt;</description>
                <environment>composer.json require :&lt;br/&gt;
&lt;br/&gt;
&amp;quot;php&amp;quot;: &amp;quot;&amp;gt;=5.3.3&amp;quot;,&lt;br/&gt;
&amp;quot;symfony/symfony&amp;quot;: &amp;quot;2.1.*&amp;quot;,&lt;br/&gt;
&amp;quot;doctrine/orm&amp;quot;: &amp;quot;&amp;gt;=2.2.3,&amp;lt;2.4-dev&amp;quot;,&lt;br/&gt;
&amp;quot;doctrine/doctrine-bundle&amp;quot;: &amp;quot;dev-master&amp;quot;,&lt;br/&gt;
&amp;quot;twig/extensions&amp;quot;: &amp;quot;dev-master&amp;quot;,&lt;br/&gt;
&amp;quot;symfony/assetic-bundle&amp;quot;: &amp;quot;dev-master&amp;quot;,&lt;br/&gt;
&amp;quot;symfony/swiftmailer-bundle&amp;quot;: &amp;quot;dev-master&amp;quot;,&lt;br/&gt;
&amp;quot;symfony/monolog-bundle&amp;quot;: &amp;quot;dev-master&amp;quot;,&lt;br/&gt;
&amp;quot;sensio/distribution-bundle&amp;quot;: &amp;quot;dev-master&amp;quot;,&lt;br/&gt;
&amp;quot;sensio/framework-extra-bundle&amp;quot;: &amp;quot;dev-master&amp;quot;,&lt;br/&gt;
&amp;quot;sensio/generator-bundle&amp;quot;: &amp;quot;dev-master&amp;quot;,&lt;br/&gt;
&amp;quot;jms/security-extra-bundle&amp;quot;: &amp;quot;1.2.*&amp;quot;,&lt;br/&gt;
&amp;quot;jms/di-extra-bundle&amp;quot;: &amp;quot;1.1.*&amp;quot;,&lt;br/&gt;
&amp;quot;twitter/bootstrap&amp;quot;: &amp;quot;master&amp;quot;,&lt;br/&gt;
&amp;quot;friendsofsymfony/rest-bundle&amp;quot;: &amp;quot;dev-master&amp;quot;,&lt;br/&gt;
&amp;quot;doctrine/doctrine-fixtures-bundle&amp;quot;: &amp;quot;dev-master&amp;quot;</environment>
            <key id="13970">DDC-1986</key>
            <summary>findBy hydration with limit and offset with Oracle database (oci8 driver)</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="10000" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="benja-m-1">Benjamin Grandfond</reporter>
                        <labels>
                        <label>oracle</label>
                    </labels>
                <created>Fri, 17 Aug 2012 09:57:38 +0000</created>
                <updated>Tue, 8 Jan 2013 09:33:00 +0000</updated>
                                    <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="18524" author="benja-m-1" created="Fri, 17 Aug 2012 10:36:35 +0000"  >&lt;p&gt;I implemented it in my forks :&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/benja-M-1/doctrine2/commit/c8d899b14446accf869ddc0043f4235284375755&quot; class=&quot;external-link&quot;&gt;https://github.com/benja-M-1/doctrine2/commit/c8d899b14446accf869ddc0043f4235284375755&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/benja-M-1/dbal/commit/b9423c8d46a2bcdaa5a1f0b26a9a28259b1e44a2&quot; class=&quot;external-link&quot;&gt;https://github.com/benja-M-1/dbal/commit/b9423c8d46a2bcdaa5a1f0b26a9a28259b1e44a2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It works for me, but I didn&apos;t write unit tests.&lt;/p&gt;</comment>
                    <comment id="18537" author="benja-m-1" created="Fri, 24 Aug 2012 13:12:43 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;Did you have time to have a look at this issue?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                    <comment id="18538" author="stof" created="Fri, 24 Aug 2012 13:33:52 +0000"  >&lt;p&gt;Please send a pull request when you submit a fix. It is the proper way to submit them for review. When we want to see things waiting for review, we look at the list of pending PRs, not at all comments of the issue tracker to find links in them.&lt;/p&gt;

&lt;p&gt;And I can tell you that this change has a big issue: it introduces a state in the database platform whereas it is currently stateless. This is likely to cause some issues when using more than 1 query (which is a common use case).&lt;/p&gt;</comment>
                    <comment id="18555" author="benja-m-1" created="Wed, 29 Aug 2012 07:38:06 +0000"  >&lt;p&gt;Hi Christophe thank you for your feedback.&lt;/p&gt;

&lt;p&gt;I didn&apos;t send a PR because I wanted someone sharing his thoughts about what I suggested in this current issue. However I don&apos;t really understand the stateless argument, can you explain a bit more?&lt;/p&gt;

&lt;p&gt;Otherwise how would do you proceed to tell Doctrine not to hydrate platform-specific columns?&lt;/p&gt;
</comment>
                    <comment id="18556" author="stof" created="Wed, 29 Aug 2012 08:17:48 +0000"  >&lt;p&gt;If you run several queries, they will be affected by the extra columns of previous requests, which is wrong&lt;/p&gt;</comment>
                    <comment id="18557" author="beberlei" created="Wed, 29 Aug 2012 08:22:43 +0000"  >&lt;p&gt;I think the ObjectHydrator catches this by skipping undefined columns, i think we might just have overoptimized the SimpleObjectHydrator a little bit.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

<item>
            <title>[DDC-1965] Multiple Index fails if index name not specified</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1965</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;@ORM\Table(name=&quot;applications&quot;, indexes={@ORM\Index(name=&quot;csl_idx&quot;, columns=&lt;/p&gt;
{&quot;createdAt&quot;, &quot;status&quot;, &quot;loanType&quot;}), @ORM\Index(name=&quot;s_idx&quot;, columns={&quot;status&quot;}), @ORM\Index(name=&quot;l_idx&quot;, columns={&quot;loanType&quot;})})&lt;br/&gt;
&lt;br/&gt;
the above Annotation creates 3 different indexes BUT when: &lt;br/&gt;
* @ORM\Table(name=&quot;applications&quot;, indexes={@ORM\Index(columns={&quot;createdAt&quot;, &quot;status&quot;, &quot;loanType&quot;}
&lt;p&gt;), @ORM\Index(columns=&lt;/p&gt;
{&quot;status&quot;}
&lt;p&gt;), @ORM\Index(columns=&lt;/p&gt;
{&quot;loanType&quot;}
&lt;p&gt;)})&lt;/p&gt;

&lt;p&gt;index-names not specified Symfony2 schemaUpdate tools shows only the last Index&lt;/p&gt;
</description>
                <environment>Ubuntu 11.04, PHP 5.3.6 with Suhosin-patch, Symfony 2.0.15</environment>
            <key id="13906">DDC-1965</key>
            <summary>Multiple Index fails if index name not specified</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="pont">Pont</reporter>
                        <labels>
                        <label>Cli</label>
                    </labels>
                <created>Thu, 2 Aug 2012 07:17:04 +0000</created>
                <updated>Thu, 2 Aug 2012 07:17:04 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1960] mapping joins in native queries breaks if select columns are starting with columns from joined table</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1960</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Using a simple Testcase like in &lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/native-sql.html&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/native-sql.html&lt;/a&gt; there are two Tables:&lt;/p&gt;

&lt;p&gt;*) users:&lt;/p&gt;
&lt;div class=&quot;code panel&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   | Modifiers | Storage  | Description 
------------+---------+-----------+----------+-------------
 u_id       | integer | not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;  | plain    | 
 u_name     | text    | not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;  | extended | 
 address_id | integer | not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;  | plain    | 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;*) address:&lt;/p&gt;
&lt;div class=&quot;code panel&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   | Modifiers | Storage  | Description 
----------+---------+-----------+----------+-------------
 a_id     | integer | not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;  | plain    | 
 a_street | text    | not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;  | extended | 
 a_city   | text    | not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;  | extended | 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;address_id is a foreign key to address;&lt;/p&gt;

&lt;p&gt;Now i created the Entities and setup a native query using ResultSetMappingBuilder:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$rsm = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\ORM\Query\ResultSetMappingBuilder($entityManager);
$rsm-&amp;gt;addRootEntityFromClassMetadata(&apos;MyProject\Entity\Users&apos;, &apos;u&apos;);
$rsm-&amp;gt;addJoinedEntityFromClassMetadata(&apos;MyProject\Entity\Address&apos;, &apos;a&apos;, &apos;u&apos;, &apos;address&apos;);

$query = &apos;
    SELECT
        u.*,
        a.*
    FROM
        users u
    LEFT JOIN address a ON (u.address_id = a.a_id)
&apos;;

/** @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;native&lt;/span&gt; \Doctrine\ORM\NativeQuery */
$&lt;span class=&quot;code-keyword&quot;&gt;native&lt;/span&gt; = $entityManager-&amp;gt;createNativeQuery($query, $rsm);

$ret = $&lt;span class=&quot;code-keyword&quot;&gt;native&lt;/span&gt;-&amp;gt;getResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This returns the Entities correctly:&lt;/p&gt;
&lt;div class=&quot;code panel&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(2) {
  [0] =&amp;gt;
  class MyProject\Entity\Users#61 (3) {
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id =&amp;gt;
    &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name =&amp;gt;
    string(5) &lt;span class=&quot;code-quote&quot;&gt;&quot;Smith&quot;&lt;/span&gt;
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $address =&amp;gt;
    class MyProject\Entity\Address#63 (4) {
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id =&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $street =&amp;gt;
      string(8) &lt;span class=&quot;code-quote&quot;&gt;&quot;Broadway&quot;&lt;/span&gt;
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $city =&amp;gt;
      string(8) &lt;span class=&quot;code-quote&quot;&gt;&quot;New York&quot;&lt;/span&gt;
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $users =&amp;gt;
      class Doctrine\ORM\PersistentCollection#64 (9) {
        ...
      }
    }
  }
  [1] =&amp;gt;
  class MyProject\Entity\Users#66 (3) {
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id =&amp;gt;
    &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(2)
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name =&amp;gt;
    string(7) &lt;span class=&quot;code-quote&quot;&gt;&quot;Sherlok&quot;&lt;/span&gt;
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $address =&amp;gt;
    class MyProject\Entity\Address#67 (4) {
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id =&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(2)
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $street =&amp;gt;
      string(13) &lt;span class=&quot;code-quote&quot;&gt;&quot;Oxford Street&quot;&lt;/span&gt;
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $city =&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;London&quot;&lt;/span&gt;
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $users =&amp;gt;
      class Doctrine\ORM\PersistentCollection#68 (9) {
        ...
      }
    }
  }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;BUT if you change the order of the select columns starting with ones from address you get borked Data:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$query = &apos;
    SELECT
        a.*,
        u.*
    FROM
        users u
    LEFT JOIN address a ON (u.address_id = a.a_id)
&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;
array(2) {
  [0] =&amp;gt;
  class MyProject\Entity\Users#61 (3) {
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id =&amp;gt;
    &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(1)
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name =&amp;gt;
    string(5) &lt;span class=&quot;code-quote&quot;&gt;&quot;Smith&quot;&lt;/span&gt;
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $address =&amp;gt;
    class MyProject\Entity\Address#63 (4) {
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id =&amp;gt;
      &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(2)
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $street =&amp;gt;
      string(13) &lt;span class=&quot;code-quote&quot;&gt;&quot;Oxford Street&quot;&lt;/span&gt;
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $city =&amp;gt;
      string(6) &lt;span class=&quot;code-quote&quot;&gt;&quot;London&quot;&lt;/span&gt;
      &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $users =&amp;gt;
      class Doctrine\ORM\PersistentCollection#64 (9) {
        ...
      }
    }
  }
  [1] =&amp;gt;
  class MyProject\Entity\Users#66 (3) {
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id =&amp;gt;
    &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(2)
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name =&amp;gt;
    string(7) &lt;span class=&quot;code-quote&quot;&gt;&quot;Sherlok&quot;&lt;/span&gt;
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $address =&amp;gt;
    NULL
  }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This happens because the function Doctrine\ORM\Internal\Hydration\AbstractHydrator::_gatherRowData does not consider the Mapping i set up. Instead it just add the columns as they get starting with address ones.&lt;/p&gt;

&lt;p&gt;Doctrine\ORM\Internal\Hydration\ObjectHydrator::_hydrateRow then knows the Mapping and ignores the first Address as there is no User to map on, cycling to the next row will then add the address of the second row to the user from the first one.&lt;/p&gt;

&lt;p&gt;There are multiple ways to fix this. One would be to consider the mapping in _gatherRowData, the second to rewrite the _hydrateRow generating the Entities first and then the mapping in a second foreach loop.&lt;/p&gt;

&lt;p&gt;This bugger had me for 2 days until i finally figured it out.&lt;/p&gt;

&lt;p&gt;thanks&lt;/p&gt;</description>
                <environment>ubuntu kernel 2.6.32-40-server&lt;br/&gt;
php 5.3.10-1ubuntu2ppa6~lucid with Suhosin-Patch (cli)&lt;br/&gt;
apache 2 2.2.14-5ubuntu8.9&lt;br/&gt;
postgres 9.1.4-1~lucid4</environment>
            <key id="13900">DDC-1960</key>
            <summary>mapping joins in native queries breaks if select columns are starting with columns from joined table</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="dready">Thomas Subera</reporter>
                        <labels>
                    </labels>
                <created>Tue, 31 Jul 2012 11:23:21 +0000</created>
                <updated>Wed, 21 Nov 2012 23:48:37 +0000</updated>
                                    <version>2.1.4</version>
                <version>2.1.7</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="19022" author="frederes" created="Wed, 21 Nov 2012 23:30:34 +0000"  >&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;Has same issue with using DQL /createQuery() ! Try all the day to find where was my mistake but seems to be a CRITICAL bug !&lt;br/&gt;
How did you solve this ?&lt;/p&gt;


&lt;p&gt;Doctrine version used : 2.3.1-DEV&lt;/p&gt;

&lt;p&gt;&amp;lt;code&amp;gt;&lt;br/&gt;
$query = $this-&amp;gt;getEntityManager()-&amp;gt;createQuery(&quot;&lt;br/&gt;
            SELECT cc, oc&lt;br/&gt;
            FROM  category cc&lt;br/&gt;
                JOIN cc.offer_category oc&lt;br/&gt;
            WHERE cc.catalog = :catalog_id&lt;br/&gt;
            ORDER BY oc.name ASC&lt;br/&gt;
            &quot;)&lt;br/&gt;
            -&amp;gt;setParameter(&quot;:catalog_id&quot;, $catalog_id)&lt;br/&gt;
            ;&lt;/p&gt;

&lt;p&gt;&amp;lt;/code&amp;gt;&lt;/p&gt;

&lt;p&gt;Problem is that the order of the Aliases (cc, oc) is not considered on building SQL .&lt;br/&gt;
In my case, in the ObjectHydrator::hydrateRowData method :&lt;/p&gt;

&lt;p&gt;$rowData = $this-&amp;gt;gatherRowData($row, $cache, $id, $nonemptyComponents);&lt;/p&gt;

&lt;p&gt;returns &lt;/p&gt;

&lt;p&gt;Array&lt;br/&gt;
(&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;oc&amp;#93;&lt;/span&gt; =&amp;gt; Array&lt;br/&gt;
          (&lt;br/&gt;
            &lt;span class=&quot;error&quot;&gt;&amp;#91;id&amp;#93;&lt;/span&gt; =&amp;gt; 14&lt;br/&gt;
            &lt;span class=&quot;error&quot;&gt;&amp;#91;name&amp;#93;&lt;/span&gt; =&amp;gt; toto&lt;br/&gt;
        )&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;cc&amp;#93;&lt;/span&gt; =&amp;gt; Array&lt;br/&gt;
        (&lt;br/&gt;
            &lt;span class=&quot;error&quot;&gt;&amp;#91;catalog_id&amp;#93;&lt;/span&gt; =&amp;gt; 1&lt;br/&gt;
            &lt;span class=&quot;error&quot;&gt;&amp;#91;offer_category_id&amp;#93;&lt;/span&gt; =&amp;gt; 14&lt;br/&gt;
        )&lt;br/&gt;
)&lt;/p&gt;

&lt;p&gt;As &quot;oc&quot; is a mapping, on the first loop the $parentAlias is not yet known and so :&lt;br/&gt;
&amp;lt;code&amp;gt;&lt;br/&gt;
if ($this-&amp;gt;_rsm-&amp;gt;isMixed &amp;amp;&amp;amp; isset($this-&amp;gt;_rootAliases&lt;span class=&quot;error&quot;&gt;&amp;#91;$parentAlias&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
                    echo &quot;parentObject 1\n&quot;;
                    $first = reset($this-&amp;gt;_resultPointers);
                    $parentObject = $first[key($first)];
                }
&lt;p&gt; else if (isset($this-&amp;gt;_resultPointers&lt;span class=&quot;error&quot;&gt;&amp;#91;$parentAlias&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
                    echo $parentAlias.&quot; parentObject 2\n&quot;;
                    $parentObject = $this-&amp;gt;_resultPointers[$parentAlias];
                }
&lt;p&gt; else &lt;/p&gt;
{
                    // HERE : on first loop, for &quot;oc&quot;, parent not yet known so skipped !!!
                    continue;
                }
&lt;p&gt;&amp;lt;/code&amp;gt;&lt;/p&gt;

&lt;p&gt;using a workaround on ObjectHydrator::hydrateRowData like this :&lt;br/&gt;
$rowData = array_reverse($rowData);&lt;/p&gt;

&lt;p&gt;make it work...&lt;/p&gt;

&lt;p&gt;Sorry for my dirty explanation... &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11215" name="testcase.zip" size="5941" author="dready" created="Tue, 31 Jul 2012 11:23:21 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1957] DB -&gt; Entity: Reverse engeniering with two relations between two tables</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1957</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;i use the cli from the symfony 2.1 project to reverse from DB to Entity:&lt;/p&gt;

&lt;p&gt;php app/console doctrine:mapping:convert xml ./src/Acme/StoreBundle/Resources/config/doctrine/metadata/orm --from-database --force&lt;/p&gt;

&lt;p&gt;and i get tis error:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;Doctrine\ORM\Mapping\MappingException&amp;#93;&lt;/span&gt;&lt;br/&gt;
Property &quot;radUser&quot; in &quot;RadAttribute&quot; was already declared, but it must be declared only once&lt;/p&gt;

&lt;p&gt;so i have a table &quot;radUser&quot; with two m:n relations to the same table &quot;radAttributes&quot;:&lt;/p&gt;

&lt;p&gt;Table radUser:&lt;br/&gt;
check =&amp;gt; radAttributes&lt;br/&gt;
reply =&amp;gt; radAttributes&lt;/p&gt;

&lt;p&gt;so doctrine reverse mapping try to generate the radAttribute entity with two mapping to radUser with the same field name &quot;radUser&quot;, what can i do to prevent this issue ?&lt;/p&gt;</description>
                <environment>windows 7, php 5.3, symfony 2.1</environment>
            <key id="13895">DDC-1957</key>
            <summary>DB -&gt; Entity: Reverse engeniering with two relations between two tables</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="skydiablo">sky diablo</reporter>
                        <labels>
                        <label>Cli</label>
                    </labels>
                <created>Sun, 29 Jul 2012 16:13:10 +0000</created>
                <updated>Sun, 29 Jul 2012 16:14:25 +0000</updated>
                                    <version>2.2</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

<item>
            <title>[DDC-1645] Paths to Annotations classes are not considered</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1645</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi, my battle is described here: &lt;a href=&quot;http://groups.google.com/group/doctrine-user/browse_thread/thread/db9c77b6bc000f13&quot; class=&quot;external-link&quot;&gt;http://groups.google.com/group/doctrine-user/browse_thread/thread/db9c77b6bc000f13&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When I follow bugtracker tutorial I think that there is an error when working with Annotations, see these examples:&lt;/p&gt;

&lt;p&gt;Start a new bugtracker project as described in tutorial from scratch, create folders and files as tutorial expose, then do following changes:&lt;/p&gt;

&lt;p&gt;1) put Product, Bug, User class files at root level, same level as bootstraps files and create_xxxxx files&lt;br/&gt;
2) Create &apos;entities&apos; folder, but leave it empty.&lt;br/&gt;
3) Create &apos;yaml&apos; and &apos;xml&apos; at root level too and add related files.&lt;br/&gt;
4) Open bootstrap and edit paths to Product, Bug and User class files to read from root files as in 1) so they can be read from scripts.&lt;/p&gt;

&lt;p&gt;1) YAML&lt;br/&gt;
   a) When using YAML as mapping driver you need a path to Setup::createYAMLMetadataConfiguration( ) method, I use this&lt;br/&gt;
         Setup::createYAMLMetadataConfiguration(array(_&lt;em&gt;DIR&lt;/em&gt;_.&quot;/yaml&quot;), $isDevMode);&lt;br/&gt;
        where &quot;yaml&quot; directory is same level as bootstraps and create_xxxxx files are. When executing script to create a product&lt;br/&gt;
        Doctrine work as expected, creating a row inside table correctly.&lt;br/&gt;
   b) If you comment line where class Product is included, the object can&apos;t be found at runtime and will throw an exception as expected.&lt;br/&gt;
   c) With uncommented require Product line, change yaml name folder to anything, and Doctrine throw an exception (MappingException) as expected&lt;/p&gt;

&lt;p&gt;so Setup method path argument is considered correctly, Doctrine engine must know where yaml files for classes are.&lt;/p&gt;

&lt;p&gt;2) XML&lt;br/&gt;
   a) When using XML as mapping driver you need a path to Setup::createXMLMetadataConfiguration( ) method, I use this&lt;br/&gt;
         Setup::createXMLMetadataConfiguration(array(_&lt;em&gt;DIR&lt;/em&gt;_.&quot;/xml&quot;), $isDevMode);&lt;br/&gt;
        where &quot;xml&quot; directory is same level as bootstraps and create_xxxxx files are. When executing script to create a product&lt;br/&gt;
        Doctrine work as expected, creating a row inside table correctly.&lt;br/&gt;
   b) If you comment line where class Product is included, the object can&apos;t be found at runtime and will throw an exception as expected.&lt;br/&gt;
   c) With uncommented require Product line, change xml name folder to anything, and Doctrine throw an exception (MappingException) as expected&lt;/p&gt;

&lt;p&gt;so Setup method path argument is considered correctly again, Doctrine engine must know where xml files for classes are.&lt;/p&gt;

&lt;p&gt;3) Annotations&lt;br/&gt;
   a) When using Annotations as mapping driver you need a path to Setup::createAnnotationsMetadataConfiguration( ) method, I use this&lt;br/&gt;
         Setup::createAnnotationsMetadataConfiguration(array(_&lt;em&gt;DIR&lt;/em&gt;_.&quot;/entities&quot;), $isDevMode);&lt;br/&gt;
        where &quot;entities&quot; directory is same level as bootstraps and create_xxxxx files are (but remember THEY ARE EMPTY). When executing script to create a product&lt;br/&gt;
        Doctrine WORK AS EXPECTED, creating a row inside table correctly and still I don&apos;t know how if THERE IS NO Annotations files.&lt;br/&gt;
   b) If you comment line where class Product is included, the object can&apos;t be found at runtime and will throw an exception as expected.&lt;br/&gt;
   c) With uncommented require Product line, change name folder to anything, and Doctrine WILL NOT throw an exception, continue with execution.&lt;br/&gt;
   d) Copy /Product.php to /entities/Product.php, then comment docblocks from /Product class (using // or delete them). When running script Doctrine throw a MappingException with message: &quot;Class Product is not a valid entity or mapped super class&quot;, when as follow concepts from 1) (yaml) and 2) (xml) it should search docblocks from /entities/Product.php file (path argument from Setup), right?&lt;/p&gt;

&lt;p&gt;so Setup method path argument IS NOT CONSIDERED, Doctrine engine use already defined classes to get Annotations docblocks using php reflexion classes, methods and functions.&lt;/p&gt;

&lt;p&gt;How to deal with this? I mean...&lt;/p&gt;

&lt;p&gt;a) Erase path argument from Setup::createAnnotationMetadataConfiguration methos (and similar functions for Annotations) because is not needed, classes and annotations must be defined before.&lt;br/&gt;
b) Add support to find docblocks from path argument when no valid dockblock is found from class definition, so entities classes can live without docblocks because they are found inside Setup path function argument, as YAML and XML do.&lt;/p&gt;

&lt;p&gt;       I know that is easy to follow tutorial guidelines to develop applications in Annotations point of view, load them before Doctrine script start (with require/include or autoloaders, etc) and will work, but I think that is wrong how tutorial and functional logic are given, so a) and b) are my proposed solutions. I think b) should be right, get dockblocks from a class already defined and if are not defined it follow XML and YAML logic: read metadata from other files.&lt;/p&gt;

&lt;p&gt;Attachment: My bugtracker Netbeans project.&lt;/p&gt;

&lt;p&gt;Sorry by my english &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</description>
                <environment>openSUSE 12.1 x86, Apache/2.2.21, mysql 5.5.16, PHP 5.3.8 (modules: Core, ctype, curl, date, dom, ereg, filter, gd, hash, http, iconv, json, libxml, mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, pcre, PDO, pdo_mysql, pdo_sqlite, Reflection, session, SimpleXML, SPL, SQLite, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zip, zlib )</environment>
            <key id="13432">DDC-1645</key>
            <summary>Paths to Annotations classes are not considered</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>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="feathersanddown">feathers and down</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Feb 2012 04:54:28 +0000</created>
                <updated>Fri, 10 Feb 2012 04:54:28 +0000</updated>
                                    <version>2.2</version>
                                                <component>Documentation</component>
                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11158" name="bugtracker.zip" size="1764088" author="feathersanddown" created="Fri, 10 Feb 2012 04:54:28 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1624] Locking CTI doesnt work on SQL Server</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1624</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The WITH Keyowrd is appended to the whole FROM .. JOIN .. block instead of behind the FROM block.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13396">DDC-1624</key>
            <summary>Locking CTI doesnt work on SQL Server</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 29 Jan 2012 14:18:18 +0000</created>
                <updated>Thu, 20 Sep 2012 06:20:48 +0000</updated>
                                    <version>2.2</version>
                                <fixVersion>2.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1599] OnFlush event in transaction</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1599</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Is there any particular reason why onFlush event is not triggered when the transaction is allready open? &lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/UnitOfWork.php#L290&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/UnitOfWork.php#L290&lt;/a&gt; It would help a lot developing listeners since this event is the mostly used one and since theres preFlush now it seems a logical solution if onFlush would be a start of transaction in general&lt;/p&gt;</description>
                <environment></environment>
            <key id="13357">DDC-1599</key>
            <summary>OnFlush event in transaction</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>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="gediminasm">Gediminas Morkevicius</reporter>
                        <labels>
                    </labels>
                <created>Sat, 14 Jan 2012 15:51:55 +0000</created>
                <updated>Thu, 20 Sep 2012 06:20:49 +0000</updated>
                                    <version>Git Master</version>
                                <fixVersion>2.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17244" author="beberlei" created="Sat, 14 Jan 2012 16:36:43 +0000"  >&lt;p&gt;onFluish is not the start of a transaction. It has nothing to do with this.&lt;/p&gt;</comment>
                    <comment id="17693" author="ocramius" created="Sat, 31 Mar 2012 02:07:52 +0000"  >&lt;p&gt;Is a third event needed? Or is this to be marked as &quot;won&apos;t fix&quot;?&lt;/p&gt;</comment>
                    <comment id="17695" author="beberlei" created="Sat, 31 Mar 2012 07:14:31 +0000"  >&lt;p&gt;Maybe onBeginTransaction, onCommit and onRollback.&lt;/p&gt;

&lt;p&gt;However since you can start transactions manually using $em-&amp;gt;beginTransaction(), the Flush events are somehwat independent of transactions anyways.&lt;/p&gt;</comment>
                    <comment id="17697" author="gediminasm" created="Sat, 31 Mar 2012 07:41:46 +0000"  >&lt;p&gt;Well, user can start transaction anytime, but the fact is that if we think ORM we do not know nothing about the database. we just persist and flush objects.&lt;/p&gt;

&lt;p&gt;Yes I think these would be very useful, from how I see it, if you use event listeners, is:&lt;/p&gt;

&lt;p&gt;loadClassMetadata: you can apply extra mapping&lt;/p&gt;

&lt;p&gt;onFlush: you can modify entity changesets, or persist recalculate new ones, without triggering the database, since it is not used to begin the database modifications yet.&lt;/p&gt;

&lt;p&gt;onBeginTransaction: could use the database modifications keeping in sync the entity changesets. the thing about this event is that usually in behavioral way atomic updates are required. for example nestedset tree sync lft rgt columns, sortable sync the sort index, materialized path, all these requires atomic updates, and the best place is the start of transaction.&lt;/p&gt;

&lt;p&gt;onCommit: could be useful to execute right before commit, finalizing database modifications could be done.&lt;/p&gt;

&lt;p&gt;onRollback: this one is really something, since if you go far, there might be something like files uploaded during the entity processing, and you may want to remove them if transaction fails.&lt;/p&gt;</comment>
                    <comment id="17958" author="guilhermeblanco" created="Mon, 21 May 2012 02:26:05 +0000"  >&lt;p&gt;This situation was barely documented here: &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1443&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1443&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We need a better Transaction API that completely fixes the computation of changesets and also allow more fine grained control over Entities and their corresponding information.&lt;/p&gt;

&lt;p&gt;I&apos;d postpone this one until 3.0.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-1551] postFlush event listeners should be able to get a list of all flushed entities</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1551</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Testing the new Doctrine 2.2 Beta we finally got the postFlush event which is a nice way to handle things after all the DB work has finished. The main problem is that there is no way to get all the flushed entities. In the onFlush event you are able to use the getScheduledEntityUpdates/Inserts/Deletions but as these entities are flushed, those arrays are now empty. To solve this i see 2 aproaches:&lt;/p&gt;

&lt;p&gt;1. Not unseting the array that holds the scheduled entities so the getScheduledEntityUpdates/Inserts/Deletions still have data. Those arrays are reset just before finishing the commit method so maybe unsetting them one by one as they are flushed is not necessary&lt;br/&gt;
2. Unset the arrays but at the same time, fill another &quot;flushedEntities&quot; array with the flushed entities and then be able to get that array with a getFlushedEntities method&lt;/p&gt;

&lt;p&gt;I can make a patch if necessary, just wanted to know if that sounds ok before starting it &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13287">DDC-1551</key>
            <summary>postFlush event listeners should be able to get a list of all flushed entities</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="acasademont">Albert Casademont</reporter>
                        <labels>
                    </labels>
                <created>Wed, 21 Dec 2011 11:52:22 +0000</created>
                <updated>Wed, 23 May 2012 19:09:26 +0000</updated>
                                    <version>2.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>8</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17971" author="jasper@nerdsweide.nl" created="Wed, 23 May 2012 19:08:43 +0000"  >&lt;p&gt;I agree that Doctrine\ORM\Event\PreFlushEventArgs should contain a record of flushed entities, preferably reachable by entity-insertions/updates/deletions and collection-updates/deletions.&lt;/p&gt;

&lt;p&gt;I have a project (using Doctrine 2.1) which wrapped the flush call in my own. My flush dispatches custom preFlush/postFlush events (as they didn&apos;t exist in Doctrine 2.1), where my postFlushEventArgs does contain such a record. I&apos;ve just upgraded my project to use Doctrine 2.2 and stumbled upon:&lt;/p&gt;

&lt;p&gt;Catchable fatal error: Argument 1 passed to Nw\Event\EntityEvent::postFlush() must be an instance of Nw\Event\Args\PostFlushEventArgs, instance of Doctrine\ORM\Event\PostFlushEventArgs given.&lt;/p&gt;

&lt;p&gt;It seems I&apos;ve now hooked into Doctrine&apos;s postFlush (because I named the events the same way). I have renamed my events to work around this error, but I&apos;d rather see my behavior implemented natively.&lt;/p&gt;

&lt;p&gt;PS: Using Doctrine 2.2.2 to be precise &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

<item>
            <title>[DDC-1513] Missing documentation for using references in Docs</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1513</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am in the process of switching over from Doctrine 2.0.7 to Doctrine 2.1 and one of the major missing components in my entities was the new use of using the mapping entity.&lt;/p&gt;

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

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; 
&amp;lt;?php
namespace My\Project\Entities;
use Doctrine\ORM\Mapping\Entity as ORM;
/**
 * @ORM\Entity(...)
 */
class Something
{
// Doctrine annotations here
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;The nessecity for this to be included in the entities is (as far as I can tell) nowhere to be found in the docs, so I am a little curious as to how people are supposed to know. I have also had a look here: &lt;a href=&quot;http://www.doctrine-project.org/blog/doctrine-2-1-beta-release&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/blog/doctrine-2-1-beta-release&lt;/a&gt; and can see no references too it.&lt;/p&gt;

&lt;p&gt;Am I missing something; or is it really just missing from the docs?&lt;/p&gt;</description>
                <environment></environment>
            <key id="13225">DDC-1513</key>
            <summary>Missing documentation for using references in Docs</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="base">Thomas Gray</reporter>
                        <labels>
                    </labels>
                <created>Mon, 28 Nov 2011 22:37:58 +0000</created>
                <updated>Tue, 29 Nov 2011 08:27:22 +0000</updated>
                                                                    <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16925" author="ebernhardson" created="Mon, 28 Nov 2011 22:43:56 +0000"  >&lt;p&gt;I also glanced through the docs and didn&apos;t find it.  I would suggest it be added to the Annotations Reference page: &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.1/en/reference/annotations-reference.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.1/en/reference/annotations-reference.html&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="16926" author="base" created="Tue, 29 Nov 2011 08:27:22 +0000"  >&lt;p&gt;Ahh, so there are some docs about it; &lt;a href=&quot;http://www.doctrine-project.org/docs/common/2.1/en/reference/annotations.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/common/2.1/en/reference/annotations.html&lt;/a&gt; however they do not seem to be that clear; nor well linked too.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1507] State change detection for version incrementation (for optimistic locking) in combination with orphanRemoval</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1507</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;As i understand the documentation correctly, orphanRemoval associations have the meaning of a &quot;part of&quot; relationship. In the example (&lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.0/en/reference/working-with-associations.html#orphan-removal&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/reference/working-with-associations.html#orphan-removal&lt;/a&gt;) the adresses are part of the contact.&lt;/p&gt;

&lt;p&gt;In my opinion we should reason that the state of the adress consists of the states of all nested contacts. As a consequence we should flag the contact as &quot;dirty&quot; when the adresses change.&lt;/p&gt;

&lt;p&gt;This is relevant for optimistic locking scenarios or event handlers. In my application i tried to use optimistic locking for &quot;contacts&quot;, which does not work if i don&apos;t change anything in the contact but only in the nested addresses.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13212">DDC-1507</key>
            <summary>State change detection for version incrementation (for optimistic locking) in combination with orphanRemoval</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="georgwaechter">Georg W&#228;chter</reporter>
                        <labels>
                    </labels>
                <created>Wed, 23 Nov 2011 11:48:40 +0000</created>
                <updated>Sun, 27 Nov 2011 13:04:57 +0000</updated>
                                    <version>2.1.4</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16921" author="beberlei" created="Sun, 27 Nov 2011 08:47:25 +0000"  >&lt;p&gt;This is still only an approvement, you can workaround this and handle is in your domain code.&lt;/p&gt;</comment>
                    <comment id="16922" author="georgwaechter" created="Sun, 27 Nov 2011 13:04:57 +0000"  >&lt;p&gt;Not in all cases. The first problem is that my domain code can&apos;t modify the version property, doctrine seems to block any manipulations to it. So i&apos;m not able to increment the variable myself.&lt;/p&gt;

&lt;p&gt;The only solution is to implement optimistic locking on my own or to add a dummy persistent boolean field that gets inversed by my domain code .. which would trigger the doctrine implementation for the optimistic locking.&lt;/p&gt;

&lt;p&gt;I think it&apos;s clear that the second option shouldn&apos;t be a choice. If doctrine doesn&apos;t handle the overall case exactly it should allow me to increment the version number myself.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1506] Possible Regression with OneToOne relation</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1506</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * @ORM\Entity
 */
class Top
{
    /**
     * @ORM\Id
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     * @ORM\GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;AUTO&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;
    /**
     * @ORM\OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;LevelOne&quot;&lt;/span&gt;, orphanRemoval=&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;&quot;&lt;/span&gt;, cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;persist&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;remove&quot;&lt;/span&gt;})
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $levelOne;
    
    &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 setLevelOne(LevelOne $levelOne)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;levelOne = $levelOne;
    }

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

/**
 * @ORM\Entity
 */
class LevelOne
{
    /**
     * @ORM\Id
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     * @ORM\GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;AUTO&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;
    /**
     * @ORM\OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;LevelTwo&quot;&lt;/span&gt;, orphanRemoval=&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;&quot;&lt;/span&gt;, cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;persist&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;remove&quot;&lt;/span&gt;})
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $levelTwo;

    &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 setId($id)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;id = $id;
    }

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

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

/**
 * @ORM\Entity
 */
class LevelTwo
{
    /**
     * @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;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 setId($id)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;id = $id;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;trying to clone objects&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$top = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Top();
        $top-&amp;gt;setLevelOne(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; LevelOne());
        $top-&amp;gt;getLevelOne()-&amp;gt;setLevelTwo(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; LevelTwo());
        
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;persist($top);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;flush();
        
        $newTop = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Top();
        $newTop-&amp;gt;setLevelOne(clone $top-&amp;gt;getLevelOne());
        $newTop-&amp;gt;getLevelOne()-&amp;gt;setId(&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;);
        $newTop-&amp;gt;getLevelOne()-&amp;gt;getLevelTwo()-&amp;gt;setId(&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;);
        
        var_dump($newTop-&amp;gt;getLevelOne()-&amp;gt;getId());
        var_dump($newTop-&amp;gt;getLevelOne()-&amp;gt;getLevelTwo()-&amp;gt;getId());
        
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;persist($newTop);
        $&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;the output is:&lt;br/&gt;
NULL&lt;br/&gt;
NULL&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;PDOException&amp;#93;&lt;/span&gt;                                                                                             &lt;br/&gt;
SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;23000&amp;#93;&lt;/span&gt;: Integrity constraint violation: 1062 Duplicate entry &apos;1&apos; for key &apos;UNIQ_82A72CD0778BC57F&apos; &lt;br/&gt;
(it duplicates level two entity)&lt;br/&gt;
I worked for a while with entities, in a certain set of entity properties it completely persisted into database, but without relation between level one and level two.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13211">DDC-1506</key>
            <summary>Possible Regression with OneToOne relation</summary>
                <type id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/subtask_alternate.png">Sub-task</type>
                    <parent id="13135">DDC-1461</parent>
                        <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="n3b">Maxim</reporter>
                        <labels>
                    </labels>
                <created>Wed, 23 Nov 2011 10:06:02 +0000</created>
                <updated>Wed, 23 Nov 2011 10:06:02 +0000</updated>
                                    <version>2.1.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

<item>
            <title>[DDC-1924] Let SQLFilters know the query type it is being applied to</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1924</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;m making an access control system and would like to automatically filter all queries based current user, targetEntity type and query type. Query type is relevant as different permissions are needed by the user for SELECT, UPDATE, DELETE and INSERT queries.&lt;/p&gt;

&lt;p&gt;I can access the first two things in my filter easily enough, but I cannot find a way to have the filter know what type of query the filter is being applied to.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13851">DDC-1924</key>
            <summary>Let SQLFilters know the query type it is being applied to</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="shne">Jan Knudsen</reporter>
                        <labels>
                    </labels>
                <created>Fri, 13 Jul 2012 09:23:12 +0000</created>
                <updated>Fri, 13 Jul 2012 10:59:35 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="18301" author="beberlei" created="Fri, 13 Jul 2012 09:42:32 +0000"  >&lt;p&gt;The Filter API only makes sense for SELECT clauses. Doctrine itself does not use DQL to do updates internally, so you need to use other mechanisms (EventListener) to prevent this operations if they are not allowed for a user.&lt;/p&gt;</comment>
                    <comment id="18302" author="shne" created="Fri, 13 Jul 2012 09:51:55 +0000"  >&lt;p&gt;But I can make custom DQL to update rows and would like to automatically filter this too.&lt;/p&gt;

&lt;p&gt;e.g. $em-&amp;gt;createQuery(&quot;UPDATE SomeEntity se SET se.field = &quot;updated!&quot;)-&amp;gt;execute();&lt;/p&gt;

&lt;p&gt;The lifecycle events preUpdate etc. are not called when doing custom DQL queries.&lt;/p&gt;

&lt;p&gt;Maybe it is bad practice and discouraged to do updates, inserts and deletes as custom DQL queries, but I would like to ensure that the other people in my organization can&apos;t accidentally bypass the Access Control, even if they make use of such bad practice.&lt;/p&gt;

&lt;p&gt;And if the filter API only makes sense for Select statements, why are filters applied to update/delete/etc. statements too?&lt;/p&gt;</comment>
                    <comment id="18304" author="beberlei" created="Fri, 13 Jul 2012 10:41:38 +0000"  >&lt;p&gt;Well, they are applied to DQL UPDATE/DELETE. But not not UPDATE/DELETE that works through the internals of Doctrine. So yes, you can use it to filter DQL DELETE/UPDATE, but doctrine does not do that internally.&lt;/p&gt;

&lt;p&gt;So you have to have two strategies, a DQL/SQL Filter - and Lifecycle events.&lt;/p&gt;</comment>
                    <comment id="18305" author="shne" created="Fri, 13 Jul 2012 10:59:19 +0000"  >&lt;p&gt;Which is fine by me. I already implemented the checks using lifecycle events before opening this issue. The access control is automatically handled when using the entitymanager and not custom DQL.&lt;/p&gt;

&lt;p&gt;Now I would also like to filter the custom DQL, but currently I can&apos;t, because as originally stated, the filter needs to know which type of query it is being applied to.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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


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


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


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


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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-1894] Cannot view Doctrine 2.2 QueryBuilder documentation</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1894</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Visiting the following page:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/api/orm/2.2/class-Doctrine.ORM.QueryBuilder.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/api/orm/2.2/class-Doctrine.ORM.QueryBuilder.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;always redirects back to &lt;a href=&quot;http://www.doctrine-project.org/api/orm/2.2/&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/api/orm/2.2/&lt;/a&gt;&lt;/p&gt;</description>
                <environment>Chrome, Firefox, Safari on OS X</environment>
            <key id="13803">DDC-1894</key>
            <summary>Cannot view Doctrine 2.2 QueryBuilder documentation</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="dteoh">Douglas Teoh</reporter>
                        <labels>
                    </labels>
                <created>Wed, 27 Jun 2012 06:09:24 +0000</created>
                <updated>Wed, 27 Jun 2012 06:09:24 +0000</updated>
                                    <version>2.2</version>
                                                <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1882] AbstractQuery#getResultCacheId() should be public to be able to manage the cache</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1882</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The method getResultCacheId of Doctrine\ORM\AbstractQuery should be public.&lt;/p&gt;

&lt;p&gt;I&apos;m trying to customize the cache refresh mechanism to clear previously cached objects in my app.&lt;br/&gt;
To do that I&apos;m adding a prefix to define regions in the cache.&lt;br/&gt;
To be able to set the Id&apos;s correctly (adding region prefixes) I need to get the &quot;normal&quot; hash doctrine were used in the normal scenario (trying to avoid introduce new code).&lt;br/&gt;
That&apos;s why I will prefer the method to be public.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13788">DDC-1882</key>
            <summary>AbstractQuery#getResultCacheId() should be public to be able to manage the cache</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="ignaciolarranaga">Ignacio Larranaga</reporter>
                        <labels>
                    </labels>
                <created>Tue, 19 Jun 2012 17:37:43 +0000</created>
                <updated>Tue, 19 Jun 2012 17:38:39 +0000</updated>
                                    <version>2.1.6</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="18099" author="ignaciolarranaga" created="Tue, 19 Jun 2012 17:38:39 +0000"  >&lt;p&gt;Attaching the patch despite is a trivial change.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11198" name="AbstractQuery.patch" size="762" author="ignaciolarranaga" created="Tue, 19 Jun 2012 17:38:39 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1879] Orphans are neither nulled nor removed when merging a graph of detached entities</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1879</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When merging a graph of detached entities, the created entitied are created and the updated entities are updated but the non-present entities (which exist in the database but are not in the graph) are neither removed nor have them their association column nullified.&lt;/p&gt;

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

&lt;p&gt;In my code I have 2 entities : Parent and Child. There is a OneToMany(cascade=&lt;/p&gt;
{&quot;all&quot;}
&lt;p&gt;, orphanRemoval=true) relation defined in Parent.&lt;/p&gt;

&lt;p&gt;In my database I have a Parent row with an id of 1, which has 3 Children with ids 1,2,3.&lt;/p&gt;

&lt;p&gt;When I write the following code, I expect the Parent with id 1 and the Child  with id 2 to be updated, a new Child to be created and the Child with id 1 and 3 to be deleted.&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$parent = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Parent(); $parent-&amp;gt;id = 1  &lt;span class=&quot;code-comment&quot;&gt;// detached entity
&lt;/span&gt;$existing_child = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Child(); $child-&amp;gt;id = 2 &lt;span class=&quot;code-comment&quot;&gt;// detached entity
&lt;/span&gt;$new_child = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Child(); &lt;span class=&quot;code-comment&quot;&gt;// &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; entity
&lt;/span&gt;$dinner-&amp;gt;addChild($existing_child);
$dinner-&amp;gt;addChild($new_child);

$em-&amp;gt;merge($dinner);

$em-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The objects I expect to be created and updated have the correct behaviour but the old children are not touched, they are still present in the database.&lt;/p&gt;</description>
                <environment>Doctrine 2.2.2&lt;br/&gt;
PHP 5.3.10 with Suhosin-Patch&lt;br/&gt;
mysql  Ver 14.14 Distrib 5.5.15, for osx10.7&lt;br/&gt;
Mac OS X 10.7 Lion</environment>
            <key id="13784">DDC-1879</key>
            <summary>Orphans are neither nulled nor removed when merging a graph of detached entities</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="systho">Philippe Van Eerdenbrugghe</reporter>
                        <labels>
                    </labels>
                <created>Mon, 18 Jun 2012 15:56:06 +0000</created>
                <updated>Wed, 23 Jan 2013 22:24:05 +0000</updated>
                                    <version>2.2.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19384" author="ocramius" created="Wed, 23 Jan 2013 22:24:02 +0000"  >&lt;p&gt;I don&apos;t think this is valid. Orphan removal scheduling is handled only when an unit of work is available.&lt;/p&gt;

&lt;p&gt;What&apos;s the state of `$dinner` before your example? Can you `var_dump` it?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

<item>
            <title>[DDC-1852] Doctrine\ORM\Tools\SchemaValidator should check validity of lifecycle callbacks</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1852</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The schema validator should analyze mapped lifecycle callbacks and:&lt;/p&gt;

&lt;p&gt; a) if some lifecycle callbacks were defined, but no @HasLifecycleCallbacks annotation/mapping was set, warn the user&lt;br/&gt;
 b) if some lifecycle callbacks were defined, but methods are not public, warn the user&lt;/p&gt;</description>
                <environment></environment>
            <key id="13752">DDC-1852</key>
            <summary>Doctrine\ORM\Tools\SchemaValidator should check validity of lifecycle callbacks</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ocramius">Marco Pivetta</reporter>
                        <labels>
                    </labels>
                <created>Mon, 4 Jun 2012 09:47:12 +0000</created>
                <updated>Thu, 20 Sep 2012 06:20:48 +0000</updated>
                                    <version>Git Master</version>
                                <fixVersion>2.4</fixVersion>
                <fixVersion>2.x</fixVersion>
                <fixVersion>Git Master</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="18038" author="ocramius" created="Mon, 4 Jun 2012 22:25:23 +0000"  >&lt;p&gt;Existing PR at &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/361&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/361&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-1817] Allowing to specify MySQL Collation on Field Basis</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1817</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It would be nice to be able to specify which collation to use on a field basis.&lt;/p&gt;

&lt;p&gt;This would for example be useful when you have case-sensitive (utf8_bin), and case-insensitive (utf8_general_ci) values. Right now, this needs to be manually added to migration files (which is ok for projects, but it is not so nice for distributable libraries).&lt;/p&gt;</description>
                <environment></environment>
            <key id="13691">DDC-1817</key>
            <summary>Allowing to specify MySQL Collation on Field Basis</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="johannes">Johannes Schmitt</reporter>
                        <labels>
                    </labels>
                <created>Tue, 8 May 2012 20:13:01 +0000</created>
                <updated>Tue, 8 May 2012 20:13:01 +0000</updated>
                                                                    <component>Mapping Drivers</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

<item>
            <title>[DDC-1806] DQL with and without fetch join cause</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1806</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When running following DQL in newly cleared EntityManager, with the provided entities (see attached archive or gist at &lt;a href=&quot;https://gist.github.com/2473775&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/2473775&lt;/a&gt; ), results in different fetched association:&lt;/p&gt;

&lt;p&gt;DQL without join:&lt;br/&gt;
SELECT a FROM Entity\A a WHERE a.id = :id&lt;/p&gt;

&lt;p&gt;SQL without join:&lt;br/&gt;
SELECT a0_.a_id AS a_id0, a0_.id AS id1 FROM a a0_ WHERE a0_.a_id = ?&lt;/p&gt;

&lt;p&gt;Result without join:&lt;br/&gt;
$query-&amp;gt;getOneOrNullResult()&lt;del&gt;&amp;gt;getB()&lt;/del&gt;&amp;gt;getName(); // &apos;correct&apos;&lt;/p&gt;


&lt;p&gt;DQL with fetch join:&lt;br/&gt;
SELECT a, b FROM Entity\A a LEFT JOIN a.b b WHERE a.id = :id&lt;/p&gt;

&lt;p&gt;SQL with fetch join:&lt;br/&gt;
SELECT a0_.a_id AS a_id0, b1_.id AS id1, b1_.name AS name2, a0_.id AS id3 FROM a a0_ LEFT JOIN b b1_ ON a0_.id = b1_.id WHERE a0_.a_id = ?&lt;/p&gt;

&lt;p&gt;Result with fetch join:&lt;br/&gt;
$query-&amp;gt;getOneOrNullResult()&lt;del&gt;&amp;gt;getB()&lt;/del&gt;&amp;gt;getName(); // &apos;wrong&apos; (different result)&lt;/p&gt;


&lt;p&gt;The problem seems to be strictly related with how the `@JoinColumn` is configured.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13675">DDC-1806</key>
            <summary>DQL with and without fetch join cause</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="ocramius">Marco Pivetta</reporter>
                        <labels>
                    </labels>
                <created>Tue, 1 May 2012 21:09:00 +0000</created>
                <updated>Tue, 1 May 2012 21:15:33 +0000</updated>
                                    <version>2.2</version>
                <version>2.2.1</version>
                <version>2.2.2</version>
                <version>Git Master</version>
                                                <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17900" author="ocramius" created="Tue, 1 May 2012 21:15:32 +0000"  >&lt;p&gt;Attaching failing test from &lt;a href=&quot;https://github.com/Ocramius/doctrine2/compare/DDC-1806&quot; class=&quot;external-link&quot;&gt;https://github.com/Ocramius/doctrine2/compare/DDC-1806&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11188" name="DDC1806Test.php" size="2518" author="ocramius" created="Tue, 1 May 2012 21:15:32 +0000" />
                    <attachment id="11187" name="gist2473775-d202a38fdfb91921ef010df36322fb646561593a.tar.gz" size="19832" author="ocramius" created="Tue, 1 May 2012 21:09:00 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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




</description>
                <environment></environment>
            <key id="13685">DDC-1812</key>
            <summary>Modify ResultSetMapping#addMetaResult function definition</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="rivaros">ross neacoders</reporter>
                        <labels>
                    </labels>
                <created>Sun, 6 May 2012 11:28:54 +0000</created>
                <updated>Sun, 6 May 2012 11:28:54 +0000</updated>
                                    <version>2.2</version>
                <version>2.2.1</version>
                <version>2.2.2</version>
                <version>Git Master</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1803] Paginator usage with a DQL query that is using 2 time the same named binded value failed</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1803</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I use a dql query where I bind a named parameter 2 time in the same query for different joined fields.  The query work but the count query failed saying that there are missing bind variable.&lt;/p&gt;

&lt;p&gt;ex:&lt;br/&gt;
$qb = $this-&amp;gt;getQueryBuilder()&lt;br/&gt;
            -&amp;gt;select(&apos;&lt;br/&gt;
                partial fl.&lt;/p&gt;
{id, title, listing_date, abstract}
&lt;p&gt;,&lt;br/&gt;
                partial fla.&lt;/p&gt;
{id},&lt;br/&gt;
                partial ca.{id}
&lt;p&gt;,&lt;br/&gt;
                partial ds.&lt;/p&gt;
{id}
&lt;p&gt;            &apos;)&lt;br/&gt;
            -&amp;gt;from(&apos;Fo_Listing&apos;, &apos;fl&apos;)&lt;br/&gt;
            -&amp;gt;join(&apos;fl.listing_properties&apos;, &apos;flp&apos;)&lt;br/&gt;
            -&amp;gt;join(&apos;flp.property&apos;, &apos;fp&apos;)&lt;br/&gt;
            -&amp;gt;leftjoin(&apos;fl.listing_assets&apos;, &apos;fla&apos;)&lt;br/&gt;
            -&amp;gt;leftjoin(&apos;fla.asset&apos;, &apos;ca&apos;)&lt;br/&gt;
            -&amp;gt;leftjoin(&apos;ca.ds&apos;, &apos;ds&apos;)&lt;br/&gt;
            -&amp;gt;where(&apos;fp.id = :propertyId&apos;)&lt;br/&gt;
                -&amp;gt;setParameter(&apos;propertyId&apos;, $id)&lt;br/&gt;
            -&amp;gt;andWhere(&apos;fl.object_status_id &amp;lt;&amp;gt; :deleted&apos;)&lt;br/&gt;
                -&amp;gt;setParameter(&apos;deleted&apos;, CoRefObjectStatus::DELETE)&lt;br/&gt;
            -&amp;gt;andWhere(&apos;fl.publishing_status_id = :published&apos;)&lt;br/&gt;
                -&amp;gt;setParameter(&apos;published&apos;, CoRefPublishingStatus::PUBLISHED)&lt;br/&gt;
            -&amp;gt;andWhere(&apos;fp.object_status_id &amp;lt;&amp;gt; :deleted&apos;)&lt;br/&gt;
                -&amp;gt;setParameter(&apos;deleted&apos;, CoRefObjectStatus::DELETE)&lt;br/&gt;
            -&amp;gt;andWhere(&apos;fp.publishing_status_id = :published&apos;)&lt;br/&gt;
                -&amp;gt;setParameter(&apos;published&apos;, CoRefPublishingStatus::PUBLISHED)&lt;br/&gt;
            -&amp;gt;add(&apos;orderBy&apos;, &apos;fl.listing_date DESC, fl.published_date DESC&apos;)&lt;br/&gt;
            -&amp;gt;setMaxResults($onTheMarketLimit);&lt;/p&gt;

&lt;p&gt;        $onTheMarket = new Paginator($qb, $fetchJoin = true);&lt;/p&gt;

&lt;p&gt;To make it work, I&apos;ve renamed the second usage of the named variable with a 2 at the end.  deleted2 and published2.&lt;/p&gt;</description>
                <environment>linux, oracle</environment>
            <key id="13669">DDC-1803</key>
            <summary>Paginator usage with a DQL query that is using 2 time the same named binded value failed</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="10000" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="mdrolet">Marc Drolet</reporter>
                        <labels>
                    </labels>
                <created>Mon, 30 Apr 2012 12:41:44 +0000</created>
                <updated>Fri, 25 Jan 2013 15:29:52 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19385" author="ocramius" created="Wed, 23 Jan 2013 22:27:08 +0000"  >&lt;p&gt;This seems to be quite old. &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; is it still valid with the latest ORM?&lt;/p&gt;</comment>
                    <comment id="19406" author="mdrolet" created="Fri, 25 Jan 2013 15:27:21 +0000"  >&lt;p&gt;I&apos;ll try to test this problem on an updated version and I&apos;ll let you know.&lt;br/&gt;
The bug entry is also quite old and I&apos;ve a local modified version of the paginator here to make it work with oracle, so it can take some time before I can test this out on the current doctrine version.&lt;/p&gt;</comment>
                    <comment id="19407" author="ocramius" created="Fri, 25 Jan 2013 15:29:48 +0000"  >&lt;p&gt;Ok, marking as awaiting feedback&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-1756] Allow for master table only models on joined subclass inheritance</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1756</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Think of a joined subclass inheritance setup where abstract base class A has many concrete child classes C1 ... CN. For each child class a table necessarily has to created. Yet if there are many child classes not defining any additional fields you will get many &quot;id only&quot; child tables. This leads to unnecessary join and insert overhead on database operations as well as a bunch of quite senseless tables in your schema that need to be maintained.&lt;/p&gt;

&lt;p&gt;While there are already tickets requesting support for mixed inheritance mapping (e.g. &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-138&quot; title=&quot;Allow for mixed inheritance mapping&quot;&gt;DDC-138&lt;/a&gt;) I want to propose another - obviously easy to implement - solution that addresses the &quot;id only table&quot; problem. The basic idea is to extend ClassMetadata by a flag &quot;hasOwnTable&quot; which is true by default and applicable for child classes of a joined subclass tree. Setting this flag to &amp;lt;false&amp;gt; would lead to...&lt;br/&gt;
1.) no child table creation for corresponding model&lt;br/&gt;
2.) no joins to this table while rendering SQL from DQL statements&lt;br/&gt;
3.) no INSERT, UPDATE and DELETE statements for this table in methods executeInserts(), update() and delete() on Doctrine\ORM\Persisters\JoinedSubclassPersister.&lt;/p&gt;

&lt;p&gt;(3) can easily be implemented since the mentioned methods all loop on ClassMetadata::parentClasses. For those classes which set the flag &quot;hasOwnTable&quot; to false the operation will be skipped. On the other hand (2) doesn&apos;t seem to a big deal either. Extending SqlWalker::_generateClassTableInheritanceJoins() by means of a flag test seems to be enough. Of course setting the flag to &amp;lt;false&amp;gt; while defining additional fields on child class level must be rejected.&lt;/p&gt;

&lt;p&gt;If you go for this feature I would be pleased to provide an implementation.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13595">DDC-1756</key>
            <summary>Allow for master table only models on joined subclass inheritance</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="markus.woessner">Markus W&#246;&#223;ner</reporter>
                        <labels>
                    </labels>
                <created>Tue, 3 Apr 2012 11:41:01 +0000</created>
                <updated>Tue, 3 Apr 2012 11:41:01 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-2264] Add support for custom Oracle SID / Service name in PDO_Oracle driver</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2264</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Some Oracle customer databases are set up having different settings for their &quot;DBNAME&quot; and &quot;SID&quot; / &quot;SERVICE&quot; property. (DBNAME != SID)&lt;/p&gt;

&lt;p&gt;So, hereing it&apos;s currently not possible to connect via the PDO_Oracle driver (Class: Doctrine\DBAL\Driver\PDOOracle\Driver) as it uses the DBNAME value by default as value for SID / SERVICE in the _constructPdoDsn() method. (DBNAME = SID)&lt;/p&gt;

&lt;p&gt;A solution would be to add an additional config param like &quot;servicename&quot; and pass it&apos;s value into _constructPdoDsn().&lt;/p&gt;

&lt;p&gt;An updated version of the method could look like:&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;private function _constructPdoDsn(array $params)&lt;br/&gt;
{&lt;br/&gt;
    $dsn = &apos;oci:&apos;;&lt;br/&gt;
    if (isset($params&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;host&amp;#39;&amp;#93;&lt;/span&gt;) &amp;amp;&amp;amp; $params&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;host&amp;#39;&amp;#93;&lt;/span&gt; != &apos;&apos;) {&lt;br/&gt;
        $dsn .= &apos;dbname=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)&apos; .&lt;br/&gt;
               &apos;(HOST=&apos; . $params&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;host&amp;#39;&amp;#93;&lt;/span&gt; . &apos;)&apos;;&lt;/p&gt;

&lt;p&gt;        if (isset($params&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;port&amp;#39;&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
            $dsn .= &apos;(PORT=&apos; . $params[&apos;port&apos;] . &apos;)&apos;;
        }
&lt;p&gt; else &lt;/p&gt;
{
            $dsn .= &apos;(PORT=1521)&apos;;
        }

&lt;p&gt;		if (isset($params&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;servicename&amp;#39;&amp;#93;&lt;/span&gt;) &amp;amp;&amp;amp; $params&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;servicename&amp;#39;&amp;#93;&lt;/span&gt; != &apos;&apos;)&lt;/p&gt;
		{
			$servicename	=	$params[&apos;servicename&apos;];
		}
&lt;p&gt;		else&lt;/p&gt;
		{
			$servicename	=	$params[&apos;dbname&apos;];
		}

&lt;p&gt;        if (isset($params&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;service&amp;#39;&amp;#93;&lt;/span&gt;) &amp;amp;&amp;amp; $params&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;service&amp;#39;&amp;#93;&lt;/span&gt; == true) &lt;/p&gt;
{
            $dsn .= &apos;))(CONNECT_DATA=(SERVICE_NAME=&apos; . $servicename . &apos;)))&apos;;
        }
&lt;p&gt; else &lt;/p&gt;
{
            $dsn .= &apos;))(CONNECT_DATA=(SID=&apos; . $servicename . &apos;)))&apos;;
        }

&lt;p&gt;    } else &lt;/p&gt;
{
        $dsn .= &apos;dbname=&apos; . $params[&apos;dbname&apos;];
    }

&lt;p&gt;    if (isset($params&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;charset&amp;#39;&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
        $dsn .= &apos;;charset=&apos; . $params[&apos;charset&apos;];
    }

&lt;p&gt;    return $dsn;&lt;br/&gt;
}&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;The only workaround for me is right now to use the &quot;standard&quot; PHP OCI / OCI8 functions with the correct SID / Service in it&apos;s DSN.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14430">DDC-2264</key>
            <summary>Add support for custom Oracle SID / Service name in PDO_Oracle driver</summary>
                <type id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/task.png">Task</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="michl">Michl Schmid</reporter>
                        <labels>
                        <label>oracle</label>
                    </labels>
                <created>Tue, 29 Jan 2013 10:16:55 +0000</created>
                <updated>Tue, 29 Jan 2013 10:16:55 +0000</updated>
                                    <version>2.0</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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


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

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

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

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

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

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

<item>
            <title>[DDC-2223] unable to use scalar function when a scalar expression is expected</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2223</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;the DQL Parser don&apos;t parse properly functions when a ScalarExpression is needed like of all case functions.&lt;/p&gt;

&lt;p&gt;In fact first function token is interpreted as a T_IDENTIFIER and enter on line 1663 of Doctrine\ORM\Query\Parser class. in search of math operator, when not found this case considere that the token is a row element with no consid&#233;ration of the functions procession treated after.&lt;/p&gt;

&lt;p&gt;fix of this bug consist to enclose the line 1672 by a if (!$this-&amp;gt;_isFunction()).&lt;/p&gt;</description>
                <environment>(not affected by this bug)</environment>
            <key id="14349">DDC-2223</key>
            <summary>unable to use scalar function when a scalar expression is expected</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="alexises">Alexis Lameire</reporter>
                        <labels>
                        <label>dql</label>
                    </labels>
                <created>Fri, 4 Jan 2013 13:21:34 +0000</created>
                <updated>Fri, 4 Jan 2013 13:21:34 +0000</updated>
                                    <version>Git Master</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

<item>
            <title>[DDC-2184] [GH-530] Singular form of generated methods should end with &apos;y&apos; when property ends with &apos;ies&apos;</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2184</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In Doctrine 2.3 the &apos;add&apos; and &apos;remove&apos; methods in oneToMany associations have another problem (in earlier versions like 2.2 this worked correct). The singular form is not correctly detected if the property ends with &apos;ies&apos; like &apos;entries&apos; which should be transformed to &apos;entry&apos;.&lt;br/&gt;
I have this YAML 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;
Archive:
  type: entity
  fields:
    id:
      id: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      type: integer
      unsigned: &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
      nullable: &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;
      generator:
        strategy: IDENTITY
  oneToMany:
    entries:
      targetEntity: Entry
      mappedBy: archive
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This generates these methods:&lt;/p&gt;

&lt;div class=&quot;code panel&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 addEntrie(\Entry $entries) { ... }
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function removeEntrie(\Entry $entries) { ... }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Because in the EntityGenerator only the plural &apos;s&apos; is removed. It would be nice if an ending of &apos;ies&apos; could be replaced by &apos;y&apos;. So that we get these methods&lt;/p&gt;

&lt;div class=&quot;code panel&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 addEntry(\Entry $entries) { ... }
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function removeEntry(\Entry $entries) { ... }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;My fork already has the changes &lt;a href=&quot;https://github.com/naitsirch/doctrine-orm2/commit/a3adfccb4927d61da7debae46ed0fff61e4212f8&quot; class=&quot;external-link&quot;&gt;https://github.com/naitsirch/doctrine-orm2/commit/a3adfccb4927d61da7debae46ed0fff61e4212f8&lt;/a&gt;&lt;br/&gt;
I have opened a pull request here &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/530&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/530&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14290">DDC-2184</key>
            <summary>[GH-530] Singular form of generated methods should end with &apos;y&apos; when property ends with &apos;ies&apos;</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/inprogress.png">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 4 Dec 2012 09:14:25 +0000</created>
                <updated>Sun, 6 Jan 2013 10:02:11 +0000</updated>
                                    <version>2.3</version>
                                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19104" author="naitsirch" created="Tue, 4 Dec 2012 09:25:11 +0000"  >&lt;p&gt;Sorry, I accidently clicked on the button &apos;Request Feedback&apos; &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;br/&gt;
Now the status has changed to &apos;Awaiting Feedback&apos;&lt;/p&gt;</comment>
                    <comment id="19226" author="beberlei" created="Sun, 6 Jan 2013 09:45:52 +0000"  >&lt;p&gt;Mark as improvement&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                <outwardlinks description="duplicates">
                            <issuelink>
            <issuekey id="14236">DDC-2150</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="14256">DDC-2160</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2185] Better explain DQL &quot;WITH&quot; and implications for the collection filtering API</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2185</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Available documentation is a bit thin regarding the &quot;WITH&quot; clause on JOIN expressions. Only a single example is provided in&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://docs.doctrine-project.org/en/2.1/reference/dql-doctrine-query-language.html#dql-select-examples&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/en/2.1/reference/dql-doctrine-query-language.html#dql-select-examples&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WITH seems to allow to only &quot;partially&quot; load a collection, so the collection in memory does not fully represent the associations available in the database.&lt;/p&gt;

&lt;p&gt;The resulting collection is marked as &quot;initialized&quot; and it seems there is no way to tell later on whether/how (with which expression) the collection has been initialized.&lt;/p&gt;

&lt;p&gt;When using the collection filtering API, the &quot;initialized&quot; flag on the collection will lead to in-memory processing. If a collection has been loaded WITH a restricting clause and another filter is applied later, results may not be what one might expect.&lt;/p&gt;

&lt;p&gt;I assume this is by design (no idea how the collection could be &quot;partially&quot; loaded and behave correctly under all conditions), so filing it as a documentation issue.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14291">DDC-2185</key>
            <summary>Better explain DQL &quot;WITH&quot; and implications for the collection filtering API</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="mpdude">Matthias Pigulla</reporter>
                        <labels>
                        <label>collection</label>
                        <label>documentation</label>
                        <label>dql</label>
                        <label>filtering</label>
                    </labels>
                <created>Tue, 4 Dec 2012 11:35:02 +0000</created>
                <updated>Mon, 17 Dec 2012 14:07:03 +0000</updated>
                                    <version>2.2</version>
                                                <component>Documentation</component>
                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="19153" author="mpdude" created="Mon, 17 Dec 2012 14:07:03 +0000"  >&lt;p&gt;An additional observation:&lt;/p&gt;

&lt;p&gt;If you eager-load a collection using WITH, for the resulting entities that collection is marked as initialized as described above.&lt;/p&gt;

&lt;p&gt;Should you happen to come across the same entity during hydration in another (later) context where you explicitly eager load the same association &lt;b&gt;without&lt;/b&gt; the WITH restriction (or with another one), the collection on that (existing) entity won&apos;t be re-initialized and still contains the associated objects found during the first query.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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


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

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

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

<item>
            <title>[DDC-2141] Query should not be final</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2141</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The Query class should not be marked final as this makes it impossible to Mock it.&lt;/p&gt;
</description>
                <environment>All</environment>
            <key id="14219">DDC-2141</key>
            <summary>Query should not be final</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="tarjei">Tarjei Huse</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Nov 2012 09:59:23 +0000</created>
                <updated>Tue, 13 Nov 2012 09:59:23 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1099] Tutorial :: Getting started code sample entity manager</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1099</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;see pull request 24 on github.com&lt;/p&gt;</description>
                <environment></environment>
            <key id="12529">DDC-1099</key>
            <summary>Tutorial :: Getting started code sample entity manager</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="gimler">Gordon Franke</reporter>
                        <labels>
                    </labels>
                <created>Mon, 4 Apr 2011 05:53:22 +0000</created>
                <updated>Mon, 11 Jul 2011 17:44:40 +0000</updated>
                                    <version>Git Master</version>
                                                <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16148" author="mridgway" created="Mon, 11 Jul 2011 17:44:40 +0000"  >&lt;p&gt;This issue should be closed: &lt;a href=&quot;https://github.com/doctrine/orm-documentation/pull/24&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/orm-documentation/pull/24&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1088] Description for SequenceGenerator annotation options is wrong</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1088</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;On paragraph 4.8.1.1 SequenceGenerator, the correct example should be:&lt;/p&gt;

&lt;p&gt;&amp;lt;?php&lt;br/&gt;
class User {&lt;br/&gt;
    /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@Id&lt;/li&gt;
	&lt;li&gt;@GeneratedValue(strategy=&quot;SEQUENCE&quot;)&lt;/li&gt;
	&lt;li&gt;@SequenceGenerator(sequenceName=&quot;tablename_seq&quot;, initialValue=1, allocationSize=100)&lt;br/&gt;
     */&lt;br/&gt;
    protected $id = null;&lt;br/&gt;
}&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment>N/A</environment>
            <key id="12514">DDC-1088</key>
            <summary>Description for SequenceGenerator annotation options is wrong</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="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="iksela">Alexandre Mathieu</reporter>
                        <labels>
                    </labels>
                <created>Wed, 30 Mar 2011 04:55:17 +0000</created>
                <updated>Wed, 30 Mar 2011 04:55:17 +0000</updated>
                                    <version>2.x</version>
                                                <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1089] Annotations reference examples are inaccurate and confusing</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1089</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In chapter 19 of the reference guide some coding examples seem to be inaccurate or incorrect. Especially when it comes to the bidirectional many-to-many associations, this might be confusing.&lt;/p&gt;

&lt;p&gt;Example:&lt;br/&gt;
The code fragment on &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.0/en/reference/annotations-reference.html#annref-manytomany&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/reference/annotations-reference.html#annref-manytomany&lt;/a&gt; has the following issues:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;it does not include class declarations although the collections associated are both mentioned. It should be clear to which target entity they belong and therefore their classes should be declared.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;from the context it seems that the associated classes should probably be User and Group, and the owning side is User. So the association should probably be inversed by &apos;users&apos;, although the example mentions &apos;features&apos;.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;the mapping for the inverse side maps a collection called $features, although this should probably be $users. Also the class declaration for the Group class is missing.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Some other code fragments in chapter 19 have similar issues. I think they could easily be replaced by the examples from the earlier chapters, like for the bidirectional man-to-many association the example from chapter 5:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.0/en/reference/association-mapping.html#many-to-many-bidirectional&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/reference/association-mapping.html#many-to-many-bidirectional&lt;/a&gt;&lt;/p&gt;</description>
                <environment>N.A.</environment>
            <key id="12515">DDC-1089</key>
            <summary>Annotations reference examples are inaccurate and confusing</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="mvl">Maarten van Leeuwen</reporter>
                        <labels>
                    </labels>
                <created>Wed, 30 Mar 2011 05:38:14 +0000</created>
                <updated>Wed, 30 Mar 2011 06:00:37 +0000</updated>
                                                                    <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1072] Private property mapping can cause issues, suggest changing to protected</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1072</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The documentation recommends using private variables in entities. This can be problematic on entities with relations when using caching drivers as the proxy objects cannot access private variables and so the caching driver can throw notices like &lt;/p&gt;

&lt;p&gt;...apc_store(): &quot;_id&quot; returned as member variable from __sleep() but &lt;br/&gt;
does not exist in ... &lt;/p&gt;

&lt;p&gt;Making member variables protected resolves this issue when caching is enabled.&lt;/p&gt;

&lt;p&gt;This information would be helpful on the documentation so others can be made aware of this issue. We spent a few days trying to debug the issue before understanding exactly what was going on.&lt;/p&gt;</description>
                <environment>not applicable</environment>
            <key id="12474">DDC-1072</key>
            <summary>Private property mapping can cause issues, suggest changing to protected</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="kevbradwick">Kevin Bradwick</reporter>
                        <labels>
                    </labels>
                <created>Thu, 17 Mar 2011 12:59:02 +0000</created>
                <updated>Thu, 17 Mar 2011 12:59:02 +0000</updated>
                                    <version>2.0.2</version>
                                                <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1738] Allow multiple Generators per class</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1738</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;We should be able to support multiple generators per class.&lt;br/&gt;
When doing partition per table, the partitioned column must be part of PK, which may enter in our limitation.&lt;/p&gt;

&lt;p&gt;Currently we only support 1 generator per class.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13576">DDC-1738</key>
            <summary>Allow multiple Generators per class</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Thu, 29 Mar 2012 21:54:27 +0000</created>
                <updated>Thu, 20 Sep 2012 06:20:48 +0000</updated>
                                    <version>Git Master</version>
                                <fixVersion>2.4</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-1732] Unserialized non-initialized proxy classes should throw an exception when a method is called</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1732</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When we serialize entities in a session, we often have pointers to uninitialized proxies.&lt;br/&gt;
These proxies have $_entityPersister == null.&lt;/p&gt;

&lt;p&gt;The problem is that if you happen to call by mistake a method on such a proxy, you&apos;re not aware that this is an uninitialized proxy, and the business methods are called, with null values for every property.&lt;/p&gt;

&lt;p&gt;I think the proxy should throw an exception in that case.&lt;br/&gt;
Attached, a patch with the proposed modification.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13568">DDC-1732</key>
            <summary>Unserialized non-initialized proxy classes should throw an exception when a method is called</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="benjamin">Benjamin Morel</reporter>
                        <labels>
                    </labels>
                <created>Wed, 28 Mar 2012 19:29:13 +0000</created>
                <updated>Wed, 28 Mar 2012 19:29:13 +0000</updated>
                                    <version>2.2</version>
                <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                                <attachments>
                    <attachment id="11173" name="ProxyFactory.php.patch" size="679" author="benjamin" created="Wed, 28 Mar 2012 19:29:13 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1728] There is no exact alternative function like MONTH in mysql </title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1728</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;i am not able to extract only month from the date field using doctrine2 using &apos;MONTH&apos; function&lt;/p&gt;</description>
                <environment>Ubuntu 11.10</environment>
            <key id="13563">DDC-1728</key>
            <summary>There is no exact alternative function like MONTH in mysql </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="sudheeshms1">Sudheesh MS</reporter>
                        <labels>
                    </labels>
                <created>Tue, 27 Mar 2012 13:44:12 +0000</created>
                <updated>Tue, 27 Mar 2012 13:44:12 +0000</updated>
                                    <version>2.2.0-RC1</version>
                <version>2.2</version>
                <version>2.2.1</version>
                                                <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1729] Translate queries into graphs of value objects (instead of array hydration?)</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1729</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In decoupled applications the model layer returns &quot;data-transfer-objects&quot; through the boundary into the controller/view layer. It would make sense to have Doctrine directly generate any data-transfer/value-object from native and dql queries.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13564">DDC-1729</key>
            <summary>Translate queries into graphs of value objects (instead of array hydration?)</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 27 Mar 2012 22:35:35 +0000</created>
                <updated>Sat, 9 Jun 2012 11:26:40 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="18067" author="beberlei" created="Sat, 9 Jun 2012 11:26:40 +0000"  >&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;$dql = &quot;SELECT &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; CustomerAddressView(c.id, c.name, a.id, a.street, a.number, a.city, a.code)
             FROM Customer c INNER JOIN c.address a WHERE c.id = ?1&quot;;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This supersedes &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1819&quot; title=&quot;Allow ResultSetMapping to be used for objects that are not entities&quot;&gt;DDC-1819&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;1. One additional property in ResultSetMapping =&amp;gt; $viewModelClass?&lt;br/&gt;
2. Changes to Parser (new ... syntax)&lt;br/&gt;
3. Changes to sQL Walker?&lt;br/&gt;
4. Changes to Hydration (Only object hydration!)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1721] LIKE clausule should accept functions on the pattern</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1721</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Example:&lt;br/&gt;
SELECT .... WHERE upper(n.title) LIKE upper(:filter)&lt;/p&gt;

&lt;p&gt;should be a valid SQL, now is rejected because the walker only accept a variable or an string expression.&lt;/p&gt;

&lt;p&gt;I&apos;m adding a patch to address this.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13548">DDC-1721</key>
            <summary>LIKE clausule should accept functions on the pattern</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="ignaciolarranaga">Ignacio Larranaga</reporter>
                        <labels>
                    </labels>
                <created>Wed, 21 Mar 2012 17:40:33 +0000</created>
                <updated>Thu, 24 Jan 2013 18:06:45 +0000</updated>
                                    <version>2.1.6</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="17625" author="ignaciolarranaga" created="Wed, 21 Mar 2012 19:30:31 +0000"  >&lt;p&gt;Sorry the Parser has to be modified also to allow expressions to be recognized, I&apos;m attaching the necessary patch.&lt;/p&gt;</comment>
                    <comment id="17626" author="beberlei" created="Thu, 22 Mar 2012 19:31:32 +0000"  >&lt;p&gt;I am sure there is a reason why the walker doesn&apos;t accept this such as not all supported vendors allowing functions in right hand side LIKE expressions, but i am not sure about this.&lt;/p&gt;</comment>
                    <comment id="18764" author="darkangel" created="Wed, 3 Oct 2012 09:46:44 +0000"  >&lt;p&gt;This is not possible either:&lt;/p&gt;

&lt;p&gt;WHERE CASE WHEN p.name IS NULL THEN u.username ELSE p.name END LIKE :name&lt;/p&gt;</comment>
                    <comment id="19403" author="thomas303" created="Thu, 24 Jan 2013 18:06:45 +0000"  >&lt;p&gt;In my case it worked when using &quot;=&quot; instead of &quot;LIKE&quot;.&lt;/p&gt;

&lt;p&gt;//works:&lt;br/&gt;
(CASE WHEN (Book.id = BookFrom.id) THEN BookTo.displayName ELSE BookFrom.displayName END) = :name&lt;/p&gt;

&lt;p&gt;//&lt;span class=&quot;error&quot;&gt;&amp;#91;Syntax Error&amp;#93;&lt;/span&gt; line 0, col 1217: Error: Expected =, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, &amp;gt;, &amp;gt;=, !=, got &apos;LIKE&apos; &lt;br/&gt;
(CASE WHEN (Book.id = BookFrom.id) THEN BookTo.displayName ELSE BookFrom.displayName END) LIKE :name&lt;/p&gt;

&lt;p&gt;So the LIKE operator only needs to be allowed here.&lt;/p&gt;

&lt;p&gt;I&apos;m wondering which vendor should not be able to handle that:&lt;br/&gt;
The CASE WHEN ... THEN ... END is documented in DQL, and allowed.&lt;br/&gt;
LIKE itself is allowed.&lt;br/&gt;
If an RDBMs cannot use CASE WHEN and LIKE in combination, this would be a strange limitation.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11172" name="Parser.patch" size="847" author="ignaciolarranaga" created="Wed, 21 Mar 2012 19:30:31 +0000" />
                    <attachment id="11171" name="SqlWalker.patch" size="891" author="ignaciolarranaga" created="Wed, 21 Mar 2012 17:40:33 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

<item>
            <title>[DDC-1714] Prevent inverse side lazy loading owning side of the oneToOne relationsip if owning side&apos;s id is an assosiationKey of inversed side</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1714</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue was originally discussed in &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-357&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-357&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Say there is User and UserData with oneToOne bidirectional relationship. When we fetch User objects, UserData is lazy loaded right away. &lt;/p&gt;

&lt;p&gt;If we were to set UserData &apos;s id as asssosiationKey of User, then user_id becomes the id of UserData and User object can already know that UserData owning side&apos;s id will equal it&apos;s own User-&amp;gt;id.&lt;/p&gt;

&lt;p&gt;Can this be implemented?&lt;/p&gt;</description>
                <environment></environment>
            <key id="13540">DDC-1714</key>
            <summary>Prevent inverse side lazy loading owning side of the oneToOne relationsip if owning side&apos;s id is an assosiationKey of inversed side</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="dwalter">David</reporter>
                        <labels>
                    </labels>
                <created>Sun, 18 Mar 2012 23:56:32 +0000</created>
                <updated>Sun, 18 Mar 2012 23:56:32 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1720] SqlWalter private variables should be protected to allow walker extensions</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1720</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;m attaching a patch with the suggestion.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13547">DDC-1720</key>
            <summary>SqlWalter private variables should be protected to allow walker extensions</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="ignaciolarranaga">Ignacio Larranaga</reporter>
                        <labels>
                    </labels>
                <created>Wed, 21 Mar 2012 16:44:52 +0000</created>
                <updated>Wed, 21 Mar 2012 16:45:25 +0000</updated>
                                    <version>2.1.6</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11170" name="SqlWalker.patch" size="2632" author="ignaciolarranaga" created="Wed, 21 Mar 2012 16:44:52 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1698] Inconsistent proxy file name &amp; namespace result in __PHP_Incomplete_Class when unserializing entities</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1698</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.&lt;br/&gt;
For example, a class named &lt;b&gt;Application\Model\User&lt;/b&gt; creates the following proxy class:&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;Application\Proxy\__CG__\Application\Model\User
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This class is located in the following file:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;Application/Proxy/__CG__ApplicationModelUser.php
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But whe we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;Application/Proxy/__CG__/Application/Model/User.php
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But it is not.&lt;br/&gt;
As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.&lt;/p&gt;

&lt;p&gt;I&apos;m not sure whether this is an intended behavior, but I would assume this is a bug.&lt;/p&gt;</description>
                <environment>Irrelevant</environment>
            <key id="13521">DDC-1698</key>
            <summary>Inconsistent proxy file name &amp; namespace result in __PHP_Incomplete_Class when unserializing entities</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="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="benjamin">Benjamin Morel</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Mar 2012 00:11:42 +0000</created>
                <updated>Sun, 6 Jan 2013 13:18:41 +0000</updated>
                                    <version>2.2</version>
                <version>2.2.1</version>
                                <fixVersion>2.2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="17561" author="benjamin" created="Tue, 13 Mar 2012 16:46:38 +0000"  >&lt;p&gt;It looks like there is an even broader problem with the new _&lt;em&gt;CG&lt;/em&gt;_ prefix; the PSR-0 standard for autoloading states that the underscores should be handled this way:&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;\namespace\package\Class_Name =&amp;gt; {...}/namespace/package/Class/Name.php
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Which means that in the above example, it could even expect the file to be located in:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;Application/Proxy///CG///Application/Model/User.php
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;... which is far away from the actual location.&lt;br/&gt;
Upgrade to 2.2 broke this code, for us.&lt;/p&gt;</comment>
                    <comment id="17565" author="beberlei" created="Wed, 14 Mar 2012 18:30:24 +0000"  >&lt;p&gt;Proxy classes do not follow PSR-0. For the case unserializing objects we should provide an extra autoloader i guess.&lt;/p&gt;

&lt;p&gt;See here how symfony does it &lt;a href=&quot;https://github.com/doctrine/DoctrineBundle/blob/master/DoctrineBundle.php#L57&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/DoctrineBundle/blob/master/DoctrineBundle.php#L57&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17566" author="beberlei" created="Wed, 14 Mar 2012 19:12:07 +0000"  >&lt;p&gt;See &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/9b4d60897dfc7e9b165712428539e694ec596c80&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/9b4d60897dfc7e9b165712428539e694ec596c80&lt;/a&gt; and &lt;a href=&quot;https://github.com/doctrine/orm-documentation/commit/01381fae1ff3d4944086c7cfe46721925bf6ca15&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/orm-documentation/commit/01381fae1ff3d4944086c7cfe46721925bf6ca15&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17589" author="benjamin" created="Wed, 14 Mar 2012 22:36:59 +0000"  >&lt;p&gt;Thanks for the quick fix, Benjamin.&lt;br/&gt;
However, I have to admit that I&apos;m not fully happy with the fix, as we (and probably many others) are not using the Doctrine autoloader.&lt;br/&gt;
I supposed that the purpose of PSR-0 was precisely not to be tied to a particular autoloader implementation, and this benefit is lost with this version of Doctrine.&lt;/p&gt;

&lt;p&gt;You mentioned in the doc that the proxies are not PSR-0 compliant &quot;for implementation reasons&quot;; as this was working fine before 2.2, could you please explain what requirement prevents Doctrine from keeping the previous naming convention?&lt;/p&gt;</comment>
                    <comment id="17671" author="beberlei" created="Thu, 29 Mar 2012 09:56:11 +0000"  >&lt;p&gt;In 2.1 the proxies are not PSR-0 compatible themselves, however their class naming is simpler.&lt;/p&gt;

&lt;p&gt;In 2.2 we changed proxy names so that you can derive the original name of the proxy by searching for the _&lt;em&gt;CG&lt;/em&gt;_ flag. This flag obviously contains the __ chars that some PSR autoloaders detect as directory seperators. I agree this is an unfortunate decision, but it was done this way.&lt;/p&gt;

&lt;p&gt;I do think however that we can automatically register the proxy atuoloader (if not yet done)  in EntityManager#create(). This would hide this fact from developers automatically.&lt;/p&gt;</comment>
                    <comment id="18898" author="benjamin" created="Mon, 29 Oct 2012 21:37:00 +0000"  >&lt;p&gt;@Benjamin Eberlei&lt;br/&gt;
In 2.3 we still have to manually call Autoloader::register() before unserializing entities that may contain proxies.&lt;br/&gt;
So EntityManager::create() still doesn&apos;t register it. Is there a plan to add this feature?&lt;/p&gt;</comment>
                    <comment id="19231" author="beberlei" created="Sun, 6 Jan 2013 10:10:22 +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; Not at the moment, seems too dangerous for me since it might produce race conditions. This should really be done in the bootstrap of the system.&lt;/p&gt;

&lt;p&gt;We need to document this though.&lt;/p&gt;</comment>
                    <comment id="19234" author="benjamin" created="Sun, 6 Jan 2013 13:18:41 +0000"  >&lt;p&gt;Ok, thanks for your answer!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1702] EBNF for IN expressions should be updated for 2.2</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1702</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Following the changes made for &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1472&quot; title=&quot;WHERE &amp;lt;&amp;lt;function&amp;gt;&amp;gt; IN ... doesn&amp;#39;t work&quot;&gt;&lt;del&gt;DDC-1472&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1416&quot; title=&quot;bug in simple test with sub query&quot;&gt;&lt;del&gt;DDC-1416&lt;/del&gt;&lt;/a&gt;, the EBNF for InExpression should have been updated. It now takes an ArithmeticExpression instead of a SingleValuePathExpression.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13525">DDC-1702</key>
            <summary>EBNF for IN expressions should be updated for 2.2</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="pschwisow">Patrick Schwisow</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Mar 2012 17:40:48 +0000</created>
                <updated>Tue, 13 Mar 2012 17:45:54 +0000</updated>
                                    <version>2.2</version>
                                                <component>Documentation</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="17563" author="pschwisow" created="Tue, 13 Mar 2012 17:45:54 +0000"  >&lt;p&gt;I marked this as &quot;Major&quot; because this change represents a BC break.  Because EBNF was not updated, I initially believed this to be a bug in ORM and wasted a lot of time debugging Doctrine code before I discovered this change was intentional.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-763] Cascade merge on associated entities can insert too many rows through &quot;Persistence by Reachability&quot;</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-763</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I think that the UnitOfWork needs to maintain a map of spl_object_hash($newEntity)-&amp;gt;$managedEntity for entities that were persisted via reachability during a merge.  doMerge should then only call persistNew if the original entity has not already been persisted (if it has already been persisted it should merge the managed entity from the map).  The map should be maintained until a flush() or until the UnitOfWork is cleared.  The reasoning is as follows.&lt;/p&gt;

&lt;p&gt;Imagine we have a simple doctor object with no associations:&lt;/p&gt;

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

&lt;p&gt;After the first persist() $doctor is MANAGED so the second persist has no effect and this results in a single Doctor row.&lt;/p&gt;

&lt;p&gt;If we do the same thing using merge and persistence by reachability:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$doctor = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Doctor();
$em-&amp;gt;merge($doctor);
$em-&amp;gt;merge($doctor);
$em-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;we get 2 Doctor rows being added.&lt;/p&gt;

&lt;p&gt;Obviously in this particular case we should use the return value from the first merge() as the parameter of the second merge which would give correct behaviour.&lt;/p&gt;

&lt;p&gt;However, now imagine one Doctor has many Patients and many Patients have one Doctor, all the associations have cascade merge enabled, and further assume that $d1 (Doctor id=1) is already in the database.  We now attempt to create two patients and assign them to the existing doctor:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$d1= &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Doctor(); $d1-&amp;gt;id = 1; &lt;span class=&quot;code-comment&quot;&gt;// This is a DETACHED entity
&lt;/span&gt;
$p1 = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Patient();
$p2 = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Patient();

$d1-&amp;gt;patients-&amp;gt;add($p1); $p1-&amp;gt;doctor = $d1;
$d1-&amp;gt;patients-&amp;gt;add($p2); $p2-&amp;gt;doctor = $d1;

$em-&amp;gt;merge($p1);
$em-&amp;gt;merge($p2);

$em-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This actually results in 4 rows being added to the &apos;patients&apos; table instead of 2, I think because $p1 and $p2 are getting persisted both as the root objects and then again from the patient-&amp;gt;doctor-&amp;gt;patients array.  Since the cascade merging happens internally we can&apos;t replace the array contents with the managed return values without walking through the object graph (in which case there is no point in using cascade merge in the first place).  Maintaining a map in UnitOfWork will allow doMerge to ensure it doesn&apos;t persist the same entities twice.&lt;/p&gt;

&lt;p&gt;I&apos;m not sure, but this might be relevant for cascade persist too.&lt;/p&gt;

&lt;p&gt;P.S. Another bug report on this can be found at &lt;a href=&quot;http://code.google.com/p/flextrine2/issues/detail?id=32&quot; class=&quot;external-link&quot;&gt;http://code.google.com/p/flextrine2/issues/detail?id=32&lt;/a&gt; (it basically says the same thing with different entities).&lt;/p&gt;</description>
                <environment></environment>
            <key id="11812">DDC-763</key>
            <summary>Cascade merge on associated entities can insert too many rows through &quot;Persistence by Reachability&quot;</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="ccapndave">Dave Keen</reporter>
                        <labels>
                    </labels>
                <created>Mon, 23 Aug 2010 05:55:30 +0000</created>
                <updated>Mon, 4 Jul 2011 21:47:46 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="14135" author="beberlei" created="Sun, 29 Aug 2010 04:59:05 +0000"  >&lt;p&gt;@Roman A possible fix for this in my opinion is another map in UnitOfWork $mergedEntities = array(); and a patch 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;diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php
index 242d84b..1d0d8b3 100644
--- a/lib/Doctrine/ORM/UnitOfWork.php
+++ b/lib/Doctrine/ORM/UnitOfWork.php
@@ -1340,6 +1340,10 @@ class UnitOfWork &lt;span class=&quot;code-keyword&quot;&gt;implements&lt;/span&gt; PropertyChangedListener
             &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt;; &lt;span class=&quot;code-comment&quot;&gt;// Prevent infinite recursion
&lt;/span&gt;         }
 
+        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;mergedEntities[$oid])) {
+            &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;mergedEntities[$oid];
+        }
+
         $visited[$oid] = $entity; &lt;span class=&quot;code-comment&quot;&gt;// mark visited
&lt;/span&gt; 
         $class = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;getClassMetadata(get_class($entity));
@@ -1468,6 +1472,8 @@ class UnitOfWork &lt;span class=&quot;code-keyword&quot;&gt;implements&lt;/span&gt; PropertyChangedListener
 
         $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;cascadeMerge($entity, $managedCopy, $visited);
 
+        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;mergedEntities[$oid] = $managedCopy;
+
         &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $managedCopy;
     }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="14139" author="ccapndave" created="Sun, 29 Aug 2010 05:38:51 +0000"  >&lt;p&gt;I have tested this patch with my application and it fixes the problem in all my relevant test cases apart from one.  The test case that&apos;s failing is one that persists a bi-directional many to many relationship, so the associations interweave with each other (if you know what I mean).&lt;/p&gt;

&lt;p&gt;I wonder if perhaps doMerge need to continue cascading even if it finds an item in $this-&amp;gt;mergedEntities&lt;/p&gt;

&lt;p&gt;This is the Flextrine code that fails - it results in no entries in movie_artist.  This might also be related to &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-758&quot; title=&quot;When merging many to many entites back into the repository changes to the associations are not respected&quot;&gt;&lt;del&gt;DDC-758&lt;/del&gt;&lt;/a&gt;?&lt;/p&gt;

&lt;p&gt;m1 = new Movie();&lt;br/&gt;
m1.title = &quot;Movie 1&quot;;&lt;/p&gt;

&lt;p&gt;m2 = new Movie();&lt;br/&gt;
m2.title = &quot;Movie 2&quot;;&lt;/p&gt;

&lt;p&gt;a1 = new Artist();&lt;br/&gt;
a1.name = &quot;Artist 1&quot;;&lt;/p&gt;

&lt;p&gt;a2 = new Artist();&lt;br/&gt;
a2.name = &quot;Artist 2&quot;;&lt;/p&gt;

&lt;p&gt;m1.artists.addItem(a1); a1.movies.addItem(m1);&lt;br/&gt;
m1.artists.addItem(a2); a2.movies.addItem(m1);&lt;/p&gt;

&lt;p&gt;m2.artists.addItem(a1); a1.movies.addItem(m2);&lt;br/&gt;
m2.artists.addItem(a2); a2.movies.addItem(m2);&lt;/p&gt;

&lt;p&gt;// These translate to cascade merges on the server &lt;br/&gt;
em.persist(m1);&lt;br/&gt;
em.persist(m2);&lt;br/&gt;
em.persist(a1);&lt;br/&gt;
em.persist(a2);&lt;/p&gt;

&lt;p&gt;// Now flush&lt;br/&gt;
em.flush();&lt;/p&gt;</comment>
                    <comment id="14140" author="ccapndave" created="Sun, 29 Aug 2010 05:40:26 +0000"  >&lt;p&gt;P.S. This test passes if I translate em.persist() to $em-&amp;gt;persist() (not cascading) on the server instead of translating it to a cascade merge; not sure if that helps&lt;/p&gt;</comment>
                    <comment id="14149" author="romanb" created="Mon, 30 Aug 2010 06:17:09 +0000"  >&lt;p&gt;I&apos;d really like to avoid introducing an additional instance variable just to solve this issue but I did not find the time yet to really look into it.&lt;/p&gt;

&lt;p&gt;Does someone have a unit test for this already and can attach it to the issue? &lt;/p&gt;</comment>
                    <comment id="14198" author="romanb" created="Tue, 31 Aug 2010 14:56:58 +0000"  >&lt;p&gt;Rescheduling for RC1.&lt;/p&gt;</comment>
                    <comment id="14356" author="ccapndave" created="Mon, 13 Sep 2010 07:27:17 +0000"  >&lt;p&gt;Here is a functional test case containing three tests:&lt;/p&gt;

&lt;p&gt;testMultiMerge tests basic merging of two new entities, checking that only a single entity ends up in the database.  This passes with Benjamin&apos;s patch.&lt;/p&gt;

&lt;p&gt;testMultiCascadeMerge tests the more complex case of merging a OneToMany association. This also passes with Benjamin&apos;s patch.&lt;/p&gt;

&lt;p&gt;testManyToManyPersistByReachability tests the ManyToMany case described above and this fails with Benjamin&apos;s patch, probably because doMerge doesn&apos;t cascade down entities that it has already merged and some ManyToMany associations are being ignored.  Its a bit hard to be certain what is causing this as even without Benjamin&apos;s patch this test would fail due to &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-758&quot; title=&quot;When merging many to many entites back into the repository changes to the associations are not respected&quot;&gt;&lt;del&gt;DDC-758&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    <comment id="14397" author="beberlei" created="Wed, 15 Sep 2010 16:38:30 +0000"  >&lt;p&gt;@Roman i thought about this issue, its not possible without that additional map of merged entities. There is no way we can get that information from other sources. &lt;/p&gt;

&lt;p&gt;Problem is rather that the use-case probably only applies in mass-merging scenarios and client-server serialization.&lt;/p&gt;</comment>
                    <comment id="14442" author="ccapndave" created="Tue, 21 Sep 2010 19:48:39 +0000"  >&lt;p&gt;Added another failing test case - adding the same entity from different ends of a many to many bi-directional association to check that there isn&apos;t an integrity constraint violation caused by Doctrine trying to add the same row twice.&lt;/p&gt;</comment>
                    <comment id="14443" author="ccapndave" created="Tue, 21 Sep 2010 20:14:42 +0000"  >&lt;p&gt;Attached a patch for this issue.&lt;/p&gt;</comment>
                    <comment id="14444" author="beberlei" created="Wed, 22 Sep 2010 03:13:36 +0000"  >&lt;p&gt;can you comment why all the additionall stuff is necessary compared to my patch?&lt;/p&gt;</comment>
                    <comment id="14445" author="ccapndave" created="Wed, 22 Sep 2010 06:05:40 +0000"  >&lt;p&gt;It fixes the two additional test cases - testManyToManyPersistByReachability and testManyToManyDuplicatePersistByReachability.&lt;/p&gt;

&lt;p&gt;testManyToManyPersistByReachability was failing with your original patch because there are ManyToMany cases where an entity may have already been merged, but its still necessary to add it to an association and continue to cascade.  Running the following with the original patch will miss out some of the associations.&lt;/p&gt;

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

$m2 = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Movie();
$m2-&amp;gt;title = &lt;span class=&quot;code-quote&quot;&gt;&quot;Movie 2&quot;&lt;/span&gt;;

$a1 = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Artist();
$a1-&amp;gt;name = &lt;span class=&quot;code-quote&quot;&gt;&quot;Artist 1&quot;&lt;/span&gt;;

$a2 = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Artist();
$a2-&amp;gt;name = &lt;span class=&quot;code-quote&quot;&gt;&quot;Artist 2&quot;&lt;/span&gt;;

$m1-&amp;gt;artists-&amp;gt;add($a1); $a1-&amp;gt;movies-&amp;gt;add($m1);
$m1-&amp;gt;artists-&amp;gt;add($a2); $a2-&amp;gt;movies-&amp;gt;add($m1);
$m2-&amp;gt;artists-&amp;gt;add($a1); $a1-&amp;gt;movies-&amp;gt;add($m2);
$m2-&amp;gt;artists-&amp;gt;add($a2); $a2-&amp;gt;movies-&amp;gt;add($m2);

$em-&amp;gt;merge($a1);
$em-&amp;gt;merge($a2);
$em-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The other change in my patch is to protect against this case.  It ensures that the following code doesn&apos;t add the same entity twice to a collection.&lt;/p&gt;

&lt;div class=&quot;code panel&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;merge($m1);
$em-&amp;gt;merge($m2);
$em-&amp;gt;merge($a2);
$em-&amp;gt;merge($a2);
$em-&amp;gt;flush();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="14627" author="beberlei" created="Sun, 31 Oct 2010 02:19:03 +0000"  >&lt;p&gt;I am not sure if the issue here is rather multiple calls to merge that contain different parts of the same object-graph.&lt;/p&gt;

&lt;p&gt;There should be a very simple fix for this, call -&amp;gt;clear() after each merge.&lt;/p&gt;

&lt;p&gt;I am not sure if this patch drags us into a blackhole of issues with merging.&lt;/p&gt;</comment>
                    <comment id="14649" author="ccapndave" created="Sun, 31 Oct 2010 08:48:37 +0000"  >&lt;p&gt;Calling -&amp;gt;clear() and -&amp;gt;flush() after each merge is a workaround for the simple case, but unless I am misunderstanding I don&apos;t think its a solution for cases where the merging is happening automatically in cascadeMerge.  I&apos;ve actually encountered this issue in another project and scenario to do with creating REST APIs and merging JSON objects into entities, and applying the patch fixed it so a) I think this issue might be a more common that we first thought and b) the patch basically seems to work (plus it doesn&apos;t introduce any failing cases in the existing test suite).  I can actually still find one edge case to do with cascading merging interlinked many to many associations that this doesn&apos;t fix, but I was planning to open that as a new ticket after this   My feeling is that the current merge already has issues and this definitely improves it.&lt;/p&gt;</comment>
                    <comment id="14652" author="beberlei" created="Mon, 1 Nov 2010 02:45:36 +0000"  >&lt;p&gt;It cannot happen inside a single merge, single merges use the $visited to avoid infinite recursions, each entity can only be merged once inside a single merge operation.&lt;/p&gt;</comment>
                    <comment id="14713" author="beberlei" created="Wed, 10 Nov 2010 17:50:54 +0000"  >&lt;p&gt;Added a note into the documentation about using EntityManager#clear between merging of entities which share subgraphs and cascade merge.&lt;/p&gt;

&lt;p&gt;Handling this issue in UnitOfwork will be declared an improvement, not a bug anymore and be scheduled for later releases. The required changes to the core are to dangerous and big.&lt;/p&gt;</comment>
                    <comment id="14714" author="ccapndave" created="Thu, 11 Nov 2010 03:49:15 +0000"  >&lt;p&gt;Where in the docs is that?&lt;/p&gt;

&lt;p&gt;Just to summarize, the equivalent operation to having multiple merges and a single flush is to call merge followed by flush each time, with the whole thing surrounded by a transaction?  Does this have a big impact on performance?&lt;/p&gt;</comment>
                    <comment id="14715" author="ccapndave" created="Thu, 11 Nov 2010 04:49:18 +0000"  >&lt;p&gt;Ben - even given the decision not to implement this (and I do understand your thinking, as it is a major change), is there any reason not to implement the bit that ensures that the same entity isn&apos;t added to a collection twice during a merge?  I can&apos;t think of a situation where this should be allowed, and I have a use case where I get &apos;DUPLICATE KEY&apos; errors if this isn&apos;t there.&lt;/p&gt;

&lt;p&gt;Please see attached patch.&lt;/p&gt;</comment>
                    <comment id="14716" author="beberlei" created="Thu, 11 Nov 2010 06:35:37 +0000"  >&lt;p&gt;What bit of that huge patch is that? Can you extract it into another ticket if thats possible?&lt;/p&gt;</comment>
                    <comment id="14717" author="beberlei" created="Thu, 11 Nov 2010 06:36:52 +0000"  >&lt;p&gt;I added it to &quot;Working with Objects&quot; and the descripton of Merge. Its not yet live on the site.&lt;/p&gt;

&lt;p&gt;Using this current workaround has a performance impact, since more SELECT statements have to be issued against the database. &lt;/p&gt;</comment>
                    <comment id="14718" author="ccapndave" created="Thu, 11 Nov 2010 08:30:42 +0000"  >&lt;p&gt;Apologies for not being clear - only the 3rd patch (multipleaddmerge.diff) is relevant to the &apos;DUPLICATE KEY&apos; error I am now talking about, but I&apos;ll put it in a nother ticket if you prefer.&lt;/p&gt;</comment>
                    <comment id="14719" author="beberlei" created="Thu, 11 Nov 2010 08:35:47 +0000"  >&lt;p&gt;please add a new ticket, patch looks good.&lt;/p&gt;</comment>
                    <comment id="14720" author="ccapndave" created="Thu, 11 Nov 2010 08:51:11 +0000"  >&lt;p&gt;Created as &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-875&quot; title=&quot;Merge can sometimes add the same entity twice into a collection&quot;&gt;&lt;del&gt;DDC-875&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10812" name="0149-DDC-763.patch" size="16017" author="ccapndave" created="Tue, 21 Sep 2010 20:14:42 +0000" />
                    <attachment id="10811" name="DDC763Test.php" size="6795" author="ccapndave" created="Tue, 21 Sep 2010 19:48:39 +0000" />
                    <attachment id="10858" name="multipleaddmerge.diff" size="1161" author="ccapndave" created="Thu, 11 Nov 2010 04:49:18 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-717] Do not use files when using proxy autogeneration</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-717</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Proxy classes are generated in less than 1ms for me. I prefer to not have a &quot;build&quot; step to reducing loading time by a milisecond, so I use autogenerate.&lt;/p&gt;

&lt;p&gt;For users like me, wouldn&apos;t it be nicer if we wouldn&apos;t even have to configure a proxy dir and those files were never written (since they&apos;re not read more than once anyway)?&lt;/p&gt;</description>
                <environment></environment>
            <key id="11676">DDC-717</key>
            <summary>Do not use files when using proxy autogeneration</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="jakajancar">Jaka Jancar</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Jul 2010 17:52:55 +0000</created>
                <updated>Mon, 4 Jul 2011 21:47:47 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="13668" author="jakajancar" created="Thu, 22 Jul 2010 18:32:00 +0000"  >&lt;p&gt;This very minimal patch removes the use of these temporary files:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;--- library/Doctrine/ORM/Proxy/ProxyFactory.php	(revision 2)
+++ library/Doctrine/ORM/Proxy/ProxyFactory.php	(working copy)
@@ -78,9 +78,8 @@
         $fqn = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_proxyNamespace . &apos;\\&apos; . $proxyClassName;
 
         &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;_autoGenerate &amp;amp;&amp;amp; ! class_exists($fqn, &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)) {
-            $fileName = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_proxyDir . DIRECTORY_SEPARATOR . $proxyClassName . &apos;.php&apos;;
-            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_generateProxyClass($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getClassMetadata($className), $proxyClassName, $fileName, self::$_proxyClassTemplate);
-            require $fileName;
+            $file = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_generateProxyClass($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getClassMetadata($className), $proxyClassName, &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;, self::$_proxyClassTemplate);
+            eval(&apos;?&amp;gt;&apos;.$file);
         }
 
         &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;_em-&amp;gt;getMetadataFactory()-&amp;gt;hasMetadataFor($fqn)) {
@@ -144,6 +143,9 @@
 
         $file = str_replace($placeholders, $replacements, $file);
 
+        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($fileName === &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
+            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $file;
+
         file_put_contents($fileName, $file);
     }
 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="13671" author="beberlei" created="Fri, 23 Jul 2010 03:14:30 +0000"  >&lt;p&gt;The proxy dir is used for the &quot;doctrine orm:generate-proxies&quot; command in the case of &quot;autogenerate= false&quot;, so you need to define it anyways.&lt;/p&gt;

&lt;p&gt;You have to use proxies, the option is not for Proxy yes/no. If you have autogenerate=false and doctrine requires a proxy for a use case but can&apos;t find it you will get a fatal error.&lt;/p&gt;</comment>
                    <comment id="13672" author="beberlei" created="Fri, 23 Jul 2010 03:15:54 +0000"  >&lt;p&gt;I just saw the eval() keyword, ieeks &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; It could maybe be a convenience option for those that don&apos;t want to use proxy direcotiries, however i am not sure.&lt;/p&gt;</comment>
                    <comment id="13675" author="jakajancar" created="Fri, 23 Jul 2010 03:22:32 +0000"  >&lt;p&gt;eval() is no different than writing code to a file and using require().&lt;/p&gt;

&lt;p&gt;When using runtime-generated proxies, there are no benefits (that I know of) from writing them to a file. The disadvantages are:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;slower because of write disk access&lt;/li&gt;
	&lt;li&gt;has problems with high concurrency, unless special care is taken (&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-716&quot; title=&quot;Proxy autogeneration fails with concurrent requests&quot;&gt;&lt;del&gt;DDC-716&lt;/del&gt;&lt;/a&gt;)&lt;/li&gt;
	&lt;li&gt;potentially has permission problems if code is executed by different users (e.g. nobody for a daemon and www-data for http)&lt;/li&gt;
	&lt;li&gt;requires setup of a writable directory&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This is a nicer patch, which makes _generateProxyClass() return a string, just like other _generate* methods:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;--- library/Doctrine/ORM/Proxy/ProxyFactory.php	(revision 2)
+++ library/Doctrine/ORM/Proxy/ProxyFactory.php	(working copy)
@@ -78,9 +78,8 @@
         $fqn = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_proxyNamespace . &apos;\\&apos; . $proxyClassName;
 
         &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;_autoGenerate &amp;amp;&amp;amp; ! class_exists($fqn, &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)) {
-            $fileName = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_proxyDir . DIRECTORY_SEPARATOR . $proxyClassName . &apos;.php&apos;;
-            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_generateProxyClass($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getClassMetadata($className), $proxyClassName, $fileName, self::$_proxyClassTemplate);
-            require $fileName;
+            $code = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_generateProxyClass($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;getClassMetadata($className), $proxyClassName);
+            eval($code);
         }
 
         &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;_em-&amp;gt;getMetadataFactory()-&amp;gt;hasMetadataFor($fqn)) {
@@ -107,19 +106,19 @@
         foreach ($classes as $class) {
             $proxyClassName = str_replace(&apos;\\&apos;, &apos;&apos;, $class-&amp;gt;name) . &apos;Proxy&apos;;
             $proxyFileName = $proxyDir . $proxyClassName . &apos;.php&apos;;
-            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_generateProxyClass($class, $proxyClassName, $proxyFileName, self::$_proxyClassTemplate);
+            $code = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_generateProxyClass($class, $proxyClassName);
+            file_put_contents($proxyFileName, &lt;span class=&quot;code-quote&quot;&gt;&quot;&amp;lt;?php\n&quot;&lt;/span&gt; . $code);
         }
     }
 
     /**
      * Generates a proxy class file.
      *
-     * @param $class
-     * @param $originalClassName
+     * @param ClassMetadata $class
      * @param $proxyClassName
-     * @param $file The path of the file to write to.
+     * @&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; string The code of the generated methods.
      */
-    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; function _generateProxyClass($class, $proxyClassName, $fileName, $file)
+    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; function _generateProxyClass(ClassMetadata $class, $proxyClassName)
     {
         $methods = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_generateMethods($class);
         $sleepImpl = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_generateSleep($class);
@@ -142,9 +141,9 @@
             $methods, $sleepImpl
         );
 
-        $file = str_replace($placeholders, $replacements, $file);
+        $file = str_replace($placeholders, $replacements, self::$_proxyClassTemplate);
 
-        file_put_contents($fileName, $file);
+        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $file;
     }
 
     /**
@@ -244,8 +243,7 @@
 
     /** Proxy class code template */
     &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; $_proxyClassTemplate =
-&apos;&amp;lt;?php
-
+&apos;
 namespace &amp;lt;namespace&amp;gt;;
 
 /**
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="13679" author="beberlei" created="Sat, 24 Jul 2010 06:21:53 +0000"  >&lt;p&gt;Scheduled usage of eval() for 2.1, if the following conditions exist:&lt;/p&gt;

&lt;p&gt;1. Autogenerate is set to TRUE&lt;br/&gt;
2. No Proxy Directory is configured.&lt;/p&gt;</comment>
                    <comment id="13681" author="jakajancar" created="Sat, 24 Jul 2010 06:26:14 +0000"  >&lt;p&gt;Great, this is even better. This way you can have 1) autogenerated in ram-only, 2) autogenerated in files and 3) pregenerated.&lt;/p&gt;

&lt;p&gt;And the minimal amount of config needed to get up and running is reduced, which is always nice.&lt;/p&gt;</comment>
                    <comment id="13682" author="beberlei" created="Sat, 24 Jul 2010 06:34:49 +0000"  >&lt;p&gt;you should know though, eval is dead slow. It generates the necessary proxies on EACH request and that cannot be cached in APC.&lt;/p&gt;</comment>
                    <comment id="13684" author="jakajancar" created="Sat, 24 Jul 2010 06:46:26 +0000"  >&lt;p&gt;It&apos;s no slower than current autogeneration (file_put_contents+require). TBH, I don&apos;t know why anyone would want to use that over eval(), but I don&apos;t mind it being there.&lt;/p&gt;

&lt;p&gt;Pre-generation is, of course, a different thing. Seems like a valid tradeoff to offer: build/a bit of config/better perfomance vs. no build/no config/potentially slower.&lt;/p&gt;</comment>
                    <comment id="13685" author="beberlei" created="Sat, 24 Jul 2010 07:52:39 +0000"  >&lt;p&gt;Yes, that is because file_put_contents + require is a development only strategy. The manual clearly states that autogenerate has to be false in production.&lt;/p&gt;</comment>
                    <comment id="13933" author="romanb" created="Thu, 12 Aug 2010 09:39:12 +0000"  >&lt;p&gt;Using eval() instead of producing and requiring the file in the case of enabled auto-generation of proxy classes sounds like a good improvement for 2.1 to make proxies more transparent during deveopment and for anyone for whom performance is no issue.&lt;/p&gt;

&lt;p&gt;I&apos;m increasing the priority as I think it is easy to implement for 2.1 and a good enhancement.&lt;/p&gt;</comment>
                    <comment id="15243" author="k-fish" created="Wed, 9 Feb 2011 04:09:51 +0000"  >&lt;p&gt;A note on why having the proxies written to a file can be useful even with autogenerate being on: it makes it really easy to check the proxy code being generated. I use that a lot currently.&lt;/p&gt;

&lt;p&gt;The solution suggested, giving three possibilities is cool, though.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-683] EntityManager#lock() on unitialized proxy coudl be optimized</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-683</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;If you call lock() on an unitiialized proxy, it would be possible to combine the fetch and lock in one operation. Is this feasible from a technical / workflow perspsective?&lt;/p&gt;</description>
                <environment></environment>
            <key id="11611">DDC-683</key>
            <summary>EntityManager#lock() on unitialized proxy coudl be optimized</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 10 Jul 2010 17:57:37 +0000</created>
                <updated>Wed, 21 Jul 2010 17:33:56 +0000</updated>
                                    <version>2.0-BETA2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="13651" author="beberlei" created="Wed, 21 Jul 2010 17:33:56 +0000"  >&lt;p&gt;Ok this is what refresh() with LOCK support is actually needed 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;    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function lock($entity, $lockMode, $lockVersion = &lt;span class=&quot;code-keyword&quot;&gt;null&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;getEntityState($entity) != self::STATE_MANAGED) {
            &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; InvalidArgumentException(&lt;span class=&quot;code-quote&quot;&gt;&quot;Entity is not MANAGED.&quot;&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; ($entity &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; Proxy &amp;amp;&amp;amp; $entity-&amp;gt;__isInitialized__) {
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;refresh(....); &lt;span class=&quot;code-comment&quot;&gt;// with LOCK!
&lt;/span&gt;        }
        ...
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                <outwardlinks description="relates to">
                            <issuelink>
            <issuekey id="11609">DDC-681</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-676] Find a way to test serialize/unserialize of all ClassMetadata properties in isolation</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-676</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;We should find a way, using PHPUnit Data Providers or anything else, to check the serialize/unserialize of every property in the ClassMetadata instance, since errors here can be very subtle but dangerous.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11604">DDC-676</key>
            <summary>Find a way to test serialize/unserialize of all ClassMetadata properties in isolation</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 10 Jul 2010 05:26:20 +0000</created>
                <updated>Sun, 29 Aug 2010 05:05:50 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-667] Lock Timeout Query Hint for DQL Queries</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-667</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;After the implementation of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-178&quot; title=&quot;Query Hint for LOCK mechanisms plus support in $em-&amp;gt;find()&quot;&gt;&lt;del&gt;DDC-178&lt;/del&gt;&lt;/a&gt; there is now only outstanding the support for locking queries based on a given timeout.&lt;/p&gt;

&lt;p&gt;This will be a DQL query feature only and be available via a query hint:&lt;/p&gt;

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

&lt;p&gt;It will be only working on Oracle.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11583">DDC-667</key>
            <summary>Lock Timeout Query Hint for DQL Queries</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 4 Jul 2010 08:40:43 +0000</created>
                <updated>Thu, 16 Sep 2010 15:20:18 +0000</updated>
                                    <version>2.0-BETA2</version>
                                <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14157" author="romanb" created="Mon, 30 Aug 2010 06:32:49 +0000"  >&lt;p&gt;If this is to be implemented for 2.0, it needs to happen for RC1, therefore rescheduling to RC1. Feel free to reschedule to 2.x if necessary.&lt;/p&gt;</comment>
                    <comment id="14407" author="beberlei" created="Thu, 16 Sep 2010 15:20:18 +0000"  >&lt;p&gt;Only oracle supports lock timeouts and no other vendor seems to plan to support it. I move to 2.x, but i guess this would rather be an issue of user extension.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-658] Reverse engineering with Oracle (DBDriver and Associations as Identifier)</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-658</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am playing with reverse engineering with Oracle and I have some problems:&lt;/p&gt;

&lt;p&gt;My schema:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;drop table PHONE_NUMBER;
drop table CUSTOMER;

create table CUSTOMER (
   CUSTOMER_ID             NUMBER(4)                       not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;,
   CUSTOMER_LASTNAME       VARCHAR2(50)                    not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;,
   CUSTOMER_MODIFIED       DATE,
   constraint PK_CUSTOMER primary key (CUSTOMER_ID)
         using index
       tablespace TBS_INDEX
       storage
       (
           initial 100K
           next 100K
       )
)
storage
(
    initial 100K
    next 100K
)
tablespace TBS_DATA;

create table PHONE_NUMBER (
   PHONE_NUMBER_ID         NUMBER(4)                       not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;,
   CUSTOMER_ID             NUMBER(4)                       not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;,
   PHONE_NUMBER            VARCHAR2(50)                    not &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;,
   PHONE_NUMBERMODIFIED    DATE,
   constraint PK_PHONE_NUMBER primary key (PHONE_NUMBER_ID, CUSTOMER_ID)
         using index
       tablespace TBS_INDEX
       storage
       (
           initial 100K
           next 100K
       )
)
storage
(
    initial 100K
    next 100K
)
tablespace TBS_DATA;

alter table PHONE_NUMBER
   add constraint PHONE_NUMBER__CUSTOMER foreign key (CUSTOMER_ID)
      references CUSTOMER (CUSTOMER_ID);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I obtain &quot;Fatal error: Uncaught exception &apos;Doctrine\ORM\Mapping\MappingException&apos; with message &apos;Property &quot;customerId&quot; in &quot;PhoneNumber&quot; was already declared, but it must be declared only once&apos;&quot;&lt;/p&gt;

&lt;p&gt;It&apos;s because a foreign key is a component of the primary key.&lt;/p&gt;</description>
                <environment>Ubuntu 10.04 + Oracle 11g Entreprise + PHP 5.3.2 + Doctrine2 Git (up-to-date) </environment>
            <key id="11559">DDC-658</key>
            <summary>Reverse engineering with Oracle (DBDriver and Associations as Identifier)</summary>
                <type id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/subtask_alternate.png">Sub-task</type>
                    <parent id="10344">DDC-117</parent>
                        <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="mikaelkael">Mickael Perraud</reporter>
                        <labels>
                    </labels>
                <created>Sun, 27 Jun 2010 10:48:25 +0000</created>
                <updated>Sun, 11 Dec 2011 05:39:00 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="13435" author="mikaelkael" created="Mon, 28 Jun 2010 04:44:25 +0000"  >&lt;p&gt;This is the continuation of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-616&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-616&lt;/a&gt;. Only the schema is different.&lt;/p&gt;</comment>
                    <comment id="13436" author="beberlei" created="Mon, 28 Jun 2010 04:52:22 +0000"  >&lt;p&gt;just for understanding this scenario:&lt;/p&gt;

&lt;p&gt;Is this a One-To-One relation and the TABLE_TEST2 &quot;inherits&quot; the primary key from its parent TABLE_TEST1?&lt;/p&gt;

&lt;p&gt;If yes, this construct is not yet supported by Doctrine 2, we still need to include an ID-Generator that supports this kind of schema.&lt;/p&gt;</comment>
                    <comment id="13437" author="mikaelkael" created="Mon, 28 Jun 2010 05:42:41 +0000"  >&lt;p&gt;Change for a more understandable use case. Note that it&apos;s not my real use case and that I work on legacy database on which I can&apos;t change the structure.&lt;/p&gt;</comment>
                    <comment id="15083" author="beberlei" created="Sat, 1 Jan 2011 15:50:02 +0000"  >&lt;p&gt;updated the issue topic to get a better grasp of what needs to be done here.&lt;/p&gt;</comment>
                    <comment id="15966" author="waldo2188" created="Thu, 9 Jun 2011 14:26:50 +0000"  >&lt;p&gt;I have the same error with Mysql whit the same condition.&lt;/p&gt;</comment>
                    <comment id="16923" author="beberlei" created="Mon, 28 Nov 2011 12:11:09 +0000"  >&lt;p&gt;More details on the work to be done:&lt;/p&gt;

&lt;p&gt;The relevant code is in Doctrine/ORM/Mapping/Driver/DatabaseDriver.php only.&lt;/p&gt;

&lt;p&gt;The idea is currently many-to-many tables are detected by checking that the table has foreign keys on all the primary key columns (no additional columns!)&lt;/p&gt;

&lt;p&gt;Now with the 2.1 feature of foreign key/primary key entities this is not necessarily true anymore. You can have the primary keys being foreign keys BUT have additional columns that are not part of the primary key. This has to be detected.&lt;/p&gt;

&lt;p&gt;If a foreign key-primary-key entity is found that has additional columns a ClassMetadata has to be created and the associations have to be created with the &quot;id&quot; =&amp;gt; true flag in mapManyToOne().&lt;/p&gt;</comment>
                    <comment id="16962" author="scott459" created="Sun, 11 Dec 2011 05:39:00 +0000"  >&lt;p&gt;For what it&apos;s worth, I&apos;m getting this error when I have a PK that is a single column and not a FK.&lt;/p&gt;

&lt;p&gt;  PRIMARY KEY (`id`),&lt;br/&gt;
  UNIQUE KEY `cycle_station_id` (`cycle`,`station_id`),&lt;br/&gt;
  KEY `station_id_idx` (`station_id`),&lt;br/&gt;
  KEY `readings` (`readings`),&lt;br/&gt;
  KEY `source` (`source`),&lt;br/&gt;
  KEY `temperature_min_max` (`temperature_max`,`temperature_min`),&lt;br/&gt;
  KEY `station_id_cycle` (`station_id`,`cycle`,`updated_at`),&lt;br/&gt;
  CONSTRAINT `compiled_1_station_id_stations_id` FOREIGN KEY (`station_id`) REFERENCES `stations` (`id`),&lt;br/&gt;
  CONSTRAINT `compiled_1_station_id_stations_id_1` FOREIGN KEY (`station_id`) REFERENCES `stations` (`id`) ON DELETE CASCADE&lt;br/&gt;
) ENGINE=InnoDB AUTO_INCREMENT=160833690 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

<item>
            <title>[DDC-1180] Indexed Associations: foreign key (association) cannot be used as indexBy field</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1180</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am trying to index a collection by its entity&apos;s column which is also a foreign key (association). It seems to me that it is not possible at the moment.&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;/**
 * @Entity
 */
class Hotel
{

    &lt;span class=&quot;code-comment&quot;&gt;// $id column and other stuff
&lt;/span&gt;
    /**
     * @oneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Booking&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;hotel&quot;&lt;/span&gt;, indexBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;room&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Booking[]
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $bookings;
}

/**
 * @Entity
 */
class Booking
{
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Hotel
     *
     * @Id 
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Hotel&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;bookings&quot;&lt;/span&gt;)
     * @JoinColumns({
     *   @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;hotel_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; $hotel;

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Room
     *
     * @Id
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Room&quot;&lt;/span&gt;)
     * @JoinColumns({
     *   @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;room_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; $room;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Only possible workaround I found is to define another (plain) entity&apos;s property mapped to the same table column and index by 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;/**
 * @Entity
 */
class Hotel
{

    &lt;span class=&quot;code-comment&quot;&gt;// $id column and other stuff
&lt;/span&gt;
    /**
     * @oneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Booking&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;hotel&quot;&lt;/span&gt;, indexBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;roomId&quot;&lt;/span&gt;)
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Booking[]
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $bookings;
}

/**
 * @Entity
 */
class Booking
{
    &lt;span class=&quot;code-comment&quot;&gt;// ...
&lt;/span&gt;
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Room
     *
     * @Id
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Room&quot;&lt;/span&gt;)
     * @JoinColumns({
     *   @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;room_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; $room;
    
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; integer $roomId
     *
     * @Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;room_id&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;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $roomId;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Wouldn&apos;t it be easy to support it?&lt;/p&gt;</description>
                <environment>Using Doctrine ORM 2.1.0BETA1</environment>
            <key id="12679">DDC-1180</key>
            <summary>Indexed Associations: foreign key (association) cannot be used as indexBy field</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="sobotka">Petr Sobotka</reporter>
                        <labels>
                    </labels>
                <created>Sun, 29 May 2011 21:44:28 +0000</created>
                <updated>Sat, 2 Mar 2013 12:24:58 +0000</updated>
                                    <version>2.1</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>3</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="15921" author="beberlei" created="Sun, 5 Jun 2011 12:36:53 +0000"  >&lt;p&gt;It is not so easy to implement from the first gimplse and it is not a bug but an improvement/feature request.&lt;/p&gt;</comment>
                    <comment id="19792" author="benjamin" created="Sat, 2 Mar 2013 12:24:58 +0000"  >&lt;p&gt;Related PR: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/204&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/204&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2337] Allow an entity to use its own persister to take advantage of DB level features if necessary</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2337</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have a situation where I wanted a single table to use INSERT DELAYED. Its an audit log table where I expect each http request to generate many inserts for. In an effort to not over tax the system I implemented a custom Entity Persister so that it would work. This obviously doesn&apos;t work with all mapping drivers. However if this is a feature that you think is worth integrating I will fork it on github and complete the implementation alongside any changes/improvements requested...&lt;/p&gt;</description>
                <environment></environment>
            <key id="14672">DDC-2337</key>
            <summary>Allow an entity to use its own persister to take advantage of DB level features if necessary</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="gnat">Nathanael Noblet</reporter>
                        <labels>
                    </labels>
                <created>Wed, 6 Mar 2013 20:17:54 +0000</created>
                <updated>Wed, 6 Mar 2013 20:17:54 +0000</updated>
                                                                    <component>Mapping Drivers</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                    <attachment id="11511" name="persister.patch" size="4366" author="gnat" created="Wed, 6 Mar 2013 20:17:54 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

&lt;p&gt;Hi guys. &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;


&lt;p&gt;After a look into some implementations I end up with the following solution for the second level cache..&lt;/p&gt;

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

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


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



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


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



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



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



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



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



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



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


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




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




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

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



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


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


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


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


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


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


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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-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-2061] Matching Criteria on a PersistentCollection only works on OneToMany associations</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2061</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;What is needed to make it also work for ManyToMany associations?&lt;/p&gt;

&lt;p&gt;May be a better fallback would be do an ArrayCollection-&amp;gt;matching() instead of just giving a runtime exception?&lt;/p&gt;

&lt;p&gt;Is this something that is difficult to implement?&lt;/p&gt;</description>
                <environment></environment>
            <key id="14107">DDC-2061</key>
            <summary>Matching Criteria on a PersistentCollection only works on OneToMany associations</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="terjeb">Terje Br&#229;ten</reporter>
                        <labels>
                        <label>criteria</label>
                        <label>matching</label>
                    </labels>
                <created>Mon, 8 Oct 2012 20:30:35 +0000</created>
                <updated>Mon, 8 Oct 2012 20:32:21 +0000</updated>
                                    <version>Git Master</version>
                                <fixVersion>Git Master</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>2</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-668] add upsert support</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-668</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Didnt find anything in the docs on this. Is D2 capable of doing an UPSERT &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; in case I am trying to persist an object that may or may not have been saved previously. Different RDBMS support different syntax for this case. Like MySQL has INSERT .. ON DUPLICATE KEY UPDATE (or even INSERT IGNORE) while the SQL standard defines a MERGE syntax which seems to be gaining support. Of course you can always fallback to a SELECT FOR UPDATE (or if you want to be hacky an INSERT which catches duplicate key violations .. but probably not a good idea since many RDBMS rollback on a failure inside a transaction).&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; &lt;a href=&quot;http://en.wikipedia.org/wiki/Upsert&quot; class=&quot;external-link&quot;&gt;http://en.wikipedia.org/wiki/Upsert&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See also &lt;a href=&quot;http://opensource.atlassian.com/projects/hibernate/browse/HHH-3011&quot; class=&quot;external-link&quot;&gt;http://opensource.atlassian.com/projects/hibernate/browse/HHH-3011&lt;/a&gt; asking for MERGE support&lt;/p&gt;

&lt;p&gt;Ideally there would be a way to define on a model or model instance level if merge logic should be applied.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11585">DDC-668</key>
            <summary>add upsert support</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="lsmith">Lukas Kahwe</reporter>
                        <labels>
                    </labels>
                <created>Sun, 4 Jul 2010 17:20:19 +0000</created>
                <updated>Tue, 20 Dec 2011 22:22:01 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>4</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="13543" author="robertb" created="Fri, 9 Jul 2010 01:16:50 +0000"  >&lt;p&gt;Doctrine_Record defines a replace() method. &lt;/p&gt;

&lt;p&gt;In the MySQL Doctrine implementation, however, it is not the same as INSERT .. ON DUPLICATE KEY UPDATE. The replace() method implemented in Doctrine_Connection_Mysql uses the REPLACE INTO syntax, which is a DELETE and then INSERT when the key exists. This is fine, except for tables that use auto-increment fields. The delete-then-insert operation yields a new auto-incremented value, whereas INSERT .. ON DUPLICTATE KEY UPDATE would not.&lt;/p&gt;</comment>
                    <comment id="13544" author="lsmith" created="Fri, 9 Jul 2010 02:34:53 +0000"  >&lt;p&gt;MySQL (and SQLite) REPLACE is a no go. It causes way too much disc I/O and worse yet totally screws up the on disk data structures because of the deleting.&lt;/p&gt;</comment>
                    <comment id="16238" author="beberlei" created="Sun, 31 Jul 2011 08:48:13 +0000"  >&lt;p&gt;Scheduled for 2.2&lt;/p&gt;</comment>
                    <comment id="16239" author="beberlei" created="Sun, 31 Jul 2011 09:09:56 +0000"  >&lt;p&gt;Evaluating this makes me sad, except MySQL support for this is rather non-existant, and the oracle merge is aiming at batch operations.&lt;/p&gt;</comment>
                    <comment id="16681" author="beberlei" created="Sat, 22 Oct 2011 11:08:32 +0000"  >&lt;p&gt;Should this be done with&lt;/p&gt;

&lt;p&gt;1. Select first, then insert&lt;br/&gt;
2. Catch and evaluate exception then update&lt;/p&gt;

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

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

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

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

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

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

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

<item>
            <title>[DDC-1216] A way to mark an entity to always use result cache. Like @UseResultCache class annotation.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1216</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;So that even associations, find(), findBy() etc will be affected. Very useful for entities that are being used on every request.&lt;/p&gt;

&lt;p&gt;Is that thinkable?&lt;/p&gt;</description>
                <environment></environment>
            <key id="12726">DDC-1216</key>
            <summary>A way to mark an entity to always use result cache. Like @UseResultCache class annotation.</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="hypno">Reio Piller</reporter>
                        <labels>
                    </labels>
                <created>Sun, 19 Jun 2011 12:49:04 +0000</created>
                <updated>Fri, 6 Apr 2012 13:07:25 +0000</updated>
                                    <version>2.x</version>
                                <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="17780" author="holtkamp" created="Fri, 6 Apr 2012 13:07:25 +0000"  >&lt;p&gt;During development, I tried to have the out-of-the-box ORM layer handle as much of the queries as possible, essentially I used the Repository functions a lot: &lt;/p&gt;

&lt;p&gt;For example, having a specific Repository extend the Doctrine EntityRepository and do something 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; 
    public function findByName($name)
    {
        $criteria = array(&apos;_name&apos; =&amp;gt; $name);
        return parent::findBy($criteria);
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Now all functionality is developed, I am optimizing performance and I find myself having to refer my Repository to my DAO layer which uses DQL, so I can enable the DQL Result Cache...&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; 
    public function findByName($name)
    {
       //Use the DAO so we can enable DQL ResultSet caching
        return $this-&amp;gt;_getDao()-&amp;gt;loadByName($name);
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;It would be nice to be able to configure &apos;DQL Result Cache = on&apos; on Repository level as well...&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2213] Paginator does not work with composite primary key entity</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2213</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Paginator does not work with composed primary key.&lt;/p&gt;

&lt;p&gt;&quot;Single id is not allowed on composite primary key in entity&quot; exception is thrown here &lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php#L90&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php#L90&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Only first column values are fetched while retrieving primary keys here&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/Paginator.php#L173&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/Paginator.php#L173&lt;/a&gt;&lt;/p&gt;</description>
                <environment>php 5.4</environment>
            <key id="14332">DDC-2213</key>
            <summary>Paginator does not work with composite primary key entity</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="thestanislav">Stanislav Anisimov</reporter>
                        <labels>
                        <label>composed</label>
                        <label>key</label>
                        <label>paginator</label>
                    </labels>
                <created>Tue, 25 Dec 2012 13:24:27 +0000</created>
                <updated>Wed, 23 Jan 2013 21:20:21 +0000</updated>
                                    <version>2.3.1</version>
                                                <component>ORM</component>
                <component>Tools</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="19369" author="ocramius" created="Wed, 23 Jan 2013 21:20:21 +0000"  >&lt;p&gt;Limitation was confused by issue reporter and considered bug&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-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-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-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;DDC-2235&lt;/a&gt;. I&apos;d love to hear some opinions on whether this is the right way to go about this issue. I&apos;m not particularly familiar with the internals of doctrine so there may be a better solution.&lt;/p&gt;

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

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

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

&lt;p&gt;I&apos;ve added some regression tests to ensure this bug never creeps back in. They fail on master (highlighting the bug) and pass after these commits have been applied. I&apos;ve also included a couple of other queries as tests to be sure only this one case has been affected.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14817">DDC-2420</key>
            <summary>[GH-656] [DDC-2235] Fix for using a LEFT JOIN onto an entity with single table inheritance</summary>
                <type id="1" iconUrl="http://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-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-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-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-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-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-2316] [GH-588] ClassMetadataInfo: use reflection for creating new instance (on PHP &gt;=5.4)</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2316</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Majkl578:&lt;/p&gt;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-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-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-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-1431] Current event system is not flexible enough</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1431</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi!&lt;/p&gt;

&lt;p&gt;According to &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.1/en/reference/events.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.1/en/reference/events.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Current event system seem to be not as flexible as it could be.&lt;/p&gt;

&lt;p&gt;1. &lt;b&gt;According Lifecycle Events of the entity (marked with @HasLifecycleCallbacks annotation tag)&lt;/b&gt;:&lt;br/&gt;
It would be useful to have access to Entity Manager inside the callbacks. This could be achieved by passing the entity manager as a parameter to all these callbacks. &lt;/p&gt;

&lt;p&gt;Here is the situation:&lt;br/&gt;
I have an entity for a news item. After somehow modifying this entity and before persisting I want to be able to change the inner association of images linked to this news (for example parsed from news body text). From the OO point of view it&apos;s a task of the News entity itself so this should be done a callback. But since inside callback I do not have access to entity manager (to find existing image entities and only if not found creating a new one) I cannot do this.&lt;br/&gt;
This leads to creating a separate event listener which is split from the news entity (and that is not possible, see 2.).&lt;/p&gt;

&lt;p&gt;Passing entity manager to callbacks may improve it&apos;s usefulness.&lt;/p&gt;

&lt;p&gt;2. &lt;b&gt;Currently there is no events to be called before the changes have been computed. And there is no callback to be called after flush has been finished. (preFlush, postFlush)&lt;/b&gt;&lt;br/&gt;
The problem:&lt;br/&gt;
Assume we have a News entity. I want to modify external system (even not written in PHP) via remote call after any change to news being made. This has to be called AFTER the flush has persisted all the changes. Currently the only place to do this is onFlush (which is called before the persisting is done).&lt;br/&gt;
PostPersist, postRemove, postUpdate cannot be used as it&apos;s called after each one entity is modified and we cannot tell when all entites has been processed.&lt;/p&gt;

&lt;p&gt;Also I faced a problem when implementing the event listener for situation 1. If I register the onFlush listener - the entites changeset is already calculated. If I change something according associations I loose this changes. &lt;br/&gt;
If I call $unitOfWork-&amp;gt;computeChangeSet($classMetadata, $entity) or $unitOfWork-&amp;gt;recomputeSingleEntityChangeSet($classMetadata, $entity); I only get the changes being made after previous changeset calculation loosing the initial changes. I think the preFlush could be a lifesaver for this (to be called before computing the changeset for the first time).&lt;/p&gt;


</description>
                <environment>Doctrine 2.1</environment>
            <key id="13096">DDC-1431</key>
            <summary>Current event system is not flexible enough</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="c0ba">Oleg Stepura</reporter>
                        <labels>
                    </labels>
                <created>Tue, 18 Oct 2011 09:37:45 +0000</created>
                <updated>Tue, 18 Oct 2011 09:40:26 +0000</updated>
                                    <version>2.1</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
            <subtask id="13119">DDC-1449</subtask>
        </subtasks>
        </item>

<item>
            <title>[DDC-1532] PostFlush lifecycle event</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1532</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In some cases, the database-id of the newly created record is needed in some postproccessing steps, like sending an e-mail containing a link to the just created entity. I&apos;ve recently seen the added support for PostFlush, but this is not a lifecycle event. &lt;/p&gt;

&lt;p&gt;class SomeEntityClass{&lt;/p&gt;

&lt;p&gt;    /** @PostFlush */&lt;br/&gt;
    function sendSomeEmail()&lt;/p&gt;
{
        sendEmail(&apos;
            &apos;Hi, you&apos;re new invoice can be found online: http://www.example.com/invoices/invoice_&apos;.$this-&amp;gt;id
        &apos;;
    }

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;Perhaps it&apos;s even possible to have multiple PostFlush events, that differentiate between the first time a record is created, and when the record is merely updated.&lt;/p&gt;
</description>
                <environment></environment>
            <key id="13257">DDC-1532</key>
            <summary>PostFlush lifecycle event</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="jack@actinum.nl">Jack van Galen</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Dec 2011 11:43:26 +0000</created>
                <updated>Wed, 14 Dec 2011 11:13:14 +0000</updated>
                                    <version>Git Master</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16985" author="jack@actinum.nl" created="Wed, 14 Dec 2011 11:13:14 +0000"  >&lt;p&gt;Okay, please ignore this issue, as I now see that the @PostPersist does exactly what I need. I was thrown by the name, because to me, the order in which stuff happens is persist -&amp;gt; flush. The ID&apos;s are only known after flush, so i&apos;d expected something like postflush to exist. Sorry.&lt;/p&gt;
</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2248] Expire result cache functionality not implemented</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2248</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;According to &lt;a href=&quot;https://doctrine-orm.readthedocs.org/en/latest/reference/dql-doctrine-query-language.html?highlight=expireResultCache&quot; class=&quot;external-link&quot;&gt;documentation&lt;/a&gt; expireResultCache, should force cache to update but it&apos;s not working... Why? Because functionality is not implemented. You can set _expireResultCache variable, but there is no place where this variable is being checked.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14393">DDC-2248</key>
            <summary>Expire result cache functionality not implemented</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="nazin">Piotr Niziniecki</reporter>
                        <labels>
                    </labels>
                <created>Sat, 19 Jan 2013 17:25:33 +0000</created>
                <updated>Sat, 19 Jan 2013 17:40:44 +0000</updated>
                                    <version>2.3</version>
                <version>2.3.1</version>
                <version>2.3.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="19336" author="ocramius" created="Sat, 19 Jan 2013 17:40:44 +0000"  >&lt;p&gt;A cache profile can be set and cleaned. I suppose that `expireResultCache` is an old piece of code that survived the refactoring. Should just be removed and documented accordingly&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>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18195" author="beberlei" created="Thu, 5 Jul 2012 19:11:27 +0000"  >&lt;p&gt;Can you update to at least 2.2.1 and try again, because this fix here &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1652&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-1652&lt;/a&gt; look like it could be related to your problem.&lt;/p&gt;</comment>
                    <comment id="18224" author="scoolen" created="Sat, 7 Jul 2012 14:46:47 +0000"  >&lt;p&gt;We&apos;re already using the 2.2.x-dev package. It does look similar to &lt;a href=&quot;http://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-2472] [GH-677] Type fix in ORM\PersistentCollection</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2472</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of michaldudek:&lt;/p&gt;

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

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

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

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

&lt;p&gt;```Fatal error: Call to a member function add() on a non-object in Doctrine/ORM/PersistentCollection.php on line 169```&lt;/p&gt;</description>
                <environment></environment>
            <key id="14993">DDC-2472</key>
            <summary>[GH-677] Type fix in ORM\PersistentCollection</summary>
                <type id="1" iconUrl="http://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, 27 May 2013 15:01:39 +0000</created>
                <updated>Mon, 27 May 2013 15:52:26 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20449" author="doctrinebot" created="Mon, 27 May 2013 15:52:26 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-677&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/677&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/677&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

&lt;p&gt;Tests: 1854, Assertions: 6224, Skipped: 96.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15002">DDC-2477</key>
            <summary>[GH-681] Sequence generator fix</summary>
                <type id="1" iconUrl="http://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>Wed, 29 May 2013 17:41:46 +0000</created>
                <updated>Wed, 29 May 2013 17:41:46 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

<item>
            <title>[DDC-2485] [GH-685] Functional ticket for DDC-2484</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2485</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of TomHAnderson:&lt;/p&gt;

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

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

&lt;p&gt;This shows how the postLoad can change an entity but associations are not passed through postLoad&lt;/p&gt;</description>
                <environment></environment>
            <key id="15013">DDC-2485</key>
            <summary>[GH-685] Functional ticket for DDC-2484</summary>
                <type id="1" iconUrl="http://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, 3 Jun 2013 22:58:57 +0000</created>
                <updated>Mon, 3 Jun 2013 22:58:57 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-298] Allow Entity to hold a collection of a single primitive type</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-298</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Sometimes you want to save arbitrary information for an entity using a key -&amp;gt; value array-structure. JPA supports this by means of the @ElementCollection annotation with allows to specify HashMaps for example.&lt;/p&gt;

&lt;p&gt;I propose a new AssocationMapping called &quot;ElementMapping&quot; / &quot;ElementCollection&quot; and annotations (options):&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;ElementCollection
+ elementTable
+ keyType
+ keyLength
+ keyColumnDefinition
+ valueType
+ valueLength
+ valueColumnDefinition
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The key and value definitions are necessary for converting and schema generation.&lt;/p&gt;

&lt;p&gt;The implementation would make use of the PersistentCollection at all times and work as any other persistent collection just with primitive types.&lt;/p&gt;

&lt;p&gt;Restrictions for a first implementation:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Only available as a Lazy-Load Collection, no hydration with the source entity&lt;/li&gt;
	&lt;li&gt;Can&apos;t be used in queries alike &quot;entity.colname.key = ?1&quot;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Use-Case:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$entity-&amp;gt;options[&apos;foo&apos;] = &apos;bar&apos;;
$entity-&amp;gt;options[&apos;bar&apos;] = &apos;baz&apos;;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This could be done for 2.0 imho, adding the necessary changes and optimizations could then be scheduled for 2.1&lt;/p&gt;</description>
                <environment></environment>
            <key id="10829">DDC-298</key>
            <summary>Allow Entity to hold a collection of a single primitive type</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, 2 Feb 2010 22:54:51 +0000</created>
                <updated>Fri, 24 Dec 2010 05:05:59 +0000</updated>
                                    <version>2.1</version>
                                <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>3</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="11585" author="beberlei" created="Tue, 2 Feb 2010 22:57:00 +0000"  >&lt;p&gt;In this implementation Schema-Tool would generate a table:&lt;/p&gt;

&lt;p&gt;elementTable (entity_id-1, ..., entity_id-n, key, value) and using the Platform Type Generation of keyType and valueType&lt;/p&gt;</comment>
                    <comment id="11586" author="beberlei" created="Tue, 2 Feb 2010 23:04:43 +0000"  >&lt;p&gt;Column Names should be Change-able also since there could be people who name their primary keys &quot;key&quot; and &quot;value&quot; o_O&lt;/p&gt;</comment>
                    <comment id="11587" author="beberlei" created="Tue, 2 Feb 2010 23:05:43 +0000"  >&lt;p&gt;Ordering could be implemented on top of this using the @OrderColumn JPA implementation by adding another column to the table with a numeric order that will be &quot;order by&quot;&apos;d on select time.&lt;/p&gt;</comment>
                    <comment id="15009" author="beberlei" created="Fri, 24 Dec 2010 05:05:59 +0000"  >&lt;p&gt;Pushed back&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * @Entity
 */
class Timeslot
{
    /**
     * @Id
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Restaurant&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $restaurant;

    /**
     * @Id
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;localdate&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $date;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

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

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

&lt;p&gt;Shouldn&apos;t the &lt;tt&gt;UnitOfWork&lt;/tt&gt; use &lt;tt&gt;Type::convertToDatabaseValue()&lt;/tt&gt; on custom mapping types to infer their value, when computing the identity of an entity?&lt;/p&gt;
</description>
                <environment></environment>
            <key id="15016">DDC-2487</key>
            <summary>UnitOfWork::getEntityIdentifier() contains objects when custom mapping types are part of an entity&apos;s identity</summary>
                <type id="1" iconUrl="http://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="benjamin">Benjamin Morel</reporter>
                        <labels>
                        <label>identity</label>
                    </labels>
                <created>Tue, 4 Jun 2013 13:35:55 +0000</created>
                <updated>Tue, 4 Jun 2013 14:42:17 +0000</updated>
                                    <version>2.3.4</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20472" author="ocramius" created="Tue, 4 Jun 2013 14:13:37 +0000"  >&lt;p&gt;&lt;a href=&quot;http://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; why would getEntityIdentifier convert types? The UoW doesn&apos;t worry about the DBAL representation of the objects - actually, the UoW doesn&apos;t know of the DBAL at all.&lt;/p&gt;</comment>
                    <comment id="20473" author="benjamin" created="Tue, 4 Jun 2013 14:33:49 +0000"  >&lt;p&gt;Your point is valid, but that&apos;s still annoying. Why would getEntityIdentifier() return objects?&lt;br/&gt;
By the way, &lt;tt&gt;UnitOfWork&lt;/tt&gt; is aware of &lt;tt&gt;EntityManager&lt;/tt&gt;, and thus the &lt;tt&gt;Connection&lt;/tt&gt;, and thus the &lt;tt&gt;Platform&lt;/tt&gt;!&lt;br/&gt;
It does use the &lt;tt&gt;Connection&lt;/tt&gt; in &lt;tt&gt;commit()&lt;/tt&gt;.&lt;/p&gt;</comment>
                    <comment id="20474" author="ocramius" created="Tue, 4 Jun 2013 14:38:28 +0000"  >&lt;p&gt;&lt;a href=&quot;http://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; that is because that is the identifier in your object. It&apos;s composed by the identifier of an associated entity and a datetime object (scalar)&lt;/p&gt;</comment>
                    <comment id="20475" author="benjamin" created="Tue, 4 Jun 2013 14:42:17 +0000"  >&lt;p&gt;&lt;a href=&quot;http://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; Then why does it return the restaurant ID, and not the &lt;tt&gt;Restaurant&lt;/tt&gt; object?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

<item>
            <title>[DDC-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="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="succinct">Nicholas Van Dusen</reporter>
                        <labels>
                    </labels>
                <created>Wed, 3 Apr 2013 20:45:40 +0000</created>
                <updated>Tue, 11 Jun 2013 11:39:19 +0000</updated>
                                                    <fixVersion>2.3.4</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>6</watches>
                        <comments>
                    <comment id="19940" author="beberlei" created="Thu, 4 Apr 2013 20:53:11 +0000"  >&lt;p&gt;Can you provide the full stack trace to the exception please?&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$e-&amp;gt;getTraceAsString();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="19977" author="succinct" created="Thu, 11 Apr 2013 16:02:57 +0000"  >&lt;p&gt;Benjamin, I&apos;m not sure how to get the trace for you, since I&apos;m running from inside the Symfony2 doctrine:mapping:import command line item.&lt;/p&gt;</comment>
                    <comment id="19978" author="stof" created="Thu, 11 Apr 2013 16:11:56 +0000"  >&lt;p&gt;Use the &lt;tt&gt;--verbose&lt;/tt&gt; option when running the command&lt;/p&gt;</comment>
                    <comment id="19979" author="succinct" created="Thu, 11 Apr 2013 17:21:35 +0000"  >&lt;p&gt;I was able to get a trace for you:&lt;/p&gt;

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

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Exception trace:
 () at \htdocs\SF2\vendor\doctrine\orm\lib\Doctrine\ORM\Mapping\MappingException.php:258
 Doctrine\ORM\Mapping\MappingException::singleIdNotAllowedOnCompositePrimaryKey() at \htdocs\SF2\vendor\doctrine\orm\lib\Doctrine\ORM\Mapping\ClassMetadataInfo.php:1571
 Doctrine\ORM\Mapping\ClassMetadataInfo-&amp;gt;getSingleIdentifierFieldName() at \htdocs\SF2\vendor\doctrine\orm\lib\Doctrine\ORM\Mapping\ClassMetadataFactory.php:422
 Doctrine\ORM\Mapping\ClassMetadataFactory-&amp;gt;completeIdGeneratorMapping() at \htdocs\SF2\vendor\doctrine\orm\lib\Doctrine\ORM\Mapping\ClassMetadataFactory.php:136
 Doctrine\ORM\Mapping\ClassMetadataFactory-&amp;gt;doLoadMetadata() at \htdocs\SF2\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory.php:302
 Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory-&amp;gt;loadMetadata() at \htdocs\SF2\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory.php:212
 Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory-&amp;gt;getMetadataFor() at \htdocs\SF2\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory.php:112
 Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory-&amp;gt;getAllMetadata() at \htdocs\SF2\vendor\doctrine\orm\lib\Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand.php:126
 Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand-&amp;gt;execute() at \htdocs\SF2\vendor\doctrine\doctrine-bundle\Doctrine\Bundle\DoctrineBundle\Command\Proxy\ConvertMappingDoctrineCommand.php:59
 Doctrine\Bundle\DoctrineBundle\Command\Proxy\ConvertMappingDoctrineCommand-&amp;gt;execute() at \htdocs\SF2\vendor\symfony\symfony\src\Symfony\Component\Console\Command\Command.php:240
 Symfony\Component\Console\Command\Command-&amp;gt;run() at \htdocs\SF2\vendor\symfony\symfony\src\Symfony\Component\Console\Application.php:193
 Symfony\Component\Console\Application-&amp;gt;doRun() at \htdocs\SF2\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Console\Application.php:78
 Symfony\Bundle\FrameworkBundle\Console\Application-&amp;gt;doRun() at \htdocs\SF2\vendor\symfony\symfony\src\Symfony\Component\Console\Application.php:106
 Symfony\Component\Console\Application-&amp;gt;run() at \htdocs\SF2\app\console:22&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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


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


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

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


    &lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Ticketway\PruebaBundle\Entity\EstablecimientosSec&quot;&lt;/span&gt;)
     * @ORM\JoinColumns(
     *      @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id_establecimiento_sec&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id_establecimiento_sec&quot;&lt;/span&gt;),
     *      @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id_establecimiento&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id_establecimiento&quot;&lt;/span&gt;)) 
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $establecimientoSec;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

     &lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Ticketway\PruebaBundle\Entity\Establecimientos&quot;&lt;/span&gt;)
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id_establecimiento&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id_establecimiento&quot;&lt;/span&gt;) 
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $establecimiento;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$entity = $args-&amp;gt;getEntity();

&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($entity &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; DDC2484_Car) {
    $entity-&amp;gt;setBrand(&apos;BMW&apos;);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

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

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

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

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

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

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

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

&lt;p&gt;There are many ways around this fortunately, but I thought I should report it anyway.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15046">DDC-2504</key>
            <summary>[GH-696] extra lazy joined test</summary>
                <type id="1" iconUrl="http://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, 14 Jun 2013 07:49:08 +0000</created>
                <updated>Fri, 14 Jun 2013 07:49:08 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

</description>
                <environment></environment>
            <key id="15047">DDC-2505</key>
            <summary>[GH-697] Fix phpDoc syntax in ClassMetadataInfo.php</summary>
                <type id="1" iconUrl="http://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, 14 Jun 2013 08:00:51 +0000</created>
                <updated>Fri, 14 Jun 2013 13:57:21 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20571" author="doctrinebot" created="Fri, 14 Jun 2013 13:57:21 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-697&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/697&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/697&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2507] [GH-698] Fix for [DDC-2506] CTI JOINs and WITH conditionals</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2507</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of mattjanssen:&lt;/p&gt;

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

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

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

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

&lt;p&gt;On a side note, I&apos;m not able to get phpunit to run (even on a clean Master) so I&apos;m leaving the testing up to Travis.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15050">DDC-2507</key>
            <summary>[GH-698] Fix for [DDC-2506] CTI JOINs and WITH conditionals</summary>
                <type id="1" iconUrl="http://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, 14 Jun 2013 16:34:33 +0000</created>
                <updated>Fri, 14 Jun 2013 16:34:33 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

<item>
            <title>[DDC-1602] Executors for Class Table Inheritance (JOINED) are extremely slow on MySQL</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1602</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Update and delete executors for Class Table Inheritance (JOINED) are extremely slow on MySQL platform. It is most probably due to use of subselect on the temporary table.&lt;br/&gt;
The slowdown is really significant as the table size increases. As an example, lets have a root entity with one subclass:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * @Entity
 * @InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;JOINED&quot;&lt;/span&gt;)
 * @DiscriminatorColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;discr&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
 * @DiscriminatorMap({&lt;span class=&quot;code-quote&quot;&gt;&quot;root&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;Root&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;a&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;SubA&quot;&lt;/span&gt;})
 */
class Root
{
	/**
	 * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
	 * @Id
	 * @GeneratedValue
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;

	/**
	 * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $xyz;
}
&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;/**
 * @Entity
 */
class SubA &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Root
{
	/**
	 * @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; $foo;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now lets perform a simple DQL UPDATE:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;UPDATE Entities\Root r SET r.xyz = 123 WHERE r.id &amp;gt; ?
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;(note: always the upper half of entries)&lt;br/&gt;
Which creates following SQLs:&lt;/p&gt;
&lt;div class=&quot;code panel&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 TEMPORARY TABLE Root_id_tmp (id INT NOT NULL)
INSERT INTO Root_id_tmp (id) SELECT t0.id FROM Root t0 LEFT JOIN SubA s0_ ON t0.id = s0_.id WHERE t0.id &amp;gt; 25000
UPDATE Root SET xyz = 123 WHERE (id) IN (SELECT id FROM Root_id_tmp)
DROP TEMPORARY TABLE Root_id_tmp
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The time spent on this on MySQL 5.5.17 and PostgreSQL 9.1 is:&lt;/p&gt;

&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; no. of entries &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 500   &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 1000  &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 2500 &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 5000 &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 10000 &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 20000 &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 50000 &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; &lt;b&gt;MySQL&lt;/b&gt;             &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.26s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;  0.35s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 1.1s  &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 3.68s  &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 14.13s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 54.44s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 338s &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; &lt;b&gt;PostgreSQL&lt;/b&gt;   &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.10s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.10s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.13s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.15s  &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.22s   &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.35s   &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 1.01s &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;


&lt;p&gt;As you can see, MySQL is drastically slower on even relatively small tables. This currently makes Doctrine unusable for this type of inheritance on MySQL. The solution probably would be to avoid subselect in WHERE clause in Doctrine\ORM\Query\Exec\MultiTableUpdateExecutor and Doctrine\ORM\Query\Exec\MultiTableDeleteExecutor.&lt;/p&gt;

&lt;p&gt;Feel free to try/modify the test script yourself, it&apos;s &lt;a href=&quot;https://github.com/Majkl578/doctrine2-slow-executors&quot; class=&quot;external-link&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</description>
                <environment>Debian, MySQL 5.5.17</environment>
            <key id="13362">DDC-1602</key>
            <summary>Executors for Class Table Inheritance (JOINED) are extremely slow on MySQL</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="majkl578">Michael Moravec</reporter>
                        <labels>
                    </labels>
                <created>Sun, 15 Jan 2012 19:45:05 +0000</created>
                <updated>Wed, 27 Jun 2012 17:57:43 +0000</updated>
                                    <version>2.2-BETA2</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>3</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="17269" author="beberlei" created="Sun, 15 Jan 2012 22:59:14 +0000"  >&lt;p&gt;Its not a bug as it works. The performance drawback of JTI is discussed in the manual &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.1/en/reference/inheritance-mapping.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.1/en/reference/inheritance-mapping.html&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Changing this would be an improvement where we would hint if databases prefer subselects or joins for different operations. This would increase complexity of the SQL generation since now we are getting along with just one SQL generation strategy.&lt;/p&gt;</comment>
                    <comment id="17938" author="majkl578" created="Fri, 11 May 2012 11:02:42 +0000"  >&lt;p&gt;Any chance to get this implemented before 2.3?&lt;/p&gt;</comment>
                    <comment id="17939" author="majkl578" created="Fri, 11 May 2012 14:03:31 +0000"  >&lt;p&gt;I&apos;ve made a change in DBAL and ORM code to implement a solution issue. It&apos;s currently more likely a proof of concept.&lt;/p&gt;

&lt;p&gt;With the change, my results are (approximately):&lt;/p&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; no. of entries &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 500   &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 1000  &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 2500 &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 5000 &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 10000 &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 20000 &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; 50000 &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; &lt;b&gt;MySQL&lt;/b&gt;             &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.17s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;  0.19s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.21s  &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.26s  &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.27s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.37s &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 0.92s &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;


&lt;p&gt;Currently only update executor was changed.&lt;br/&gt;
DBAL branch with changes: &lt;a href=&quot;https://github.com/Majkl578/doctrine-dbal/tree/DDC-1602&quot; class=&quot;external-link&quot;&gt;https://github.com/Majkl578/doctrine-dbal/tree/DDC-1602&lt;/a&gt;&lt;br/&gt;
ORM branch with changes: &lt;a href=&quot;https://github.com/Majkl578/doctrine2/tree/DDC-1602&quot; class=&quot;external-link&quot;&gt;https://github.com/Majkl578/doctrine2/tree/DDC-1602&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking forward for your opinions.&lt;/p&gt;</comment>
                    <comment id="18148" author="majkl578" created="Wed, 27 Jun 2012 17:57:43 +0000"  >&lt;p&gt;bump&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

</description>
                <environment></environment>
            <key id="15057">DDC-2513</key>
            <summary>[GH-702] ANSI compliant quote strategy</summary>
                <type id="1" iconUrl="http://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>Tue, 18 Jun 2013 02:03:12 +0000</created>
                <updated>Tue, 18 Jun 2013 02:03:12 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

&lt;p&gt;Visited collections are cleared only in commit(). Commit clears up only if it actually has something to do. Processing large amounts of records without changing them cause visitedCollections to grow without any way of clearing.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15063">DDC-2517</key>
            <summary>[GH-703] Clear visitedCollections</summary>
                <type id="1" iconUrl="http://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>Wed, 19 Jun 2013 13:35:15 +0000</created>
                <updated>Wed, 19 Jun 2013 13:35:15 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2519&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2519&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15067">DDC-2520</key>
            <summary>[GH-705] [DDC-2519] Partial association identifier</summary>
                <type id="1" iconUrl="http://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>Thu, 20 Jun 2013 04:18:07 +0000</created>
                <updated>Thu, 20 Jun 2013 04:18:07 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2521] [GH-706] [DDC-1398] Extra-lazy get for indexed associations</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2521</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of sandermarechal:&lt;/p&gt;

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

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

&lt;p&gt;If an association is EXTRA_LAZY and has an indexBy, then&lt;br/&gt;
you can call get() without loading the entire collection.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15068">DDC-2521</key>
            <summary>[GH-706] [DDC-1398] Extra-lazy get for indexed associations</summary>
                <type id="1" iconUrl="http://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>Thu, 20 Jun 2013 07:33:36 +0000</created>
                <updated>Thu, 20 Jun 2013 07:33:36 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1398] loading one item at a time when indexBy and EXTRA_LAZY fetch mode is used on a collection</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1398</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;collection-&amp;gt;get($key)&lt;/p&gt;

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

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

<item>
            <title>[DDC-1247] Implement AnnotationDriver::addExcludePath</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1247</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi, &lt;br/&gt;
I&apos;ve been having issues with AnnotationDriver crawling in my directories and loading files. &lt;br/&gt;
I have a few classes that require specific libraries loaded, and I don&apos;t want the AnnotationDriver to load them. &lt;/p&gt;

&lt;p&gt;For example, I have my descendant of PHPUnit_Framework_TestCase in libs and the driver just dies, because PHPUnit is not loaded, and I don&apos;t want to load it, to be able to finish the process.&lt;/p&gt;

&lt;p&gt;Solution would be add method &lt;tt&gt;AnnotationDriver::addExcludePath&lt;/tt&gt;, whose name speaks for itself &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;Temporarily, I had to extend the AnnotationDriver and overload the crawling process, which is realy annoing, because I had to copy the whole method with all its exceptions and I would have to maintain it, till this will be in Doctrine. Can be viewed here &lt;a href=&quot;https://github.com/Kdyby/Framework/blob/master/libs/Kdyby/Doctrine/Mapping/Driver/AnnotationDriver.php&quot; class=&quot;external-link&quot;&gt;https://github.com/Kdyby/Framework/blob/master/libs/Kdyby/Doctrine/Mapping/Driver/AnnotationDriver.php&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks&lt;br/&gt;
Filip&lt;/p&gt;</description>
                <environment></environment>
            <key id="12784">DDC-1247</key>
            <summary>Implement AnnotationDriver::addExcludePath</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="hosiplan">Filip Proch&#225;zka</reporter>
                        <labels>
                    </labels>
                <created>Mon, 4 Jul 2011 09:26:49 +0000</created>
                <updated>Wed, 19 Sep 2012 16:10:00 +0000</updated>
                                    <version>Git Master</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="17875" author="juzna" created="Fri, 20 Apr 2012 12:33:23 +0000"  >&lt;p&gt;This behavior really messes with my projects, as it automatically loads all php files. Not just those with classes, but also simple scripts, which can do horrible stuff (e.g. I&apos;ve got scripts to make changes in the source code!)&lt;/p&gt;

&lt;p&gt;Annotations should be read without executing the scripts, e.g. by TokenReflection library: &lt;a href=&quot;https://github.com/Andrewsville/PHP-Token-Reflection&quot; class=&quot;external-link&quot;&gt;https://github.com/Andrewsville/PHP-Token-Reflection&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18546" author="vrtak-cz" created="Mon, 27 Aug 2012 17:05:46 +0000"  >&lt;p&gt;pull &lt;a href=&quot;https://github.com/doctrine/common/pull/176&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/pull/176&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="18683" author="stof" created="Wed, 19 Sep 2012 11:13:23 +0000"  >&lt;p&gt;@Jan Tokenizing the file was the way annotations were handled in 2.0. Doctrine 2.1 switched to using Reflection to read annotation because it is faster.&lt;/p&gt;

&lt;p&gt;@Filip I&apos;m wondering why you would have PHPUnit testcases in a path storing entities.&lt;/p&gt;</comment>
                    <comment id="18684" author="hosiplan" created="Wed, 19 Sep 2012 13:39:24 +0000"  >&lt;p&gt;@stof&lt;/p&gt;

&lt;p&gt;&amp;gt; Tokenizing the file was the way annotations were handled in 2.0. Doctrine 2.1 switched to using Reflection to read annotation because it is faster.&lt;/p&gt;

&lt;p&gt;And it is obviousely the wrong one. There is no argument, that could beat the fact, that the result can and should be cached, as it does already. Correct behaviour is much more valuable than few miliseconds on first run.&lt;/p&gt;

&lt;p&gt;&amp;gt; I&apos;m wondering why you would have PHPUnit testcases in a path storing entities.&lt;/p&gt;

&lt;p&gt;I don&apos;t. They are base classes for the actual tests. I agree they might (or should) be somewhere else, but the fact, that they should not be executed, when readed, stays.&lt;/p&gt;</comment>
                    <comment id="18685" author="stof" created="Wed, 19 Sep 2012 16:10:00 +0000"  >&lt;p&gt;@Filip The AnnotationReader is not loading any file. It simply expects a ReflectionClass.&lt;br/&gt;
And for the performances, we are talking about running several times faster here (I don&apos;t have the benchmark results anymore but you could search in the merged PRs on Doctrine Common)&lt;/p&gt;

&lt;p&gt;The ORM AnnotationDriver expects a path in which it should look for annotated classes, to be able to implement getAllClasses() (as it cannot expect all classes to be already loaded). And btw, the behavior was the same in 2.0 when the reader was using tokenization.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1206] Add option to SchemaTool for ignoring unsupported tables</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1206</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I suggest adding a new feature to SchemaTool, which allows you to ignore tables, which contain unsupported column types.&lt;/p&gt;

&lt;p&gt;Use case:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;You have a legacy database, or a database that is also shared with another application&lt;/li&gt;
	&lt;li&gt;You want to use SchemaTool to speed up development&lt;/li&gt;
	&lt;li&gt;The database contains tables which are not used in the Doctrine 2 application, and contain unsupported column types&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I&apos;ve encountered this already a few  times myself - Basically if you try to use orm:schema-tool:update with a database that contains tables with unsupported column types, it&apos;ll throw an error and you won&apos;t be able to use it at all. Because schema tool is extermely convenient when developing, I think it would be very useful to have support for this feature.&lt;/p&gt;

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

&lt;p&gt;I think this should be doable by just changing SchemaTool/SchemaManager so, that SchemaManager would contain an additional method (or flag) which works like createSchema, but ignores tables that cause an exception, and SchemaTool would include a flag for using this instead of the standard approach.&lt;/p&gt;

&lt;p&gt;I&apos;m looking into implementing this myself, and will submit a patch if this seems like a reasonable approach.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12711">DDC-1206</key>
            <summary>Add option to SchemaTool for ignoring unsupported tables</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="jhartikainen">Jani Hartikainen</reporter>
                        <labels>
                    </labels>
                <created>Mon, 13 Jun 2011 13:06:46 +0000</created>
                <updated>Mon, 5 Mar 2012 19:43:14 +0000</updated>
                                                                    <component>Tools</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="15986" author="jhartikainen" created="Wed, 15 Jun 2011 05:33:52 +0000"  >&lt;p&gt;Relevant patches (pull request made):&lt;/p&gt;

&lt;p&gt;DBAL &lt;a href=&quot;https://github.com/jhartikainen/dbal/tree/DDC-1206&quot; class=&quot;external-link&quot;&gt;https://github.com/jhartikainen/dbal/tree/DDC-1206&lt;/a&gt;&lt;br/&gt;
ORM &lt;a href=&quot;https://github.com/jhartikainen/doctrine2/tree/DDC-1206&quot; class=&quot;external-link&quot;&gt;https://github.com/jhartikainen/doctrine2/tree/DDC-1206&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17520" author="maerf0x0" created="Mon, 5 Mar 2012 19:43:14 +0000"  >&lt;p&gt;has there been any progres on this feature? I have POINT  in my DB and would rather ignore the table  than create a custom type. &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1198] Add PHPDocs to annotationclasses</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1198</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;If an IDE would like to support annotations, it&apos;s currently only possible to display all resolvable classes in a code-hint menu when autocompleting annotations, as&lt;br/&gt;
basically any class can be used for annotations.&lt;/p&gt;

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

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

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

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-1010] Crash when fetching results from qb inside postLoad event</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1010</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I registered an event listener to my entity manager and on a postLoad event, I want to prepare some data in a nice way (fetch translations for my library + store into associative array into entity). Here&apos;s my snippet:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
class TranslationListener &lt;span class=&quot;code-keyword&quot;&gt;implements&lt;/span&gt; EventSubscriber
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getSubscribedEvents()
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; array(Events::postLoad);
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function postLoad(LifecycleEventArgs $args)
    {
        $em = $args-&amp;gt;getEntityManager();
        $entity = $args-&amp;gt;getEntity();

        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($entity &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; Lib) {
            $qb = $em-&amp;gt;createQueryBuilder();
            $qb = $qb-&amp;gt;select(&apos;T&apos;)-&amp;gt;from(&apos;Translate&apos;, &apos;T&apos;)-&amp;gt;join(&apos;T.locale&apos;, &apos;TT&apos;)-&amp;gt;where(&apos;T.lib = ?1&apos;)-&amp;gt;setParameter(1, $entity-&amp;gt;idLib);
            $res = $qb-&amp;gt;getQuery()-&amp;gt;getResult();
            foreach ($res as $tr) {
                $entity-&amp;gt;tr[$tr-&amp;gt;locale-&amp;gt;idLocale] = $tr;
            }
        }
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When this code is run (eg. getting the Library objects), I got a crash where getResult() is called:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
Fatal error: Call to a member function fetch() on a non-object in /home/thepianoguy/testproject/trunk/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php on line 126
Call Stack
#	Time	Memory	Function	Location
1	0.0004	656080	{main}( )	../index.php:0
2	0.1081	18760176	TApplication-&amp;gt;run( )	../index.php:48
3	0.2637	33817288	TApplication-&amp;gt;runService( )	../TApplication.php:382
4	0.2637	33817288	TPageService-&amp;gt;run( )	../TApplication.php:1095
5	0.2698	34788448	TPageService-&amp;gt;runPage( )	../TPageService.php:444
6	0.2715	34986768	TPage-&amp;gt;run( )	../TPageService.php:498
7	0.2716	34989128	TPage-&amp;gt;processNormalRequest( )	../TPage.php:198
8	0.3383	42770128	TControl-&amp;gt;loadRecursive( )	../TPage.php:215
9	0.3383	42770208	ContactUserAddEdit-&amp;gt;onLoad( )	../TControl.php:1286
10	0.3383	42771912	ContactUserAddEdit-&amp;gt;loadData( )	../ContactUserAddEdit.php:56
11	0.3452	43436904	Doctrine\ORM\AbstractQuery-&amp;gt;getResult( )	../ContactUserAddEdit.php:124
12	0.3452	43437296	Doctrine\ORM\AbstractQuery-&amp;gt;execute( )	../AbstractQuery.php:366
13	0.4160	47009328	Doctrine\ORM\Internal\Hydration\AbstractHydrator-&amp;gt;hydrateAll( )	../AbstractQuery.php:537
14	0.4160	47011504	Doctrine\ORM\Internal\Hydration\ObjectHydrator-&amp;gt;_hydrateAll( )	../AbstractHydrator.php:99
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If I comment the line 137 in Doctrine/ORM/Internal/Hydration/AbstractHydrator in _cleanup(), my code works fine:&lt;br/&gt;
//        $this-&amp;gt;_stmt = null;&lt;/p&gt;

&lt;p&gt;I think there is a problem when using alredy used entity manager and query builder inside the postLoad event.&lt;/p&gt;</description>
                <environment>PHP 5.3.3-1ubuntu9.3&lt;br/&gt;
KUbuntu 10.10</environment>
            <key id="12342">DDC-1010</key>
            <summary>Crash when fetching results from qb inside postLoad event</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="thepianoguy">Matevz Jekovec</reporter>
                        <labels>
                    </labels>
                <created>Tue, 1 Feb 2011 05:16:36 +0000</created>
                <updated>Wed, 23 Jan 2013 22:37:11 +0000</updated>
                                    <version>2.0.1</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="15208" author="beberlei" created="Wed, 2 Feb 2011 13:37:34 +0000"  >&lt;p&gt;The hydrator is reused internally, this is potentially dangerous as I figure from your use-case.&lt;/p&gt;</comment>
                    <comment id="15209" author="beberlei" created="Wed, 2 Feb 2011 13:45:15 +0000"  >&lt;p&gt;A workaround is to re-registr the object hydrator under a new name&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$configuration-&amp;gt;setHydrationMode(&lt;span class=&quot;code-quote&quot;&gt;&quot;object2&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;Doctrine\ORM\Internal\Hydration\ObjectHydrator&quot;&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and use it in your query.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$query-&amp;gt;setHydrationMode(&lt;span class=&quot;code-quote&quot;&gt;&quot;object2&quot;&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="19387" author="ocramius" created="Wed, 23 Jan 2013 22:37:11 +0000"  >&lt;p&gt;Marking as documentation issue, since the user has to be warned that `postLoad` has to use a dedicated hydrator to execute more load operations.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-987] How to register lifecycle callbacks from YAML is not done correctly in the Events section of the documentation.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-987</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.0/en/reference/events.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/reference/events.html&lt;/a&gt;&lt;/p&gt;

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

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

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

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

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

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

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

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

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

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

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


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


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


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


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

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


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

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

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

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

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

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

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

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

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

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;ComparisonOperator  ::= &quot;=&quot; | &quot;&amp;lt;&quot; | &quot;&amp;lt;=&quot; | &quot;&amp;lt;&amp;gt;&quot; | &quot;&amp;gt;&quot; | &quot;&amp;gt;=&quot; | &quot;!=&quot;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

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

&lt;p&gt;Thanks.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13061">DDC-1405</key>
            <summary>Define semantics of comparison operators, particularly with regard to null values</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="dalvarez">Daniel Alvarez Arribas</reporter>
                        <labels>
                    </labels>
                <created>Thu, 6 Oct 2011 23:03:45 +0000</created>
                <updated>Wed, 12 Oct 2011 23:09:44 +0000</updated>
                                    <version>2.1.2</version>
                                                <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1370] preInsert, postInsert, prePersist, postPersist, preUpdate, postUpdate code and documentation of events</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1370</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Currently we have a set of Lifecycle events, but they seem to be misleading both in actual implementation and documentation.&lt;/p&gt;

&lt;p&gt;One good example is prePersist and postPersist, which is only fired when you&apos;re creating new entities. It should be renamed to preInsert and postInsert.&lt;br/&gt;
As of preUpdate and postUpdate, they seem quite valid.&lt;/p&gt;

&lt;p&gt;But if we rename prePersist and postPersist to (pre|post)Insert, we may have a situation where you wanna cover both insert and update.&lt;br/&gt;
For this, (pre|post)Persist should be reinstated, but acting differently from what it does currently.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13007">DDC-1370</key>
            <summary>preInsert, postInsert, prePersist, postPersist, preUpdate, postUpdate code and documentation of events</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Fri, 9 Sep 2011 20:03:57 +0000</created>
                <updated>Tue, 20 Dec 2011 22:23:54 +0000</updated>
                                                    <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16459" author="rdohms" created="Fri, 9 Sep 2011 20:07:39 +0000"  >&lt;p&gt;Also, documentation for post* methods is broken at the website:&lt;/p&gt;

&lt;p&gt;&quot;Changes in here are not relevant to the persistence in the database, but you can use this events to&quot; &lt;/p&gt;

&lt;p&gt;It cuts off in mid-sentence.&lt;/p&gt;</comment>
                    <comment id="16954" author="guilhermeblanco" created="Fri, 9 Dec 2011 04:51:27 +0000"  >&lt;p&gt;RDohms, this paragraph was already sorted out.&lt;/p&gt;

&lt;p&gt;The actual ticket is still valid here.&lt;/p&gt;</comment>
                    <comment id="17079" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:23:54 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1332] Specify Custom ProxyFactory</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1332</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;My tweet:&lt;/p&gt;

&lt;p&gt;&amp;gt; @beberlei Have you heard of overriding the ProxyFactory to allow caching of lazy-loaded entities? Trying to do that now &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;The majority of our data is quite stagnant and so I was shoehorning the capability of the generated proxies to use a custom class.&lt;/p&gt;

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

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

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

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

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

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

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

<item>
            <title>[DDC-2134] Add referential integrity check for MySQL to console commands</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2134</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Today I spent some time solving a PHP &apos;White Screen of Death&apos;. I traced it back to a Entity of which the proxy&apos;s __load() function was invoked because af a EXTRA_LAZY association. Due to incorrect database contents (the entry ID was changed due to an update: referential integrity broke), the __load() query resulted in no results. The EntityNotFoundException did for some reason not show up in our logs, probably because the lazy load was triggered by a magic __toString() function.&lt;/p&gt;

&lt;p&gt;The cause is because of the way we populate or tables with domain data: &lt;/p&gt;


&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
SET FOREIGN_KEY_CHECKS = 0;
#IMPORT STUFF from CSV
SET FOREIGN_KEY_CHECKS = 1;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;MySQL does not trigger any errors when the foreign key checks are turned back on, leaving the table in an inconsistent state. &lt;/p&gt;

&lt;p&gt;To prevent this, I found some information in this post: &lt;a href=&quot;http://www.mysqlperformanceblog.com/2011/11/18/eventual-consistency-in-mysql/&quot; class=&quot;external-link&quot;&gt;http://www.mysqlperformanceblog.com/2011/11/18/eventual-consistency-in-mysql/&lt;/a&gt;, which I used to come with the following queries&lt;/p&gt;


&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
#Check the constraints of a specific database
SELECT *
	FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE 
		WHERE TABLE_SCHEMA = &apos;databaseName&apos;
		AND REFERENCED_TABLE_NAME IS NOT NULL

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
#Generate table specific queries to find orphaned entries
SELECT CONCAT(
	 &apos;SELECT &apos;, GROUP_CONCAT(DISTINCT CONCAT(K.CONSTRAINT_NAME, &apos;.&apos;, P.COLUMN_NAME,
	  &apos; AS `&apos;, P.TABLE_SCHEMA, &apos;.&apos;, P.TABLE_NAME, &apos;.&apos;, P.COLUMN_NAME, &apos;`&apos;) ORDER BY P.ORDINAL_POSITION), &apos; &apos;,
	 	&apos;FROM &apos;, K.TABLE_SCHEMA, &apos;.&apos;, K.TABLE_NAME, &apos; AS &apos;, K.CONSTRAINT_NAME, &apos; &apos;,
	 		&apos;LEFT OUTER JOIN &apos;, K.REFERENCED_TABLE_SCHEMA, &apos;.&apos;, K.REFERENCED_TABLE_NAME, &apos; AS &apos;, K.REFERENCED_TABLE_NAME, &apos; &apos;,
	 		&apos; ON (&apos;, GROUP_CONCAT(CONCAT(K.CONSTRAINT_NAME, &apos;.&apos;, K.COLUMN_NAME) ORDER BY K.ORDINAL_POSITION),
	 		&apos;) = (&apos;, GROUP_CONCAT(CONCAT(K.REFERENCED_TABLE_NAME, &apos;.&apos;, K.REFERENCED_COLUMN_NAME) ORDER BY K.ORDINAL_POSITION), &apos;) &apos;,
	 		&apos;WHERE &apos;, K.REFERENCED_TABLE_NAME, &apos;.&apos;, K.REFERENCED_COLUMN_NAME, &apos; IS NULL;&apos;
	  )
    INTO OUTFILE &apos;/tmp/verifyDatabaseTableIntegrity.sql&apos;
    FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE K
      INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE P
        ON (K.TABLE_SCHEMA, K.TABLE_NAME) = (P.TABLE_SCHEMA, P.TABLE_NAME)
        AND P.CONSTRAINT_NAME = &apos;PRIMARY&apos;
    WHERE K.TABLE_SCHEMA = &apos;databaseName&apos;
      AND K.REFERENCED_TABLE_NAME IS NOT NULL
      GROUP BY K.CONSTRAINT_NAME;
	
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;By running the generated queries, we can now easily find the records that break referential integrity. &lt;/p&gt;

&lt;p&gt;It might be an idea of adding this functionality to the orm:validate-schema, or a new orm:validate-database-integrity?&lt;/p&gt;</description>
                <environment>MySQL</environment>
            <key id="14208">DDC-2134</key>
            <summary>Add referential integrity check for MySQL to console commands</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="holtkamp">Menno Holtkamp</reporter>
                        <labels>
                    </labels>
                <created>Fri, 9 Nov 2012 13:08:10 +0000</created>
                <updated>Fri, 9 Nov 2012 17:17:04 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2103] Add support for using AliasResultVariable in WhereClause</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2103</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It would be nice if supported writing in DQL:&lt;/p&gt;

&lt;p&gt;SELECT LOWER(a.name) AS name FROM User a WHERE name LIKE ?&lt;/p&gt;

&lt;p&gt;The resulting sql:&lt;/p&gt;

&lt;p&gt;SELECT LOWER(c0_.name) AS sclr0 FROM users c0_ WHERE LOWER(c0_.name) LIKE ?&lt;/p&gt;</description>
                <environment></environment>
            <key id="14167">DDC-2103</key>
            <summary>Add support for using AliasResultVariable in WhereClause</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="hason">Martin Haso&#328;</reporter>
                        <labels>
                    </labels>
                <created>Thu, 25 Oct 2012 12:31:49 +0000</created>
                <updated>Thu, 25 Oct 2012 12:31:49 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2076] Optimization for MEMBER OF</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2076</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Currently, using MEMBER OF for a ManyToMany collection does a join on the table of the related entity, whereas all it needs is in the join table.&lt;/p&gt;

&lt;p&gt;Using the following DQL:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-sql&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; p &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; Player p
&lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; NOT :team MEMBER OF p.targetedBy
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-sql&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; NOT EXISTS (&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; 1 &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; player_team p1_ INNER JOIN Team t2_ ON p1_.team_id = t2_.id &lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; p1_.player_id = p0_.id AND t2_.id = ?)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;whereas it could drop the join:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-sql&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; NOT EXISTS (&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; 1 &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; player_team p1_ &lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; p1_.player_id = p0_.id AND p1_.team_id = ?)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14126">DDC-2076</key>
            <summary>Optimization for MEMBER OF</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="stof">Christophe Coevoet</reporter>
                        <labels>
                        <label>dql</label>
                    </labels>
                <created>Sun, 14 Oct 2012 08:43:09 +0000</created>
                <updated>Sun, 14 Oct 2012 08:43:09 +0000</updated>
                                    <version>Git Master</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2053] [GH-460] added support to extend strategies for IdGenerators</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2053</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This issue is created automatically through a Github pull request on behalf of Powerhamster:&lt;/p&gt;

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

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

&lt;p&gt;Mapping drivers now use extended classmetadata class to find constants of generator types.&lt;br/&gt;
Method completeIdGeneratorMapping is now protected and can be extended&lt;/p&gt;</description>
                <environment></environment>
            <key id="14088">DDC-2053</key>
            <summary>[GH-460] added support to extend strategies for IdGenerators</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 2 Oct 2012 18:40:49 +0000</created>
                <updated>Wed, 3 Oct 2012 08:33:52 +0000</updated>
                                    <version>Git Master</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18762" author="beberlei" created="Wed, 3 Oct 2012 08:33:52 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-460&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/460&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/460&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2030] better way to detect class parents</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2030</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi!&lt;br/&gt;
Currently i&apos;m heavy using doctrine to generate entities starting form database schema (aprox 500 tables with thousand of relations).&lt;/p&gt;

&lt;p&gt;I&apos;m trying to detect some inheritance cases, but there is a problem.&lt;/p&gt;

&lt;p&gt;Doctrine always uses PHP class inheritance to detect entity hierarchy, but generating entities starting from database, i have not yet any php class.&lt;/p&gt;

&lt;p&gt;There is a better way to detect entities hierarchy? Without php classes... &lt;br/&gt;
Mapping files should be self-sufficient, even without php files.&lt;/p&gt;

&lt;p&gt;The practical case is:&lt;br/&gt;
in &lt;tt&gt;DatabaseDriver&lt;/tt&gt; i&apos;m trying to call &lt;tt&gt;$metadata-&amp;gt;addDiscriminatorMapClass($name, $className)&lt;/tt&gt; method, but it raises an exception if &lt;tt&gt;$classNam&lt;/tt&gt; does not exists.&lt;/p&gt;

&lt;p&gt;Even if i manualy create XML mapping files, and then i try to generate php entityes. There is the same problem. &lt;tt&gt;XmlDriver&lt;/tt&gt; tries to call &lt;tt&gt;setDiscriminatorMap&lt;/tt&gt; method that raises the same exception.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14035">DDC-2030</key>
            <summary>better way to detect class parents</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="goetas">Asmir Mustafic</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 Sep 2012 10:59:17 +0000</created>
                <updated>Thu, 13 Sep 2012 10:59:17 +0000</updated>
                                                                    <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1993] New method required: ClassMetadataInfo::isAssociationNullable()</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1993</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I&apos;m working with Symfony 2.1, and I need to know if an association is nullable for a given entity (to know if a form field should be marked as &apos;required&apos;). So I&apos;d like to have a &lt;tt&gt;isAssociationNullable()&lt;/tt&gt; method in the &lt;tt&gt;ClassMetadataInfo&lt;/tt&gt; class, that should do the same thing that the &lt;tt&gt;isNullable()&lt;/tt&gt; method does for fields.&lt;/p&gt;

&lt;p&gt;You can see more information about the problem on the &lt;a href=&quot;https://github.com/symfony/symfony/issues/5315&quot; class=&quot;external-link&quot;&gt;Symfony issue&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13980">DDC-1993</key>
            <summary>New method required: ClassMetadataInfo::isAssociationNullable()</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="gregoire_m">gregoire_m</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 Aug 2012 08:24:33 +0000</created>
                <updated>Wed, 22 Aug 2012 08:24:33 +0000</updated>
                                    <version>2.2</version>
                                                <component>Mapping Drivers</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1988] Add Any and ManyToAny annotations</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1988</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It would be really nice to have @Any and @ManyToAny relations/annotations implemented like on Hibernate.&lt;br/&gt;
&lt;a href=&quot;http://docs.jboss.org/hibernate/orm/4.1/javadocs/org/hibernate/annotations/ManyToAny.html&quot; class=&quot;external-link&quot;&gt;http://docs.jboss.org/hibernate/orm/4.1/javadocs/org/hibernate/annotations/ManyToAny.html&lt;/a&gt;&lt;br/&gt;
Right now I&apos;ve implemented these in a Symfony2 bundle (that I&apos;d be happy to share once it&apos;s ready and a bit documented), using listeners on postLoad, preFlush and prePersist&lt;br/&gt;
However I think this is a very common use case that anyone will encounter at least once/twice in every middle/big-sized project, and for this reason I think this should be implemented as a core feature.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13973">DDC-1988</key>
            <summary>Add Any and ManyToAny annotations</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="sroddy">Stefano Rodriguez</reporter>
                        <labels>
                    </labels>
                <created>Sat, 18 Aug 2012 08:50:21 +0000</created>
                <updated>Sat, 18 Aug 2012 09:05:49 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1983] Incorrect use statement in 25.1.3. Configuration example (Doctrine Console)</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1983</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The code example here:&lt;br/&gt;
&lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/tools.html#configuration-non-pear&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/tools.html#configuration-non-pear&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the second &quot;use&quot; statement it references a &quot;EntityManagerHelper&quot; from the &quot;Doctrine\DBAL\Tools\Console\Helper\&quot; package. However, it does not exist there. It does exist in the &quot;Doctrine\ORM\Tools\Console\Helper\&quot; package though, and replacing it seems to work.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13966">DDC-1983</key>
            <summary>Incorrect use statement in 25.1.3. Configuration example (Doctrine Console)</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="atli">Atli Thor Jonsson</reporter>
                        <labels>
                        <label>Cli</label>
                        <label>documentation</label>
                    </labels>
                <created>Wed, 15 Aug 2012 05:58:31 +0000</created>
                <updated>Wed, 15 Aug 2012 05:58:31 +0000</updated>
                                                                    <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1950] Useful exception when combining Column with ManyToOne</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1950</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When applying both @Column and @ManyToOne annotations to a field, it blows up with crazy internal errors. It would be great if this case &amp;#8211; and similar cases &amp;#8211; could throw a nice exception which tells the user what he did wrong.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13886">DDC-1950</key>
            <summary>Useful exception when combining Column with ManyToOne</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="igorw">Igor Wiedler</reporter>
                        <labels>
                    </labels>
                <created>Thu, 26 Jul 2012 20:10:42 +0000</created>
                <updated>Thu, 26 Jul 2012 20:10:42 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1630] Get PersistentCollection::getDeleteDiff is empty when collection changes from 1 item to zero items</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1630</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment>Symfony2</environment>
            <key id="13405">DDC-1630</key>
            <summary>Get PersistentCollection::getDeleteDiff is empty when collection changes from 1 item to zero items</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="10000" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="lmcd">Lee</reporter>
                        <labels>
                    </labels>
                <created>Tue, 31 Jan 2012 18:38:16 +0000</created>
                <updated>Sat, 9 Feb 2013 21:52:48 +0000</updated>
                                                                    <component>ORM</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17380" author="deeky666" created="Thu, 9 Feb 2012 00:23:50 +0000"  >&lt;p&gt;Same problem here. I wanted to write some unit tests, checking the entity relations and ran into exactly the same problem. Maybe my code can provide some more information (Group entity is the owning side, role entity is the inverse side):&lt;/p&gt;

&lt;p&gt;WHAT DOES NOT WORK:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;        /**
         * Test ArrayCollection
         */
        $group = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Group(&apos;Group Test&apos;);
        $em-&amp;gt;persist($group);
        $em-&amp;gt;flush();

        $groups = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ArrayCollection();
        $groups-&amp;gt;add($group);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;setGroups($groups);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertEquals($groups, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;getGroups());

        /**
         * Test PersistentCollection
         */
        $em-&amp;gt;persist($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role);
        $em-&amp;gt;flush();

        $groups = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;getGroups();
        $groups-&amp;gt;removeElement($group); &lt;span class=&quot;code-comment&quot;&gt;// first remove element before adding a &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; one
&lt;/span&gt;
        $group = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Group(&apos;Group Test 2&apos;);
        $em-&amp;gt;persist($group);
        $em-&amp;gt;flush();
        $groups-&amp;gt;add($group);        

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;setGroups($groups);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertEquals($groups, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;getGroups());
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;WHAT WORKS:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;        /**
         * Test ArrayCollection
         */
        $group = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Group(&apos;Group Test&apos;);
        $em-&amp;gt;persist($group);
        $em-&amp;gt;flush();

        $groups = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ArrayCollection();
        $groups-&amp;gt;add($group);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;setGroups($groups);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertEquals($groups, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;getGroups());

        /**
         * Test PersistentCollection
         */
        $em-&amp;gt;persist($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role);
        $em-&amp;gt;flush();

        $groups = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;getGroups();

        $group2 = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Group(&apos;Group Test 2&apos;);
        $em-&amp;gt;persist($group2);
        $em-&amp;gt;flush();
        $groups-&amp;gt;add($group2);  &lt;span class=&quot;code-comment&quot;&gt;// first adding a &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; element before removing one
&lt;/span&gt;
        $groups-&amp;gt;removeElement($group);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;setGroups($groups);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertEquals($groups, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;role-&amp;gt;getGroups());
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Hope this helps in any way... I tried figuring it out on my own but I am too drunk right now xD&lt;/p&gt;</comment>
                    <comment id="17404" author="beberlei" created="Fri, 10 Feb 2012 20:41:45 +0000"  >&lt;p&gt;Thanks for the report, formatted it&lt;/p&gt;</comment>
                    <comment id="17405" author="beberlei" created="Fri, 10 Feb 2012 20:42:00 +0000"  >&lt;p&gt;Which version is that btw?&lt;/p&gt;</comment>
                    <comment id="17429" author="deeky666" created="Thu, 16 Feb 2012 21:52:05 +0000"  >&lt;p&gt;Occurs in version 2.1.6&lt;/p&gt;</comment>
                    <comment id="17452" author="beberlei" created="Mon, 20 Feb 2012 10:00:07 +0000"  >&lt;p&gt;If group is the owning side, why do you only set Role::$groups? This has to be the other way around or not?&lt;/p&gt;</comment>
                    <comment id="17453" author="beberlei" created="Mon, 20 Feb 2012 10:33:24 +0000"  >&lt;p&gt;@Steve&lt;/p&gt;

&lt;p&gt;I cannot reproduce your issue.&lt;/p&gt;

&lt;p&gt;Attached is a test script.&lt;/p&gt;

&lt;p&gt;Your code is very weird btw, why are you getting and setting groups collection? It is passed by reference so you can just have something like $role-&amp;gt;addGroup() and $role-&amp;gt;removeGroup() and encapsulate the logic?&lt;/p&gt;

&lt;p&gt;Also your tests are pretty useless, you check if two variables which are the same reference to the same collection are the same. Which should always be true.&lt;/p&gt;

&lt;p&gt;@Lee&lt;/p&gt;

&lt;p&gt;Can you provide more details? I cant verify this without more details.&lt;/p&gt;</comment>
                    <comment id="19505" author="asm89" created="Sat, 9 Feb 2013 21:52:48 +0000"  >&lt;p&gt;Can anyone provide us with more feedback?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11164" name="DDC1630Test.php" size="1446" author="beberlei" created="Mon, 20 Feb 2012 10:33:39 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1555] Reference. 8 Work. with obj. Making &quot;see &quot;Transitive Persistence&quot;&quot; as link</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1555</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;8. Working with Objects:&lt;br/&gt;
&quot;... if the relationships from X to these other entities are mapped with cascade=PERSIST or cascade=ALL (see &quot;Transitive Persistence&quot;).&quot;&lt;br/&gt;
&quot;... with cascade=REMOVE or cascade=ALL (see &quot;Transitive Persistence&quot;).&quot;&lt;br/&gt;
and so on.&lt;br/&gt;
Maybe it&apos;s reasonable to make &quot;Transitive Persistence&quot; as links to &lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.1/en/reference/working-with-associations.html#transitive-persistence-cascade-operations&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.1/en/reference/working-with-associations.html#transitive-persistence-cascade-operations&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13293">DDC-1555</key>
            <summary>Reference. 8 Work. with obj. Making &quot;see &quot;Transitive Persistence&quot;&quot; as link</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="dattaya">Yaroslav Kiliba</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Dec 2011 14:51:35 +0000</created>
                <updated>Thu, 22 Dec 2011 14:55:31 +0000</updated>
                                    <version>2.1</version>
                <version>2.1.1</version>
                <version>2.1.2</version>
                <version>2.1.3</version>
                <version>2.1.4</version>
                <version>2.1.5</version>
                                                <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1518] Method chaining in Setters of generated entity classes</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1518</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi.&lt;br/&gt;
It would be nice if the set-methods of the generated entity classes would return the entity instance itself, so that method chaining is possible.&lt;br/&gt;
Example:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$user = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; User();
$user-&amp;gt;setUsername()
     -&amp;gt;setFirstname()
     -&amp;gt;setEmail();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In PHP 5.4 we can do even more nicer:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$user = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; User()
     -&amp;gt;setUsername()
     -&amp;gt;setFirstname()
     -&amp;gt;setEmail();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If this is not wanted by everyone, the console tool could get a new argument to define if method chaining should be used or not.&lt;/p&gt;

&lt;p&gt;Implementation of this improvement would be very nice. Thanks.&lt;/p&gt;</description>
                <environment>Symfony2</environment>
            <key id="13236">DDC-1518</key>
            <summary>Method chaining in Setters of generated entity classes</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="naitsirch">Christian Stoller</reporter>
                        <labels>
                    </labels>
                <created>Fri, 2 Dec 2011 13:45:40 +0000</created>
                <updated>Fri, 2 Dec 2011 13:45:40 +0000</updated>
                                                                    <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1511] Suggestion on the docs for batch processing</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1511</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am refering to the examples on&lt;/p&gt;

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

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

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

<item>
            <title>[DDC-1494] Query results are overwritten by previous query.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1494</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am running a query that JOINs three tables, with a simple WHERE:&lt;/p&gt;

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

SELECT cat, n, c
FROM Project_Model_NoticeCategory cat
JOIN cat.notices n
JOIN n.chapters c
WHERE
c.id = :chapter_id

&quot;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When I do this:&lt;/p&gt;

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

  $q-&amp;gt;setParameter(&apos;chapter_id&apos;, 2);
  $b = $q-&amp;gt;getResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;$b always has the wrong results. Running the following code:&lt;/p&gt;

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

  $q-&amp;gt;setParameter(&apos;chapter_id&apos;, 2);
  $b = $q-&amp;gt;getResult();
  $z = $q-&amp;gt;getArrayResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;BUG Results: $b != $z (getArrayResult IS CORRECT, it refreshes the results) Note: $a==$b (which is wrong)&lt;/p&gt;

&lt;p&gt;Explanation:&lt;/p&gt;

&lt;p&gt;There is a chapter table, this has a many-to-many join to notices (these are meta info&lt;br/&gt;
about the chapter &amp;#8211; a little like tagging a blog post) the notices are grouped into&lt;br/&gt;
categories.&lt;/p&gt;

&lt;p&gt;Data model:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;chapter&quot;&lt;/span&gt;)
 */
class Project_Model_Chapter
{
    /**
     * @Id @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     * @GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;AUTO&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;
 
    /** @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;) */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $title;

	/**
	 * @ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Project_Model_Notice&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;chapters&quot;&lt;/span&gt;)
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $notices;
	
	.... /lots of code snipped/ ....
	
}


/**
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;notice&quot;&lt;/span&gt;)
 */
class Project_Model_Notice
{
	/**
     * @Id @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     * @GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;AUTO&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;
 
    /** @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;) */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $title;
	
	/**
	 * @ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Project_Model_Chapter&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;notices&quot;&lt;/span&gt;)
	 * @JoinTable(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;chapter_notice&quot;&lt;/span&gt;)
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $chapters;
	
	/**
	 * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Project_Model_NoticeCategory&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;notices&quot;&lt;/span&gt;)
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $notice_category;
	
	.... /lots of code snipped/ ....
	
}

/**
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;notice_category&quot;&lt;/span&gt;)
 */
class Project_Model_NoticeCategory
{
    /**
     * @Id @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     * @GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;AUTO&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;
	/** @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;) */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $title;
	
	/**
	 * Bidirectional - One-To-Many (INVERSE SIDE)
	 *
	 * @OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Project_Model_Notice&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;notice_category&quot;&lt;/span&gt;, cascade={&lt;span class=&quot;code-quote&quot;&gt;&quot;persist&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;remove&quot;&lt;/span&gt;})
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $notices;

	.... /lots of code snipped/ ....
	
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Data fixtures:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$tools = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Project_Model_NoticeCategory;
$tools-&amp;gt;setTitle(&apos;Tools&apos;);
		
$spanner = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Project_Model_Notice;
$spanner-&amp;gt;setTitle(&apos;spanner&apos;);
$tools-&amp;gt;addNotice($spanner);
		
$drill = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Project_Model_Notice;
$drill-&amp;gt;setTitle(&apos;power drill&apos;);
$tools-&amp;gt;addNotice($drill);
		
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;persist($tools);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;flush();

$tools = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Project_Model_NoticeCategory;
$tools-&amp;gt;setTitle(&apos;Safety&apos;);
		
$gloves = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Project_Model_Notice;
$gloves-&amp;gt;setTitle(&apos;gloves&apos;);
$tools-&amp;gt;addNotice($gloves);
		
$goggles = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Project_Model_Notice;
$goggles-&amp;gt;setTitle(&apos;goggles&apos;);
$tools-&amp;gt;addNotice($goggles);
		
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;persist($tools);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;flush();

$chapter1 = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Project_Model_Chapter;
$chapter1-&amp;gt;setTitle(&apos;Chapter 1&apos;);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;persist($chapter1);

$chapter2 = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Project_Model_Chapter;
$chapter2-&amp;gt;setTitle(&apos;Chapter 2&apos;);
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;persist($chapter2);

$chapter1-&amp;gt;addNotice($spanner);
$chapter1-&amp;gt;addNotice($gloves);

$chapter2-&amp;gt;addNotice($spanner);
$chapter2-&amp;gt;addNotice($gloves);
$chapter2-&amp;gt;addNotice($drill);
$chapter2-&amp;gt;addNotice($goggles);

&lt;span class=&quot;code-comment&quot;&gt;// now persist and flush everything&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Initial investigation:&lt;/p&gt;

&lt;p&gt;I think it has something to do with HINT_REFRESH ? Stepping through:&lt;/p&gt;

&lt;p&gt;ObjectHydrator-&amp;gt;_hydrateRow&lt;br/&gt;
ObjectHydrator-&amp;gt;_getEntity&lt;/p&gt;

&lt;p&gt;when it requests the Project_Model_Category from the unit of work, it&lt;br/&gt;
seems that the second query is simply grabbing the cached results from&lt;br/&gt;
the first results. This MUST be wrong as the second query uses a&lt;br/&gt;
different query (the ID changes) and all the results are wrong.&lt;/p&gt;
</description>
                <environment>PHP 5.3 + MySQL 5.5</environment>
            <key id="13188">DDC-1494</key>
            <summary>Query results are overwritten by previous query.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="10000" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="monk.e.boy">J</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Nov 2011 09:56:12 +0000</created>
                <updated>Sat, 9 Feb 2013 20:26:53 +0000</updated>
                                    <version>2.1.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="16834" author="beberlei" created="Tue, 15 Nov 2011 10:19:13 +0000"  >&lt;p&gt;Fixed formatting&lt;/p&gt;</comment>
                    <comment id="16870" author="beberlei" created="Fri, 18 Nov 2011 17:43:12 +0000"  >&lt;p&gt;are you using result caching?&lt;/p&gt;</comment>
                    <comment id="16898" author="monk.e.boy" created="Mon, 21 Nov 2011 14:45:09 +0000"  >&lt;p&gt;This is part of my bootstrap&lt;br/&gt;
,&lt;br/&gt;
,&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;		
$config = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\ORM\Configuration();
		
$cache = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\Common\Cache\ArrayCache;
$config-&amp;gt;setMetadataCacheImpl($cache);
$config-&amp;gt;setQueryCacheImpl($cache);
		
&lt;span class=&quot;code-comment&quot;&gt;// driver: schema
&lt;/span&gt;$driver = $config-&amp;gt;newDefaultAnnotationDriver(
	APPLICATION_PATH . &apos;/models&apos;
);
$config-&amp;gt;setMetadataDriverImpl($driver);

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="16998" author="beberlei" created="Thu, 15 Dec 2011 20:49:29 +0000"  >&lt;p&gt;Cannot reproduce it with the script attached. Can you try to modify this to fail or write your own testcase?&lt;/p&gt;</comment>
                    <comment id="16999" author="beberlei" created="Thu, 15 Dec 2011 20:49:47 +0000"  >&lt;p&gt;Downgraded&lt;/p&gt;</comment>
                    <comment id="19499" author="asm89" created="Sat, 9 Feb 2013 20:26:43 +0000"  >&lt;p&gt;Please provide extra feedback.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11131" name="DDC1494Test.php" size="1591" author="beberlei" created="Thu, 15 Dec 2011 20:49:29 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1493] Improving in() from ExpressionBuilder</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1493</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Instead of this piece of code:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$literal = $expr-&amp;gt;literal($v);
$expr-&amp;gt;andX(
  $expr-&amp;gt;eq(&apos;at.key&apos;, $expr-&amp;gt;literal($k)),
  $expr-&amp;gt;orX(
    $expr-&amp;gt;eq(&apos;a.valueInt&apos;, $literal),
    $expr-&amp;gt;eq(&apos;a.valueText&apos;, $literal),
    $expr-&amp;gt;eq(&apos;a.valueDate&apos;, $literal)
  )
);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I would like to simplify my query by using this syntax:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$expr-&amp;gt;andX(
  $expr-&amp;gt;eq(&apos;at.key&apos;, $expr-&amp;gt;literal($k)),
  $expr-&amp;gt;in($expr-&amp;gt;literal($v), array(&apos;a.valueInt&apos;, &apos;a.valueText&apos;, &apos;a.valueDate&apos;))
);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="13187">DDC-1493</key>
            <summary>Improving in() from ExpressionBuilder</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="h-andreas">Andreas H&#246;rnicke</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Nov 2011 08:06:02 +0000</created>
                <updated>Tue, 15 Nov 2011 08:06:02 +0000</updated>
                                    <version>2.1.2</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1916] Centralize the Cache mechanism simplifying the query creation</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1916</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;in a big project if you have queries spread out in different&lt;br/&gt;
repositories,&lt;br/&gt;
when you have to modify a cache lifetime, you have to search the query and&lt;br/&gt;
modify the code, than test it.&lt;br/&gt;
Is not so easy also to answer to  &apos;how much is the cache for the query XYZ?&apos; &lt;/p&gt;

&lt;p&gt;the idea:&lt;br/&gt;
Each group of repository (bundle) should have in a single point maybe into its config file a place where you could set the lifetime of the various queries. &lt;/p&gt;

&lt;p&gt;see the code for a better explanation&lt;br/&gt;
&lt;a href=&quot;https://gist.github.com/3075742&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/3075742&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;the pro: a better handling of the cache mechanism&lt;br/&gt;
cons: ?&lt;/p&gt;

&lt;p&gt;Do you think is a good approach?&lt;br/&gt;
Have you ever had a similar problem?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;liuggio&lt;/p&gt;</description>
                <environment></environment>
            <key id="13834">DDC-1916</key>
            <summary>Centralize the Cache mechanism simplifying the query creation</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="liuggio">liuggio</reporter>
                        <labels>
                    </labels>
                <created>Mon, 9 Jul 2012 13:02:07 +0000</created>
                <updated>Mon, 9 Jul 2012 13:15:49 +0000</updated>
                                                                    <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1921] Clarify Identifier definition for CTI entities</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1921</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;Reference Guide topic 4.8 Identifers/Primary Keys(&lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#identifiers-primary-keys&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#identifiers-primary-keys&lt;/a&gt;) states that: &quot;Every entity class needs an identifier/primary key.&quot;&lt;/p&gt;

&lt;p&gt;However, example in topic 7.3. Class Table Inheritance (&lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/inheritance-mapping.html#class-table-inheritance&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/inheritance-mapping.html#class-table-inheritance&lt;/a&gt;) doesn&apos;t contain any definitions for Ids.&lt;/p&gt;

&lt;p&gt;Consider following code:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * @Entity
 * @InheritanceType(&lt;span class=&quot;code-quote&quot;&gt;&quot;JOINED&quot;&lt;/span&gt;)
 * @DiscriminatorColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;discr&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
 * @DiscriminatorMap({&lt;span class=&quot;code-quote&quot;&gt;&quot;person&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;Person&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;employee&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;Employee&quot;&lt;/span&gt;})
 */
class Person
{
    /** @Id @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;) */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getId() {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;id;
    }
}

/** @Entity */
class Employee &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Person
{
    /** @Id @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;) */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;

    &lt;span class=&quot;code-comment&quot;&gt;// Overrides parent to retrieve &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt;
&lt;/span&gt;    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getId() {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;id;
    }
}

&lt;span class=&quot;code-comment&quot;&gt;// create instances and $em-&amp;gt;persist(...)
&lt;/span&gt;
&lt;span class=&quot;code-comment&quot;&gt;// $person &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; Person
&lt;/span&gt;$person-&amp;gt;getId(); &lt;span class=&quot;code-comment&quot;&gt;// Returns id.
&lt;/span&gt;
&lt;span class=&quot;code-comment&quot;&gt;// $employee &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; Employee
&lt;/span&gt;$employee-&amp;gt;getId(); &lt;span class=&quot;code-comment&quot;&gt;// Returns &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;. Private $id in subclass isn&apos;t assigned.&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Please clarify correct use of identifiers in CTI subclass entities. Should subclasses contain any definitions of identifiers?&lt;/p&gt;

&lt;p&gt;Thank you!&lt;/p&gt;

&lt;p&gt;Ludek&lt;/p&gt;</description>
                <environment></environment>
            <key id="13847">DDC-1921</key>
            <summary>Clarify Identifier definition for CTI entities</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jir