<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Wed May 22 11:39:53 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+DDC+AND+fixVersion+%3D+%222.1.2%22+ORDER+BY+updated+DESC%2C+priority+DESC%2C+created+ASC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://www.doctrine-project.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Doctrine Project</title>
        <link>http://www.doctrine-project.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+DDC+AND+fixVersion+%3D+%222.1.2%22+ORDER+BY+updated+DESC%2C+priority+DESC%2C+created+ASC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="16" total="16"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DDC-1397] Accesing a OneToMany relation with Child Classes and OneToOne relations.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1397</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I am facing a small issue on Doctrine 2 that causes OneToOne relation needed to be part of the parent class. The error occurs when doing $content-&amp;gt;getVersions() but not when doing $em-&amp;gt;find(&quot;Model\Lantern\Content\Version&quot;, $id). The error message is:&lt;/p&gt;


&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;Warning: Undefined index: summary in ORM/UnitOfWork.php:2012
Fatal error: Call to a member function setValue() on a non-object in ORM/UnitOfWork.php on line 2013
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Error replication:&lt;/p&gt;

&lt;p&gt;Simply by having a look at the model we can see what&apos;s causing the Bug, will avoid class annotations to make it simpler:&lt;/p&gt;
&lt;div class=&quot;code panel&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 Content{
    /**
    * @OneToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Version&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;content&quot;&lt;/span&gt;)
    */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $versions;
...
}

class Version{
    /**
     * @ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Content&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;versions&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;content_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;content_id&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $content;
...
}

class Article &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Version{
    /** @OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Model\Lantern\Content\Fieldset\Summary&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;version&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;delete&quot;&lt;/span&gt;}) */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $summary;  
...
}

class Summary{
    /**
     * @OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Model\Lantern\Content\Version&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;summary&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;version_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;version_id&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $version;    
...
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As you can see, Article::$summary targets Summary::$version, but Summary::$version targets Version::$summary. This in OOP is valid as Version is contained inside Article, so doing a downcasting will get Article::summary.&lt;/p&gt;

&lt;p&gt;The reason I believe why using $em-&amp;gt;find works is that $em-&amp;gt;find already knows which child class is before doing map, and relations works fine.&lt;br/&gt;
On the other hand, when doing $content-&amp;gt;getVersions(), Content::$versions targets Version, and looks like Doctrine does not resolve which child class it before mapping OneToOne relationshipg.&lt;/p&gt;

&lt;p&gt;This bug doesn&apos;t occur with OneToMany or ManyToMany relationships.&lt;/p&gt;</description>
                <environment>Ubuntu 10.10 64bit&lt;br/&gt;
PHP 5.3.3&lt;br/&gt;
MySQL 5.1.49&lt;br/&gt;
Doctrine 2.1.2</environment>
            <key id="13051">DDC-1397</key>
            <summary>Accesing a OneToMany relation with Child Classes and OneToOne relations.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="gbrunacci">Gabriel Brunacci</reporter>
                        <labels>
                    </labels>
                <created>Thu, 29 Sep 2011 15:18:00 +0000</created>
                <updated>Sat, 15 Oct 2011 17:19:41 +0000</updated>
                    <resolved>Sat, 15 Oct 2011 17:19:41 +0000</resolved>
                            <version>2.1</version>
                <version>2.1.1</version>
                <version>2.1.2</version>
                                <fixVersion>2.1.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16536" author="gbrunacci" created="Thu, 29 Sep 2011 15:20:16 +0000"  >&lt;p&gt;A side but useful note: when I move @OneToOne relation to the parent class Version, The error doesn&apos;t happen.&lt;/p&gt;</comment>
                    <comment id="16546" author="guilhermeblanco" created="Tue, 4 Oct 2011 04:37:25 +0000"  >&lt;p&gt;Should be the Summary::$version pointing to Article::$summary.&lt;/p&gt;

&lt;p&gt;Your mapping is wrong conceptually in OOP, because you&apos;re referring a non-existing property of Version ($summary is only part of Article).&lt;br/&gt;
Please fix the issue and check out if the error still persist.&lt;/p&gt;</comment>
                    <comment id="16607" author="beberlei" created="Sat, 15 Oct 2011 17:19:31 +0000"  >&lt;p&gt;The mapping is wrong as guilherme said, &lt;/p&gt;

&lt;div class=&quot;code panel&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 Summary{
    /**
     * @OneToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Model\Lantern\Content\Article&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;summary&quot;&lt;/span&gt;)
     * @JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;version_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;version_id&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $version;    
...
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1392] Merge for not initialized entity proxy object with set ID fails</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1392</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Problem is that UnitOfWork::doMerge() calls ClassMetadata::getIdentifierValues() for the entity but that function doesn&apos;t have case for not initialized proxy. It just reads the Id properties from the object&apos;s reflection.&lt;/p&gt;

&lt;p&gt;It should load the proxy or get the ID stored inside the proxy object or doMerge must initialize it maybe.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13038">DDC-1392</key>
            <summary>Merge for not initialized entity proxy object with set ID fails</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="gedrox">Aigars Gedroics</reporter>
                        <labels>
                    </labels>
                <created>Fri, 23 Sep 2011 15:21:21 +0000</created>
                <updated>Mon, 26 Sep 2011 11:13:13 +0000</updated>
                    <resolved>Sun, 25 Sep 2011 16:10:21 +0000</resolved>
                            <version>2.1.1</version>
                                <fixVersion>2.1.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16500" author="gedrox" created="Fri, 23 Sep 2011 15:41:41 +0000"  >&lt;p&gt;I have taken the DDC353 test as the base for this test case.&lt;br/&gt;
Hopefully it works because I have executed it in slightly different version without the Doctrine tests environment.&lt;/p&gt;</comment>
                    <comment id="16514" author="beberlei" created="Sun, 25 Sep 2011 16:10:21 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                    <comment id="16528" author="gedrox" created="Mon, 26 Sep 2011 11:13:13 +0000"  >&lt;p&gt;I would put the changes inside the method getIdentifierValues not before it&apos;s execution.&lt;/p&gt;

&lt;p&gt;Isn&apos;t it plausible that it is called with not initialized proxy from somewhere else?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11066" name="DDC1392Test.php" size="2794" author="gedrox" created="Fri, 23 Sep 2011 15:41:41 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1381] Typo in ClassMetadataFactory</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1381</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/2.1.x/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php#L343&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/2.1.x/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php#L343&lt;/a&gt; `$className` should be `$class-&amp;gt;name` this is fixed in master.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13025">DDC-1381</key>
            <summary>Typo in ClassMetadataFactory</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="henrikbjorn">Henrik Bjornskov</reporter>
                        <labels>
                    </labels>
                <created>Mon, 19 Sep 2011 07:16:08 +0000</created>
                <updated>Sun, 25 Sep 2011 17:11:17 +0000</updated>
                    <resolved>Sun, 25 Sep 2011 17:11:17 +0000</resolved>
                            <version>2.1</version>
                <version>2.1.1</version>
                                <fixVersion>2.1.2</fixVersion>
                                <component>Mapping Drivers</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16518" author="beberlei" created="Sun, 25 Sep 2011 17:11:17 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1337] Rollback doesn&apos;t work on transactional multi table update with mysql</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1337</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When doing transactional multi table update using DQL query the changes are not rolled back after exception is raised after the 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-html&quot;&gt;$em-&amp;gt;transactional(function($entityManager) {
    $dql = &lt;span class=&quot;code-quote&quot;&gt;&quot;UPDATE ...&quot;&lt;/span&gt;; // some multi table update DQL
    $query = $entityManager-&amp;gt;createQuery($dql);
    $query-&amp;gt;execute();

    throw new Exception();
});&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is because Doctrine executes &quot;DROP TABLE&quot; for temporary table created for the update but MySQL is doing commit right after DROP and CREATE statements automatically.&lt;/p&gt;

&lt;p&gt;From PHP documentation:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&quot;Some databases, including MySQL, automatically issue an implicit COMMIT when a database definition language (DDL) statement such as DROP TABLE or CREATE TABLE is issued within a transaction. The implicit COMMIT will prevent you from rolling back any other changes within the transaction boundary.&quot;&lt;/p&gt;&lt;/blockquote&gt;</description>
                <environment>Mysql 5.1.54-1ubuntu4</environment>
            <key id="12932">DDC-1337</key>
            <summary>Rollback doesn&apos;t work on transactional multi table update with mysql</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="gedrox">Aigars Gedroics</reporter>
                        <labels>
                    </labels>
                <created>Thu, 18 Aug 2011 15:02:50 +0000</created>
                <updated>Sun, 25 Sep 2011 17:08:28 +0000</updated>
                    <resolved>Sun, 25 Sep 2011 17:08:28 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.1.2</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16352" author="gedrox" created="Thu, 18 Aug 2011 15:21:20 +0000"  >&lt;p&gt;I have done temporary workaround just by commenting out the line &lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;165: $conn-&amp;gt;executeUpdate($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_dropTempTableSql);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;from class Doctrine\ORM\Query\Exec\MultiTableUpdateExecutor.&lt;/p&gt;

&lt;p&gt;I guess it is not correct solution for all platforms, is it?&lt;/p&gt;</comment>
                    <comment id="16353" author="beberlei" created="Thu, 18 Aug 2011 18:34:43 +0000"  >&lt;p&gt;This is a problem with MySQL and Inheritance. Not sure how we can fix this.&lt;/p&gt;</comment>
                    <comment id="16360" author="gedrox" created="Fri, 19 Aug 2011 10:05:46 +0000"  >&lt;p&gt;Partial workaround is not dropping the temporary tables at all when on MySQL (at least) platform. These tables are session based and will be dropped automatically.&lt;/p&gt;

&lt;p&gt;Still it can&apos;t be predicted when a temporary table will be needed inside the transaction, so we cannot make sure the CREATE TEMPORARY TABLE won&apos;t be called inside transaction after something has been updated already.&lt;/p&gt;

&lt;p&gt;I think the best solution would be to raise exception when temporary table must be created or dropped while inside the transaction. Developer should call temporary table creation and removal manually before/after the transactional code part if it might be needed by the Doctrine.&lt;/p&gt;

&lt;p&gt;In my opinion this is really important issue because no warning or exception was raised by the code in the case of rollback, still it didn&apos;t work as expected.&lt;/p&gt;</comment>
                    <comment id="16363" author="gedrox" created="Fri, 19 Aug 2011 14:29:30 +0000"  >&lt;p&gt;Additionally needed to change temporary table name generation function ClassMetadataInfo::getTemporaryIdTableName() by adding incrementing property suffix:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; str_replace(&apos;.&apos;, &apos;_&apos;, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;table[&apos;name&apos;] . &apos;_id_tmp_&apos; . $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;counter++);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;after removed temporary table drop execution.&lt;/p&gt;</comment>
                    <comment id="16386" author="beberlei" created="Sat, 27 Aug 2011 15:55:01 +0000"  >&lt;p&gt;This seems very tricky:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;A solution would mean: Open a new connection, create a &quot;real&quot; table. Use that from the original connection.&lt;/li&gt;
	&lt;li&gt;Another would be to create the temporary table BEFORE starting the transaction. However how do we know this?&lt;/li&gt;
	&lt;li&gt;An immediate and simple fix would be to throw an exception and prevent UPDATE and DELETE on joined table inheritance entities when run inside an transaction.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    <comment id="16420" author="beberlei" created="Sun, 4 Sep 2011 12:37:40 +0000"  >&lt;p&gt;I wouldnt consider the php documentation to be a good source on MySQL.&lt;/p&gt;

&lt;p&gt;If you read &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/implicit-commit.html&quot; class=&quot;external-link&quot;&gt;http://dev.mysql.com/doc/refman/5.1/en/implicit-commit.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You get:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ALTER TABLE, CREATE TABLE, and DROP TABLE do not commit a transaction if the TEMPORARY keyword is used. (This does not apply to other operations on temporary tables such as CREATE INDEX, which do cause a commit.) However, although no implicit commit occurs, neither can the statement be rolled back. Therefore, use of such statements will violate transaction atomicity: For example, if you use CREATE TEMPORARY TABLE and then roll back the transaction, the table remains in existence. &lt;/p&gt;&lt;/blockquote&gt;</comment>
                    <comment id="16421" author="beberlei" created="Sun, 4 Sep 2011 12:44:47 +0000"  >&lt;p&gt;Verified that transactions do not get committed when you CREATE or DROP temporary tables. That is also with MySQL 5.1.54 / Ubuntu&lt;/p&gt;

&lt;p&gt;You seem to have some other kind of error or something?&lt;/p&gt;</comment>
                    <comment id="16425" author="gedrox" created="Sun, 4 Sep 2011 18:43:02 +0000"  >&lt;p&gt;I&apos;m almost sure that updated data was committed in my situation, but will check and provide the test case if possible.&lt;/p&gt;</comment>
                    <comment id="16493" author="gedrox" created="Mon, 19 Sep 2011 11:42:07 +0000"  >&lt;p&gt;Found the problem!&lt;br/&gt;
It&apos;s because the Doctrine calls &quot;DROP TABLE&quot; instead of &quot;DROP TEMPORARY TABLE&quot; when getting rid of the temporary tables.&lt;/p&gt;

&lt;p&gt;To prove this strange MySQL behaviour, such PHP script can be executed:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$pdo = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; PDO(&apos;mysql:dbname=test&apos;, 
        &apos;root&apos;, 
        &apos;root&apos;, 
        array(PDO::ATTR_ERRMODE =&amp;gt; PDO::ERRMODE_EXCEPTION));

$pdo-&amp;gt;exec(&apos;DROP TABLE IF EXISTS a&apos;);
$pdo-&amp;gt;exec(&apos;CREATE TABLE a (a INT) ENGINE = innodb&apos;);

$pdo-&amp;gt;beginTransaction();

$pdo-&amp;gt;exec(&apos;INSERT INTO a VALUES (1)&apos;);
$pdo-&amp;gt;exec(&apos;CREATE TEMPORARY TABLE c (b &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;) ENGINE = innodb&apos;);
$pdo-&amp;gt;exec(&apos;DROP TABLE c&apos;);
$pdo-&amp;gt;exec(&apos;INSERT INTO a VALUES (2)&apos;);

$pdo-&amp;gt;rollBack();

$st = $pdo-&amp;gt;prepare(&apos;SELECT * FROM a&apos;);
$st-&amp;gt;execute();
$row = $st-&amp;gt;fetch(PDO::FETCH_ASSOC);

var_dump($row);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The dump should output &quot;false&quot;, still the first inserted record is output.&lt;/p&gt;

&lt;p&gt;This is actual at least on Mysql 5.1.54-1ubuntu4 and PHP 5.3.6.&lt;/p&gt;

&lt;p&gt;The solution is trivial - use &quot;DROP TEMPORARY TABLE&quot; syntax instead.&lt;/p&gt;</comment>
                    <comment id="16516" author="beberlei" created="Sun, 25 Sep 2011 16:25:00 +0000"  >&lt;p&gt;Verified, even on mysql console client.&lt;/p&gt;

&lt;p&gt;Thanks for investigating, big thumbs up.&lt;/p&gt;</comment>
                    <comment id="16517" author="beberlei" created="Sun, 25 Sep 2011 17:08:28 +0000"  >&lt;p&gt;Fixed.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1367] Include path not passed to ClassLoader when autoloading Doctrine library from directory</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1367</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The bug is in ORM\Tools\Setup.php in the function registerAutoloadDirectory($directory), specificially the following line:&lt;/p&gt;

&lt;p&gt;$loader = new ClassLoader(&quot;Doctrine&quot;);&lt;/p&gt;

&lt;p&gt;Which should actually be:&lt;/p&gt;

&lt;p&gt;$loader = new ClassLoader(&quot;Doctrine&quot;, $directory);&lt;/p&gt;

&lt;p&gt;As it stands the actual directory location is not being passed to the ClassLoader while attempting to autoload the Doctrine from that specified directory. Under certain circumstances this causes loading to completely fail (although in cases where this function is being called from a parent directory to Doctrine this seems to go unnoticed - perhaps why this was not picked up sooner?)&lt;/p&gt;</description>
                <environment>Found while trying to write a Doctrine 2.1 module for Kohana.</environment>
            <key id="13004">DDC-1367</key>
            <summary>Include path not passed to ClassLoader when autoloading Doctrine library from directory</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="vanit">Lucas Brown</reporter>
                        <labels>
                    </labels>
                <created>Thu, 8 Sep 2011 00:02:19 +0000</created>
                <updated>Sun, 25 Sep 2011 14:41:43 +0000</updated>
                    <resolved>Sun, 25 Sep 2011 14:41:43 +0000</resolved>
                            <version>2.1</version>
                <version>2.1.1</version>
                <version>Git Master</version>
                                <fixVersion>2.1.2</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16508" author="beberlei" created="Sun, 25 Sep 2011 14:41:43 +0000"  >&lt;p&gt;Fixed and merged into 2.1.x&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1321] OrphanRemoval with bi-directional one-to-one on inverse sides</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1321</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Something is weird here, example: Remove CmsUser that has CmsAddress&lt;/p&gt;</description>
                <environment></environment>
            <key id="12905">DDC-1321</key>
            <summary>OrphanRemoval with bi-directional one-to-one on inverse sides</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 6 Aug 2011 20:02:10 +0000</created>
                <updated>Sun, 25 Sep 2011 13:08:09 +0000</updated>
                    <resolved>Tue, 6 Sep 2011 04:54:53 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.1.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16439" author="guilhermeblanco" created="Tue, 6 Sep 2011 04:54:53 +0000"  >&lt;p&gt;This commit fixes the issue: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/2cfc61db8445be0696003cda2f9c55d70bec6480&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/2cfc61db8445be0696003cda2f9c55d70bec6480&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please merge in 2.1. =)&lt;/p&gt;</comment>
                    <comment id="16503" author="beberlei" created="Sun, 25 Sep 2011 13:08:09 +0000"  >&lt;p&gt;Merged&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1031] Cascade ALL Case-Sensitive in Annotations Driver?</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1031</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="12384">DDC-1031</key>
            <summary>Cascade ALL Case-Sensitive in Annotations Driver?</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 13 Feb 2011 14:06:03 +0000</created>
                <updated>Wed, 14 Sep 2011 20:02:36 +0000</updated>
                    <resolved>Wed, 14 Sep 2011 20:02:36 +0000</resolved>
                                            <fixVersion>2.1.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16440" author="guilhermeblanco" created="Tue, 6 Sep 2011 04:58:33 +0000"  >&lt;p&gt;Is this issue still valid?&lt;/p&gt;

&lt;p&gt;In ClassMetadataInfo (around line 839), there&apos;s a prevention for 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;$cascades = isset($mapping[&apos;cascade&apos;]) ? array_map(&apos;strtolower&apos;, $mapping[&apos;cascade&apos;]) : array();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If not valid anymore, please close.&lt;/p&gt;</comment>
                    <comment id="16472" author="guilhermeblanco" created="Wed, 14 Sep 2011 20:02:36 +0000"  >&lt;p&gt;No response, closing. If it is still valid, please reopen.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-869] repositoryClass poperty not possible on MappedSuperClass</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-869</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It would be both practical and intuitive to support the &quot;repositoryClass&quot; metadata property on a MappedSuperClass. Any subclasses would inherit that custom Repo class, optionally overriding it.&lt;/p&gt;

&lt;p&gt;With the current situation one would have to add the property to every subclass, which may lead to a lot of duplicate meta data.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12085">DDC-869</key>
            <summary>repositoryClass poperty not possible on MappedSuperClass</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="jkleijn">John Kleijn</reporter>
                        <labels>
                    </labels>
                <created>Tue, 9 Nov 2010 05:17:45 +0000</created>
                <updated>Thu, 8 Sep 2011 17:29:12 +0000</updated>
                    <resolved>Thu, 8 Sep 2011 17:29:12 +0000</resolved>
                            <version>2.0-BETA4</version>
                                <fixVersion>2.1.2</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16458" author="guilhermeblanco" created="Thu, 8 Sep 2011 17:29:12 +0000"  >&lt;p&gt;Fixed by this commit &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/7ebfc67d5a477380cd3ebac0e03e715d7a5f290c&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/7ebfc67d5a477380cd3ebac0e03e715d7a5f290c&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1356] DQL does not accept a parameter containing Entities</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1356</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Currently, it is impossible to provide an argument that is a collection of Entities. 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;$userA = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; CmsUser;
$userA-&amp;gt;name = &apos;Benjamin&apos;;
$userA-&amp;gt;username = &apos;beberlei&apos;;
$userA-&amp;gt;status = &apos;developer&apos;;
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;persist($userA);
        
$userB = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; CmsUser;
$userB-&amp;gt;name = &apos;Roman&apos;;
$userB-&amp;gt;username = &apos;romanb&apos;;
$userB-&amp;gt;status = &apos;developer&apos;;
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;persist($userB);

$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;flush();
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;clear();

$query = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_em-&amp;gt;createQuery(&lt;span class=&quot;code-quote&quot;&gt;&quot;SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u IN (?0)&quot;&lt;/span&gt;);
$query-&amp;gt;setParameter(0, array($userA, $userB));
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Returns this error currently:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt; of class Doctrine\Tests\Models\CMS\CmsUser could not be converted to string
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="12990">DDC-1356</key>
            <summary>DQL does not accept a parameter containing 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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="guilhermeblanco">Guilherme Blanco</reporter>
                        <labels>
                    </labels>
                <created>Thu, 1 Sep 2011 22:05:43 +0000</created>
                <updated>Sun, 4 Sep 2011 12:33:22 +0000</updated>
                    <resolved>Thu, 1 Sep 2011 22:07:51 +0000</resolved>
                                            <fixVersion>2.1.2</fixVersion>
                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16409" author="guilhermeblanco" created="Thu, 1 Sep 2011 22:07:51 +0000"  >&lt;p&gt;Fixed in &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/3b3186ee98392802a44118cd421a3530119aa7ea&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/3b3186ee98392802a44118cd421a3530119aa7ea&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="16419" author="beberlei" created="Sun, 4 Sep 2011 12:33:22 +0000"  >&lt;p&gt;Merged&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1354] ClassName proxy classes has includes &apos;\&apos; in front of namespace while other don&apos;t</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1354</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The classname given to the EntityPersister by the ProxyFactory includes a backslash &apos;\&apos; in front of the namespace while normal classes and the proxy itself don&apos;t have this. This issue causes it impossible to persist proxyclasses, because of the string comparison in UnitOfWork::executeUpdates in the statement [ get_parent_class($entity) == $className ] this will do &apos;some\namespace\someclass&apos; == &apos;\some\namespace\someclass&apos;&lt;/p&gt;

&lt;p&gt;Aftter some debugging work it seems the &apos;\&apos; is trimmed of when getting the ClassMetadata while this isn&apos;t done when a the proxyfactory creates the proxy. So it is probably fixed by placing:&lt;/p&gt;

&lt;p&gt;$className = ltrim($className, &apos;\&apos;);&lt;/p&gt;

&lt;p&gt;at the start of ProxyFactory::getProxy where &apos;\&apos; is actually a double backslash but that cannot be posted here&lt;/p&gt;</description>
                <environment>All?</environment>
            <key id="12986">DDC-1354</key>
            <summary>ClassName proxy classes has includes &apos;\&apos; in front of namespace while other don&apos;t</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="bas.wad">Bas</reporter>
                        <labels>
                    </labels>
                <created>Wed, 31 Aug 2011 11:41:30 +0000</created>
                <updated>Sun, 4 Sep 2011 12:31:06 +0000</updated>
                    <resolved>Thu, 1 Sep 2011 05:59:29 +0000</resolved>
                            <version>2.0.7</version>
                                <fixVersion>2.1.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16408" author="guilhermeblanco" created="Thu, 1 Sep 2011 05:59:29 +0000"  >&lt;p&gt;That was not the issue, but it was a good starting point.&lt;br/&gt;
The actual problem was during mapping that targetEntity never ltrim&apos;ed the entity name referred there.&lt;br/&gt;
Internally, Hydrator and UnitOfWork consume the ProxyFactory directly, so it lead to a wrong hashmap key for persisters.&lt;/p&gt;

&lt;p&gt;By fixing the targetEntity value, everything is fixed. =)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/ecc556f6872c0d44fff5678dc38e068422962aa0&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/ecc556f6872c0d44fff5678dc38e068422962aa0&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="16418" author="beberlei" created="Sun, 4 Sep 2011 12:31:05 +0000"  >&lt;p&gt;merged into 2.1.x&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1350] Github-PR-112 by Ringosan: Mismatch in method signature when compared to method calls.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1350</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 Ringosan:&lt;/p&gt;

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

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

&lt;p&gt;Can either be changed here or in the method calls depending on your preference.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12981">DDC-1350</key>
            <summary>Github-PR-112 by Ringosan: Mismatch in method signature when compared to method calls.</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 30 Aug 2011 18:08:57 +0000</created>
                <updated>Tue, 30 Aug 2011 18:42:34 +0000</updated>
                    <resolved>Tue, 30 Aug 2011 18:42:34 +0000</resolved>
                                            <fixVersion>2.1.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16404" author="beberlei" created="Tue, 30 Aug 2011 18:42:34 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1225] Invalid SQL generated (extra comma) when joining to entity with composite PK</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1225</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;            $qb-&amp;gt;from(&apos;Tournaments_Model_StageBracketTeamRegistration&apos;, &apos;r&apos;)
               -&amp;gt;innerJoin(&apos;r.teamSelection&apos;, &apos;ts&apos;)
               -&amp;gt;innerJoin(&apos;ts.players&apos;, &apos;tsp&apos;)
               -&amp;gt;select(&apos;r, ts, tsp&apos;)
               -&amp;gt;where(&apos;r.stageBracket = ?1&apos;)
               -&amp;gt;andWhere(&apos;r.opponentIsReserve = &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;&apos;)
               -&amp;gt;orderBy(&apos;r.registrationDateTime&apos;)
               -&amp;gt;setParameter(1, $bracket);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;SELECT s0_.id AS id0, s0_.opponent_is_reserve AS opponent_is_reserve1, s0_.opponent_checked_in AS opponent_checked_in2, s0_.registration_date_time AS registration_date_time3, t1_.id AS id4,, s0_.type AS type5, s0_.stage_bracket_id AS stage_bracket_id6, s2_.team_selection_id AS team_selection_id7, t1_.team_id AS team_id8, t3_.team_selection_id AS team_selection_id9, t3_.player_id AS player_id10
FROM stage_bracket_team_registrations s2_
INNER JOIN stage_bracket_registrations s0_ ON s2_.id = s0_.id
INNER JOIN team_selections t1_ ON s2_.team_selection_id = t1_.id
INNER JOIN team_selection_players t3_ ON t1_.id = t3_.team_selection_id
WHERE s0_.stage_bracket_id = 22 AND s0_.opponent_is_reserve = 0
ORDER BY s0_.registration_date_time ASC&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

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

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

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

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

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


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

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

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

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

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

<item>
            <title>[DDC-1341] MultiTableUpdateExecutor does not bind parameters properly</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1341</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi, I found really annoing bug in multi table update executor, it doesn&apos;t bind parameters properly. I have following structure of entities (afaik not really important, bug should appear with any class inheritance structure)&lt;/p&gt;

&lt;div class=&quot;code panel&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;type&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
* @discriminatorMap({&lt;span class=&quot;code-quote&quot;&gt;&quot;NodeEntity&quot;&lt;/span&gt;, forum = &lt;span class=&quot;code-quote&quot;&gt;&quot;ForumEntity&quot;&lt;/span&gt;})
*/
class NodeEntity
{
  &lt;span class=&quot;code-comment&quot;&gt;// ... some params
&lt;/span&gt;}

/**
* @entity
*/
class ForumEntity
{
/**
* @manyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Author&quot;&lt;/span&gt;)
*/
&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $lastPostAuthor;


/**
* @column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;datetime&quot;&lt;/span&gt;)
*/
&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $tLastPost;
&lt;span class=&quot;code-comment&quot;&gt;// ... some params
&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And I&apos;m trying to run following query&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$qb = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;entityManager-&amp;gt;createQueryBuilder()
			-&amp;gt;update(&apos;ForumEntity&apos;, &apos;f&apos;)
			-&amp;gt;set(&apos;f.nPosts&apos;, &apos;f.nPosts + 1&apos;)
			-&amp;gt;set(&apos;f.tLastPost&apos;, &apos;:tLastPost&apos;)-&amp;gt;setParameter(&apos;tLastPost&apos;, $post-&amp;gt;getTCreation()) &lt;span class=&quot;code-comment&quot;&gt;// $post-&amp;gt;getTCreation() returns an instance of DateTime
&lt;/span&gt;			-&amp;gt;set(&apos;f.lastPostAuthor&apos;, &apos;:author&apos;)-&amp;gt;setParameter(&apos;author&apos;, $post-&amp;gt;getAuthor()) &lt;span class=&quot;code-comment&quot;&gt;// $post-&amp;gt;getAuthor() returns an instance of AuthorEntity
&lt;/span&gt;
			-&amp;gt;where(&apos;f.lft &amp;lt;= :left&apos;)-&amp;gt;setParameter(&apos;left&apos;, $forum-&amp;gt;getLft())
			-&amp;gt;andWhere(&apos;f.rgt &amp;gt;= :right&apos;)-&amp;gt;setParameter(&apos;right&apos;, $forum-&amp;gt;getRgt())
			-&amp;gt;andWhere(&apos;f.root = :root&apos;)-&amp;gt;setParameter(&apos;root&apos;, $forum-&amp;gt;getRoot());

		$qb-&amp;gt;getQuery()-&amp;gt;execute();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Which fails with &quot;recoverable error&quot;, because Doctrine tries to convert value of parameter &apos;right&apos; to datetime. I have learned why it does so, it is because of line 157 in already mentioned MultiTableUpdateExecutor - while parameters for the insert query are sliced of parameters from update clause, their types are not. And that is a bit problematic.&lt;/p&gt;

&lt;p&gt;But that is not the only problem, if you look at line 161, the update query receives parameters as they were binded to QueryBuilder, so when I bind there an object, the update query receives the object instead of his identificator. That leads to error like &quot;object ... could not be converted to string&quot;. And also, the update query does not receive any information about type of parameters, but I&apos;m not sure if that is also a bug.&lt;/p&gt;

&lt;p&gt;I&apos;m not a native english speaker so if I explain things chaotically, just say so please, I&apos;ll try better &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="12939">DDC-1341</key>
            <summary>MultiTableUpdateExecutor does not bind parameters properly</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/blocker.png">Blocker</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="pave.kucera">Pavel Ku&#269;era</reporter>
                        <labels>
                    </labels>
                <created>Sun, 21 Aug 2011 09:58:54 +0000</created>
                <updated>Sun, 28 Aug 2011 19:50:41 +0000</updated>
                    <resolved>Sun, 28 Aug 2011 16:45:16 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.1.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16395" author="beberlei" created="Sun, 28 Aug 2011 14:42:23 +0000"  >&lt;p&gt;Assigned to Guilherme&lt;/p&gt;</comment>
                    <comment id="16396" author="guilhermeblanco" created="Sun, 28 Aug 2011 16:45:16 +0000"  >&lt;p&gt;Fixed since this commit: &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/e7f471ef3e1ffa5e180623115a45f423572549e4&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/e7f471ef3e1ffa5e180623115a45f423572549e4&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="16397" author="beberlei" created="Sun, 28 Aug 2011 19:50:41 +0000"  >&lt;p&gt;Merged into 2.1.x&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1348] UnitOfWork::getEntityState bug with pre insert id generators</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1348</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;UnitOfWork::getEntityState checks for the state by using the id as one indicator. This can be created using a pre-insert generator though, which means the entity does not have to exist at all, even though an id was already generated.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12978">DDC-1348</key>
            <summary>UnitOfWork::getEntityState bug with pre insert id generators</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 28 Aug 2011 13:57:17 +0000</created>
                <updated>Sun, 28 Aug 2011 14:02:17 +0000</updated>
                    <resolved>Sun, 28 Aug 2011 14:02:17 +0000</resolved>
                            <version>2.1.1</version>
                <version>Git Master</version>
                                <fixVersion>2.1.2</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16393" author="beberlei" created="Sun, 28 Aug 2011 14:02:17 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1113] getCommitOrder misses some relations when used with Inheritance and self-referencing field</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1113</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Let&apos;s assume we have an Entity class &quot;ParentClass&quot;, which uses a single table inheritance with child classes &quot;ChildOne&quot; and &quot;ChildTwo&quot;.&lt;br/&gt;
&quot;ParentClass&quot; also have one-to-one unidirectional association with &quot;FooBar&quot; class named &quot;foobar&quot;, and a self-referencing association called &quot;parent&quot; &lt;/p&gt;

&lt;p&gt;We construct entity of &quot;ChildOne&quot; type, filling &quot;foobar&quot; link with new FooBar object. The same action is made for entity of &quot;ChildTwo&quot; type. &lt;br/&gt;
Entity of &quot;ChildOne&quot; type is persisted and flushed.&lt;/p&gt;

&lt;p&gt;At this point getCommitOrder builds a commit order. ChildOne &amp;lt;---&amp;gt; FooBar link appears in dependency graph because of &quot;foobar&quot; association. &lt;br/&gt;
While processing assocs it reveals &quot;parent&quot; assoc in parent class and builds following links in dependency graph:&lt;br/&gt;
ChildOne &amp;lt;---&amp;gt; ChildOne&lt;br/&gt;
ChildOne &amp;lt;---&amp;gt; ChildTwo&lt;/p&gt;

&lt;p&gt;After that &quot;ChildTwo&quot; entity is persisted and flushed. At this point commit calculator thinks it already have &quot;ChildTwo&quot; in it&apos;s storage so no assoc calculation are made for &quot;childTwo&quot; class&lt;/p&gt;

&lt;p&gt;If we attemp to delete &quot;ChildTwo&quot; class flush() will fail because of missing link &quot;ChildTwo &amp;lt;-----&amp;gt; Foobar&quot; assoc&lt;/p&gt;
</description>
                <environment></environment>
            <key id="12557">DDC-1113</key>
            <summary>getCommitOrder misses some relations when used with Inheritance and self-referencing field</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="xanf">Illya Klymov</reporter>
                        <labels>
                    </labels>
                <created>Tue, 12 Apr 2011 13:01:20 +0000</created>
                <updated>Sat, 27 Aug 2011 18:47:03 +0000</updated>
                    <resolved>Sat, 27 Aug 2011 18:47:03 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.1.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="15725" author="xanf" created="Tue, 12 Apr 2011 15:45:54 +0000"  >&lt;p&gt;I&apos;ve opened pull request &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/47&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/47&lt;/a&gt; with my fix to this issue. I&apos;m new to doctrine development so feel free to make any suggestions how to improve it&lt;/p&gt;</comment>
                    <comment id="16217" author="beberlei" created="Tue, 26 Jul 2011 21:36:29 +0000"  >&lt;p&gt;Increased priority, i should really look at this one soon!&lt;/p&gt;</comment>
                    <comment id="16285" author="beberlei" created="Sat, 6 Aug 2011 19:47:26 +0000"  >&lt;p&gt;The test with this pull request does not fail even without the applied patch.&lt;/p&gt;</comment>
                    <comment id="16286" author="beberlei" created="Sat, 6 Aug 2011 19:56:06 +0000"  >&lt;p&gt;sorry my bad, ran this with SQLite (Which has no FKs)&lt;/p&gt;</comment>
                    <comment id="16388" author="beberlei" created="Sat, 27 Aug 2011 18:47:03 +0000"  >&lt;p&gt;Fixed, simplifed a bit since one part was not necessary and this hits performance quite significantly&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-1306] Possible bug in CommitOrderCalculator</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1306</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;(I&apos;m not sure it&apos;s a bug, it might be the way I configured Doctrine)&lt;/p&gt;

&lt;p&gt;Sometime Doctrine fails to calculate the right commit order, and then it fails when flushing because some db constraints are failing. I hacked the CommitOrderCalculator so that it would print the list of the dependencies, and this is what I found:&lt;br/&gt;
(I don&apos;t have time to write code now, so I&apos;ll try to explain it with words. If it&apos;s not clear I&apos;ll find some time tomorrow to hack together a test)&lt;/p&gt;

&lt;p&gt;Let&apos;s say that we have the class User. The class user is connected to other classes (News, Comment, Post) with an unidirectional relation, so that User doesn&apos;t know anything about the other class.&lt;/p&gt;

&lt;p&gt;Let&apos;s say we create a User and we save it. The CommitOrderCalculator will calculate the dependencies on User. This is a partial list, some dependencies won&apos;t be there (not sure whether it&apos;s because they haven&apos;t been loaded yet, whether it&apos;s because they are not part of the UnitOfWork or whether it&apos;s because User doesn&apos;t know about them) ***&lt;/p&gt;

&lt;p&gt;Let&apos;s say that later, in the same request, we create a News. CommitOrderCalculator will calculate the dependencies for News. However, for User it will use the cached dependencies, and it won&apos;t realize that now User is required for News.&lt;/p&gt;



&lt;ul&gt;
	&lt;li&gt;
	&lt;ul&gt;
		&lt;li&gt;
		&lt;ul&gt;
			&lt;li&gt;Could it be a configuration problem?&lt;br/&gt;
Are the dependencies supposed to be incomplete? (it seems reasonable as long as they are calculated for a single UnitOfWork, but it seems wrong if the dependencies are shared with multiple transactions)&lt;br/&gt;
Or am I loading the classes in the wrong way?&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Code references:&lt;br/&gt;
UnitOfWork::getCommitOrder line ~840&lt;br/&gt;
The class is added to $newNodes (the array used to calculate dependencies) only if the CommitOrderCalculator doesn&apos;t know the class already&lt;/p&gt;

&lt;p&gt;CommitOrderCalculator::getCommitOrder line ~ 83&lt;br/&gt;
After getting the order _sorted and _nodeStates are reset, while _classes and _relatedClasses are not.&lt;/p&gt;

&lt;p&gt;Basically UnitOfWork register the class only once, and CommitOrderCalculator doesn&apos;t forget about the class when the UnitOfWork ends.&lt;/p&gt;



&lt;p&gt;Possible fix:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Resetting _classes and _relatedClasses seem to fix the problem, but I don&apos;t know what was the rationale for not doing it, so I&apos;m unclear whether it&apos;s the right think or not.&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;Example:&lt;br/&gt;
Dependencies calculated with the current code&lt;br/&gt;
Visiting Users\Model\User &lt;br/&gt;
 + Forum\Model\Forum &lt;br/&gt;
Visiting Forum\Model\Forum &lt;br/&gt;
 + Forum\Model\Forum &lt;br/&gt;
 + Forum\Model\Topic &lt;br/&gt;
Visiting Forum\Model\Topic &lt;br/&gt;
 + Forum\Model\Topic &lt;br/&gt;
 + Forum\Model\Topic &lt;br/&gt;
Visiting Forum\Model\Post &lt;br/&gt;
 + Forum\Model\Forum &lt;br/&gt;
 + Forum\Model\Topic &lt;br/&gt;
 + Forum\Model\Topic &lt;/p&gt;

&lt;p&gt;Dependencies calculated with the reset&lt;br/&gt;
Visiting Forum\Model\Topic &lt;br/&gt;
 + Forum\Model\Post &lt;br/&gt;
Visiting Forum\Model\Post &lt;br/&gt;
 + Forum\Model\Topic &lt;br/&gt;
 + Forum\Model\Topic &lt;br/&gt;
 + Forum\Model\Forum &lt;br/&gt;
Visiting Forum\Model\Forum &lt;br/&gt;
 + Forum\Model\Topic &lt;br/&gt;
 + Forum\Model\Forum &lt;br/&gt;
Visiting Users\Model\User &lt;br/&gt;
 + Forum\Model\Topic &lt;br/&gt;
 + Forum\Model\Topic &lt;br/&gt;
 + Forum\Model\Post &lt;br/&gt;
 + Forum\Model\Post &lt;br/&gt;
 + Forum\Model\Forum &lt;/p&gt;</description>
                <environment>Ubuntu 11.04. PHP 5.3.5. MySql 5.1.54</environment>
            <key id="12880">DDC-1306</key>
            <summary>Possible bug in CommitOrderCalculator</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="arthens">Giacomo</reporter>
                        <labels>
                    </labels>
                <created>Sat, 30 Jul 2011 18:48:32 +0000</created>
                <updated>Sat, 27 Aug 2011 18:46:30 +0000</updated>
                    <resolved>Sat, 27 Aug 2011 18:46:30 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.1.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16284" author="beberlei" created="Sat, 6 Aug 2011 19:01:47 +0000"  >&lt;p&gt;Verified.&lt;/p&gt;

&lt;p&gt;The Calculator is only populated partially because otherwise it had to calculate the dependencies for all classes all the time, caused through a riffle effect.&lt;/p&gt;</comment>
                    <comment id="16387" author="beberlei" created="Sat, 27 Aug 2011 18:46:30 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>