<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Mon May 20 07:07:41 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=fixVersion+%3D+%222.0.1%22+AND+project+%3D+DDC&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=fixVersion+%3D+%222.0.1%22+AND+project+%3D+DDC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="26" total="26"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DDC-1019] Double quotation mark mysql query error on orm:convert-mapping --from-database</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1019</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;By executing this command &lt;tt&gt;php doctrine orm:convert-mapping --from-database yml yaml/&lt;/tt&gt; I get this error:&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; 
PHP Fatal error:  Uncaught exception &apos;PDOException&apos; with message &apos;SQLSTATE[42S22]: Column not found: 1054 Unknown column &apos;BASE TABLE&apos; in &apos;where clause&apos;&apos; in doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php:577
Stack trace:
#0 doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php(577): PDO-&amp;gt;query(&apos;SHOW FULL TABLE...&apos;)
#1 doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php(532): Doctrine\DBAL\Connection-&amp;gt;executeQuery(&apos;SHOW FULL TABLE...&apos;, Array)
#2 doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php(194): Doctrine\DBAL\Connection-&amp;gt;fetchAll(&apos;SHOW FULL TABLE...&apos;)
#3 doctrine2-orm/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php(76): Doctrine\DBAL\Schema\AbstractSchemaManager-&amp;gt;listTableNames()
#4 doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php on line 577
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;After &lt;tt&gt;var_dump&lt;/tt&gt; the &lt;tt&gt;$query&lt;/tt&gt; variable doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php on line 577 &lt;tt&gt;string(48) &quot;SHOW FULL TABLES WHERE Table_type = &quot;BASE TABLE&quot;&quot;&lt;/tt&gt; you can see that &lt;tt&gt;BASE TABLE&lt;/tt&gt; is in double quotations marks.&lt;br/&gt;
I replaced them with single quotation marks &lt;tt&gt;SHOW FULL TABLES WHERE Table_type = &apos;BASE TABLE&apos;&lt;/tt&gt; and executed the statement on the mysql server, no error!&lt;/p&gt;

&lt;p&gt;Please replace the double quotation marks in the query with single quotation marks.&lt;/p&gt;</description>
                <environment>ubuntu 10.10 32bit; PHP Version =&amp;gt; 5.3.3-1ubuntu9.3; mysql  Ver 14.14 Distrib 5.1.49, for debian-linux-gnu (i686) using readline 6.1; Doctrine 2.0.1 git version</environment>
            <key id="12361">DDC-1019</key>
            <summary>Double quotation mark mysql query error on orm:convert-mapping --from-database</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="rroor">Bernhard Schlas</reporter>
                        <labels>
                    </labels>
                <created>Mon, 7 Feb 2011 04:58:24 +0000</created>
                <updated>Mon, 7 Feb 2011 05:39:36 +0000</updated>
                    <resolved>Mon, 7 Feb 2011 05:39:26 +0000</resolved>
                            <version>2.0.1</version>
                                <fixVersion>2.0.1</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15234" author="beberlei" created="Mon, 7 Feb 2011 05:39:26 +0000"  >&lt;p&gt;This is a duplicate of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DBAL-85&quot; title=&quot;Illegal quotes in SHOW FULL TABLES WHERE Table_type = &amp;quot;BASE TABLE&amp;quot;&quot;&gt;&lt;del&gt;DBAL-85&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                <outwardlinks description="duplicates">
                            <issuelink>
            <issuekey id="12356">DBAL-85</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-996] Empty field names lead to weird exception</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-996</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Empty field names (possible in xml and yml) lead to weird exception messages, they should throw a MappingException::missingFieldName exception.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12316">DDC-996</key>
            <summary>Empty field names lead to weird exception</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, 23 Jan 2011 08:14:58 +0000</created>
                <updated>Sun, 23 Jan 2011 08:23:53 +0000</updated>
                    <resolved>Sun, 23 Jan 2011 08:23:53 +0000</resolved>
                            <version>2.0</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15164" author="beberlei" created="Sun, 23 Jan 2011 08:23:53 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-990] Update QueryBuilder reference doc</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-990</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;i had a hard time finding how to limit the number of results for querybuilder.&lt;/p&gt;

&lt;p&gt;the reference does not say how to do it&lt;br/&gt;
&lt;a href=&quot;http://www.doctrine-project.org/docs/orm/2.0/en/reference/query-builder.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/docs/orm/2.0/en/reference/query-builder.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;google brought up that its called setMaxResult, which works fine:&lt;br/&gt;
&lt;a href=&quot;http://www.doctrine-project.org/api/orm/2.0/doctrine/orm/querybuilder.html&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/api/orm/2.0/doctrine/orm/querybuilder.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;maybe the reference is missing more things from the code...&lt;/p&gt;

&lt;p&gt;(btw: calling it just limit would have been very intuitive for sql people &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="12308">DDC-990</key>
            <summary>Update QueryBuilder reference doc</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="dbu">David Buchmann</reporter>
                        <labels>
                    </labels>
                <created>Mon, 17 Jan 2011 03:48:56 +0000</created>
                <updated>Sun, 23 Jan 2011 05:16:42 +0000</updated>
                    <resolved>Sun, 23 Jan 2011 05:16:42 +0000</resolved>
                                            <fixVersion>2.0.1</fixVersion>
                                <component>Documentation</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15160" author="beberlei" created="Sun, 23 Jan 2011 05:16:42 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-980] SQL alias behavior inconsistent in UPDATE ... WHERE (subselect)</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-980</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When using a DQL UPDATE with a subselect in the WHERE clause (such as what the size() function generates), the subselect is trying to reference an alias that is not defined in the main UPDATE clause. Using the size() function similarly in a SELECT statement works fine, the problem is only occurring for me when I try an UPDATE. I have not tried it with INSERT or DELETE, but I would suspect a similar inconsistency with anything other than the more common usage with SELECT.&lt;/p&gt;

&lt;div class=&quot;code panel&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;UPDATE Event e SET e.no_speakers = 1, e.no_credits = 1 WHERE size(e.Instances) = 0&apos;);
print $q-&amp;gt;getSQL();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;UPDATE Event SET no_speakers = 1, no_credits = 1 WHERE (SELECT COUNT(*) FROM Instance c0_ WHERE c0_.Event_id = c1_.id) = 0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And, $q-&amp;gt;execute() 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;PHP Fatal error:  Uncaught exception &apos;PDOException&apos; with message &apos;SQLSTATE[42S22]: Column not found: 1054 Unknown column &apos;c1_.id&apos; in &apos;where clause&apos;&apos; in /&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;/www/v3-lf/library/Doctrine/DBAL/Connection.php:657
Stack trace: #0 /&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;/www/v3-lf/library/Doctrine/DBAL/Connection.php(657): PDO-&amp;gt;exec(&apos;UPDATE Event...&apos;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="12294">DDC-980</key>
            <summary>SQL alias behavior inconsistent in UPDATE ... WHERE (subselect)</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="lfeistel">Lee Feistel</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 Jan 2011 08:49:26 +0000</created>
                <updated>Thu, 13 Jan 2011 15:19:26 +0000</updated>
                    <resolved>Thu, 13 Jan 2011 15:19:26 +0000</resolved>
                            <version>2.0</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15135" author="beberlei" created="Thu, 13 Jan 2011 14:24:44 +0000"  >&lt;p&gt;Would something like the following work on ALL database vendors?&lt;/p&gt;

&lt;div class=&quot;code panel&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 Event SET no_speakers = 1, no_credits = 1 WHERE (SELECT COUNT(*) FROM Instance c0_ WHERE c0_.Event_id = Event.id) = 0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="15136" author="beberlei" created="Thu, 13 Jan 2011 15:19:26 +0000"  >&lt;p&gt;It does work. Fixed!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-978] Many-To-Many relations are removed after Flush()</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-978</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Let&apos;s say we have three entities: User, Channel, and Log&lt;/p&gt;

&lt;p&gt;Every time a User is created or updated, Channels are assigned to a Many-To-Many collection.&lt;br/&gt;
This action gets logged in the Log entity.&lt;/p&gt;

&lt;p&gt;I have reproduced the bug in the Doctrine sandbox (see attachment). It&apos;s a fully working example.&lt;br/&gt;
This is a summary:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;This works&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;// Fetch two channels in an array
&lt;/span&gt;$channels = .......

&lt;span class=&quot;code-comment&quot;&gt;// create a &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; user and assign channels
&lt;/span&gt;$user = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; User();
$user-&amp;gt;setName(&apos;FooBar&apos;);
$user-&amp;gt;setChannels($channels);

&lt;span class=&quot;code-comment&quot;&gt;//save the user
&lt;/span&gt;$em-&amp;gt;persist($user);
$em-&amp;gt;flush();

&lt;span class=&quot;code-comment&quot;&gt;// log it
&lt;/span&gt;$log = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Log();
$log-&amp;gt;setMessage(&apos;User created with two channels&apos;);
$log-&amp;gt;setItem($user);

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

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;This also works&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;// Fetch two channels in an array
&lt;/span&gt;$channels = .......

&lt;span class=&quot;code-comment&quot;&gt;// fetch an existing user, *change something to the user*, and assign channels
&lt;/span&gt;$user = .............
$user-&amp;gt;setName(&apos;Gaz&apos;);
$user-&amp;gt;setChannels($channels);

&lt;span class=&quot;code-comment&quot;&gt;//save the user
&lt;/span&gt;$em-&amp;gt;persist($user);
$em-&amp;gt;flush();

&lt;span class=&quot;code-comment&quot;&gt;// log it
&lt;/span&gt;$log = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Log();
$log-&amp;gt;setMessage(&apos;User created with two channels&apos;);
$log-&amp;gt;setItem($user);

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

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;This does not work (channels are removed)&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;// Fetch two channels in an array
&lt;/span&gt;$channels = .......

&lt;span class=&quot;code-comment&quot;&gt;// fetch an existing user and only assign channels, change nothing &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
&lt;/span&gt;$user = .............
$user-&amp;gt;setChannels($channels);

&lt;span class=&quot;code-comment&quot;&gt;//save the user
&lt;/span&gt;$em-&amp;gt;persist($user);
$em-&amp;gt;flush();

&lt;span class=&quot;code-comment&quot;&gt;// log it
&lt;/span&gt;$log = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Log();
$log-&amp;gt;setMessage(&apos;User created with two channels&apos;);
$log-&amp;gt;setItem($user);

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

&lt;p&gt;This last piece of code generates following SQL code (summarized): &lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;DELETE FROM user_channels WHERE userId = 1
INSERT INTO user_channels (userId, channelId) VALUES (1, 2);
DELETE FROM user_channels WHERE userId = 1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you remove the &lt;em&gt;$em-&amp;gt;flush()&lt;/em&gt; after &lt;em&gt;$em-&amp;gt;persist($user);&lt;/em&gt; in the last example, the code works (channels are persisted).&lt;/p&gt;

&lt;p&gt;I did not have this problem with Doctrine2 Alpha4.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12292">DDC-978</key>
            <summary>Many-To-Many relations are removed after Flush()</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="slasher">Thomas G.</reporter>
                        <labels>
                    </labels>
                <created>Wed, 12 Jan 2011 03:57:21 +0000</created>
                <updated>Sun, 23 Jan 2011 09:41:26 +0000</updated>
                    <resolved>Sun, 23 Jan 2011 09:41:26 +0000</resolved>
                            <version>2.0</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="15126" author="beberlei" created="Wed, 12 Jan 2011 04:53:25 +0000"  >&lt;p&gt;What do you do in &quot;setChannels&quot;? Do you completly overwrite the previous content of the association variable &quot;User::$channels&quot; ?&lt;/p&gt;</comment>
                    <comment id="15127" author="slasher" created="Wed, 12 Jan 2011 05:00:39 +0000"  >&lt;p&gt;I have reproduced the bug in a fully working example. See attachment. Just read instructions in comment and execute each step seperately.&lt;/p&gt;

&lt;p&gt;But yes, I overwrite the previous content of the association variable &quot;User::$channels&quot; with a Doctrine ArrayCollection.
&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;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;User Entity&lt;/b&gt;&lt;/div&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
{
    /**
     * @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;, length=50) */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $name;

    /**
     * @ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Channel&quot;&lt;/span&gt;)
     * @JoinTable(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;users_channels&quot;&lt;/span&gt;,
     *          joinColumns={@JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;userId&quot;&lt;/span&gt;,
                referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)},
     *          inverseJoinColumns={@JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;channelId&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;var&lt;/span&gt; ArrayCollection
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $channels;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __construct(){
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;channels = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\Common\Collections\ArrayCollection();
    }

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

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

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

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setChannels($channels) {
        $channels =  &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\Common\Collections\ArrayCollection($channels);
       
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;channels = $channels;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="15166" author="beberlei" created="Sun, 23 Jan 2011 09:41:26 +0000"  >&lt;p&gt;Fixed.&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="12298">DDC-983</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                    <attachment id="10907" name="sandbox.rar" size="622254" author="slasher" created="Wed, 12 Jan 2011 03:57:21 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-975] Notice in SchemaTool when using assigned id string without length and auto-join column generation</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-975</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="12289">DDC-975</key>
            <summary>Notice in SchemaTool when using assigned id string without length and auto-join column 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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Jan 2011 08:34:22 +0000</created>
                <updated>Thu, 13 Jan 2011 15:46:09 +0000</updated>
                    <resolved>Thu, 13 Jan 2011 15:46:09 +0000</resolved>
                            <version>2.0</version>
                <version>Git Master</version>
                                <fixVersion>2.0.1</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15137" author="beberlei" created="Thu, 13 Jan 2011 15:46:09 +0000"  >&lt;p&gt;Fixed.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-969] SchemaTool fails with class table inheritance if id columnName is not &quot;id&quot;</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-969</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>

&lt;p&gt;In method &lt;b&gt;getSchemaFromMetadata()&lt;/b&gt; within the &lt;em&gt;$class-&amp;gt;isInheritanceTypeJoined()&lt;/em&gt; part the following line&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;Doctrine\ORM\Tools\SchemaTool::getSchemaFromMetadata() &amp;#8212; Line 182&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$table-&amp;gt;getColumn($class-&amp;gt;identifier[0])-&amp;gt;setAutoincrement(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;leads to a &lt;em&gt;Doctrine\DBAL\Schema\SchemaException::columnDoesNotExist()&lt;/em&gt; if a columnName other then &lt;em&gt;id&lt;/em&gt; is used for the id field, as not the columnName (but the field name) is passed to &lt;em&gt;$table-&amp;gt;getColumn()&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Should rather 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;$table-&amp;gt;getColumn($columnName)-&amp;gt;setAutoincrement(&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="12280">DDC-969</key>
            <summary>SchemaTool fails with class table inheritance if id columnName is not &quot;id&quot;</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/trivial.png">Trivial</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ayhan">ayhan</reporter>
                        <labels>
                    </labels>
                <created>Wed, 5 Jan 2011 20:05:37 +0000</created>
                <updated>Sun, 23 Jan 2011 10:13:31 +0000</updated>
                    <resolved>Sun, 23 Jan 2011 10:13:31 +0000</resolved>
                            <version>2.0</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="15167" author="beberlei" created="Sun, 23 Jan 2011 10:13:31 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-968] Query hints should be retrievable by user</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-968</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Currently the only way to set additional parameters accessible by AST TreeWalker is using the query hints.&lt;br/&gt;
the main problem is then query is being cloned, hints are flushed and the only way to set them is to access them by name and feed to cloned query one by one.&lt;br/&gt;
I think there should be Query::getHints() method available to the userland&lt;/p&gt;</description>
                <environment>all</environment>
            <key id="12277">DDC-968</key>
            <summary>Query hints should be retrievable by user</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="gediminasm">Gediminas Morkevicius</reporter>
                        <labels>
                    </labels>
                <created>Mon, 3 Jan 2011 06:00:19 +0000</created>
                <updated>Sun, 23 Jan 2011 10:48:26 +0000</updated>
                    <resolved>Sun, 23 Jan 2011 10:48:26 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                <component>DQL</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15169" author="beberlei" created="Sun, 23 Jan 2011 10:48:26 +0000"  >&lt;p&gt;Implemented&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-966] SchemaTool does not check for inherited fields in STI sub-classes and overwrites their column definitions to DEFAULT NULL</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-966</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;Example&lt;/b&gt;&lt;/div&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;eav_attribute&quot;&lt;/span&gt;,
 *     uniqueConstraints={
 *         @UniqueConstraint(columns={&lt;span class=&quot;code-quote&quot;&gt;&quot;core_project_id&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;})
 *     }
 * )
 * @InheritanceType(
 *     &lt;span class=&quot;code-quote&quot;&gt;&quot;SINGLE_TABLE&quot;&lt;/span&gt;
 * )
 * @DiscriminatorColumn(
 *     name=&lt;span class=&quot;code-quote&quot;&gt;&quot;datatype&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;datetime&quot;&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;AttributeDatetime&quot;&lt;/span&gt;,
 *     &lt;span class=&quot;code-quote&quot;&gt;&quot;decimal&quot;&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;AttributeDecimal&quot;&lt;/span&gt;,
 *     &lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;&quot;&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;AttributeInt&quot;&lt;/span&gt;,
 *     &lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;AttributeString&quot;&lt;/span&gt;,
 *     &lt;span class=&quot;code-quote&quot;&gt;&quot;text&quot;&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;AttributeText&quot;&lt;/span&gt;
 * })
 */
&lt;span class=&quot;code-keyword&quot;&gt;abstract&lt;/span&gt; class AbstractAttribute
{
    &lt;span class=&quot;code-comment&quot;&gt;// ...
&lt;/span&gt;    
    /**
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name;

    /**
     * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-object&quot;&gt;boolean&lt;/span&gt;&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $is_unique;

    &lt;span class=&quot;code-comment&quot;&gt;// ...
&lt;/span&gt;}

/**
 * @Entity
 */
class AttributeDatetime &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; AbstractAttribute
{
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Expected SQL-dump:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;name VARCHAR(255) NOT NULL,
is_unique TINYINT(1) NOT NULL,
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;SQL-dump created by SchemaTool:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;name VARCHAR(255) DEFAULT NULL,
is_unique TINYINT(1) DEFAULT NULL,
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This behaviour is problematic, especially for columns which are part of a unique constraint.&lt;/p&gt;

&lt;p&gt;Reason:&lt;/p&gt;

&lt;p&gt;SchemaTool doesn&apos;t really check for inherited fields in STI sub classes in method getSchemaFromMetadata() and passes all fields (incl. the inherited) to method _gatherColumn() where finally the column definition of the parent class will be overwritten.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;Doctrine\ORM\Tools\SchemaTool&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; function _gatherColumn($class, array $mapping, $table)
{
    &lt;span class=&quot;code-comment&quot;&gt;// Lines 309 - 311
&lt;/span&gt;    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($class-&amp;gt;isInheritanceTypeSingleTable() &amp;amp;&amp;amp; count($class-&amp;gt;parentClasses) &amp;gt; 0) {
        $options[&apos;notnull&apos;] = &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;A quick fix:&lt;/p&gt;

&lt;p&gt;Change that if-clause above to&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($class-&amp;gt;isInheritanceTypeSingleTable() &amp;amp;&amp;amp; count($class-&amp;gt;parentClasses) &amp;gt; 0 &amp;amp;&amp;amp; ! isset($mapping[&apos;inherited&apos;])) {
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Better fix:&lt;/p&gt;

&lt;p&gt;Only pass not inherited fields to the _gatherColumn() method, as done with CTI sub classes.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12274">DDC-966</key>
            <summary>SchemaTool does not check for inherited fields in STI sub-classes and overwrites their column definitions to DEFAULT NULL</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ayhan">ayhan</reporter>
                        <labels>
                    </labels>
                <created>Sat, 1 Jan 2011 12:30:28 +0000</created>
                <updated>Sun, 2 Jan 2011 05:52:25 +0000</updated>
                    <resolved>Sun, 2 Jan 2011 04:19:49 +0000</resolved>
                            <version>2.0</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="15088" author="beberlei" created="Sun, 2 Jan 2011 04:19:49 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                    <comment id="15094" author="ayhan" created="Sun, 2 Jan 2011 05:52:25 +0000"  >&lt;p&gt;Wow, that was fast!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-965] Check for ID in CMF should be done after Event invocation</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-965</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description></description>
                <environment></environment>
            <key id="12272">DDC-965</key>
            <summary>Check for ID in CMF should be done after Event invocation</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 1 Jan 2011 06:25:31 +0000</created>
                <updated>Sun, 2 Jan 2011 04:25:57 +0000</updated>
                    <resolved>Sun, 2 Jan 2011 04:25:57 +0000</resolved>
                            <version>2.0</version>
                <version>Git Master</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15089" author="beberlei" created="Sun, 2 Jan 2011 04:25:57 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-961] First letters are missing in M:N tables</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-961</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When I define M:N relation and update the schema by SchemaTool then the joining table is created without first letters (e.g. &lt;tt&gt;rticle_ag&lt;/tt&gt; instead of &lt;tt&gt;article_tag&lt;/tt&gt;). Relevant part from the source 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-html&quot;&gt;&amp;lt;?php
/** @entity */
class Article {
	/** @manyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Tag&quot;&lt;/span&gt;) */
	public $tags;
}

/** @entity */
class Tag {
	/** @manyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Article&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;tags&quot;&lt;/span&gt;) */
	public $articles;
}

$tool = new \Doctrine\ORM\Tools\SchemaTool($em);
$tool-&amp;gt;updateSchema(array(
	$em-&amp;gt;getClassMetadata(&apos;Article&apos;),
	$em-&amp;gt;getClassMetadata(&apos;Tag&apos;),
));
?&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You can download the complete example at &lt;a href=&quot;http://www.notorm.com/static/doctrine2-notorm/&quot; class=&quot;external-link&quot;&gt;http://www.notorm.com/static/doctrine2-notorm/&lt;/a&gt;&lt;/p&gt;</description>
                <environment>Windows, MySQL</environment>
            <key id="12266">DDC-961</key>
            <summary>First letters are missing in M:N tables</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="vrana">Jakub Vr&#225;na</reporter>
                        <labels>
                    </labels>
                <created>Thu, 30 Dec 2010 06:23:55 +0000</created>
                <updated>Thu, 30 Dec 2010 16:32:42 +0000</updated>
                    <resolved>Thu, 30 Dec 2010 16:32:42 +0000</resolved>
                            <version>2.0</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15064" author="beberlei" created="Thu, 30 Dec 2010 16:23:02 +0000"  >&lt;p&gt;Your entities are not namespaced are they?&lt;/p&gt;</comment>
                    <comment id="15065" author="beberlei" created="Thu, 30 Dec 2010 16:32:42 +0000"  >&lt;p&gt;Yes, this is related to entities in global namespaces only. That is why nobody realized it before.&lt;/p&gt;

&lt;p&gt;Fixed now.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-960] Locking @Version with MappedSuperClass and Single Table Inheritance results in wrong queries</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-960</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When using a @version field for locking purposes in one of the fields of a MappedSuperClass, things go wrong. Here is my situation:&lt;/p&gt;

&lt;p&gt;SpecificUser extends of BaseUser&lt;br/&gt;
There is one mapped superclass containing things like createdOn, createdBy and finally the @version field named version.&lt;/p&gt;

&lt;p&gt;Now, when I change a record, the following queries are created. The last one is faulty:&lt;/p&gt;

&lt;p&gt;Query: UPDATE specificuser SET firstname = ? WHERE id = ?&lt;br/&gt;
Query: UPDATE baseuser SET version = version + 1 WHERE id = ? AND version = ?&lt;br/&gt;
Query: SELECT version FROM specificuser WHERE id = ?    &amp;lt;======= should be: SELECT version FROM baseuser WHERE id = ?&lt;/p&gt;</description>
                <environment>Windows 7 using Zend Server</environment>
            <key id="12265">DDC-960</key>
            <summary>Locking @Version with MappedSuperClass and Single Table Inheritance results in wrong queries</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="jackvangalen">Jack van Galen</reporter>
                        <labels>
                    </labels>
                <created>Thu, 30 Dec 2010 05:39:19 +0000</created>
                <updated>Sun, 23 Jan 2011 07:00:53 +0000</updated>
                    <resolved>Sun, 23 Jan 2011 07:00:53 +0000</resolved>
                            <version>2.0</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15066" author="beberlei" created="Thu, 30 Dec 2010 16:35:40 +0000"  >&lt;p&gt;You say Single Table Inheritance but specificuser and baseuser are two different tables? How does that work? With single table inheritance both specificuser and baseuser are in the same table.&lt;/p&gt;

&lt;p&gt;Can you post your mappings? I am not convinced of this bug yet &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/wink.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="15104" author="jackvangalen" created="Tue, 4 Jan 2011 04:26:09 +0000"  >&lt;p&gt;Oops, my mistake. I meant to say &apos;class table inheritance&apos;. The definitions that I used (slightly modified and translated to English) are below.&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unable to find source-code formatter for language: php.&lt;/span&gt; Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml&lt;/div&gt;&lt;pre&gt; 
namespace framework{

	/** @MappedSuperclass */
	class DbTable {

		/**
		 * @Id @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;, name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;, length=&lt;span class=&quot;code-quote&quot;&gt;&quot;10&quot;&lt;/span&gt;, unique=&lt;span class=&quot;code-quote&quot;&gt;&quot;&quot;, nullable=&quot;&lt;/span&gt;&quot;)
		 * @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;

		/** @Version @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;, name=&lt;span class=&quot;code-quote&quot;&gt;&quot;version&quot;&lt;/span&gt;, nullable=&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;) */
		&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $version;
		
		/** @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;datetimetz&quot;&lt;/span&gt;, name=&lt;span class=&quot;code-quote&quot;&gt;&quot;createdon&quot;&lt;/span&gt;, nullable=&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;) */
		&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $createdon;

	}
	
}


namespace custom\tables{

	/**
	* @Entity
	*/
	class specificuser &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; generated\tables\baseuser {
		
	}

}


namespace custom\tables{

	/**
	 * @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;specificuser&quot;&lt;/span&gt; = &lt;span class=&quot;code-quote&quot;&gt;&quot;custom\tables\specificuser&quot;&lt;/span&gt;})
	 */
	class baseuser &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; generated\tables\baseuser {
	
	}
	
}


namespace generated\tables{

	class specificuser &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; custom\tables\baseuser {
	}
	
}


namespace generated\tables{

	class user &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; framework\DbTable {

		/**
		*@Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, nullable=&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;&quot;&lt;/span&gt;, unique=&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;)
		*/
        &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $username;
		
	}
	
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 
</comment>
                    <comment id="15162" author="beberlei" created="Sun, 23 Jan 2011 07:00:53 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-958] postLoad event triggering</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-958</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Currently I&apos;ve noticed that postLoad event is not triggered on $em-&amp;gt;refresh($entity); it seems like entity should be reloaded on this call&lt;br/&gt;
and logically postLoad event should be also triggered if entity is being reloaded.&lt;/p&gt;</description>
                <environment>all</environment>
            <key id="12263">DDC-958</key>
            <summary>postLoad event triggering</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="gediminasm">Gediminas Morkevicius</reporter>
                        <labels>
                    </labels>
                <created>Wed, 29 Dec 2010 10:10:57 +0000</created>
                <updated>Sun, 23 Jan 2011 11:28:36 +0000</updated>
                    <resolved>Sun, 23 Jan 2011 11:28:36 +0000</resolved>
                            <version>2.0</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15170" author="beberlei" created="Sun, 23 Jan 2011 11:28:36 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-955] PostgresSQL + No identifier / primary key for Specified Entity &apos;Table&apos;. Every Entity must have for an identifier / primary key.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-955</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;PostgreSQL error map from reverse engineering is not recognized by the primary keys in PostgreSQL and throws the following error: &quot;No identifier / primary key for Specified Entity &apos;Table&apos;. Every Entity must have for an identifier / primary key.&quot;&lt;/p&gt;</description>
                <environment>all</environment>
            <key id="12260">DDC-955</key>
            <summary>PostgresSQL + No identifier / primary key for Specified Entity &apos;Table&apos;. Every Entity must have for an identifier / primary key.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="johnksft">John Carlos Espitia Rivera</reporter>
                        <labels>
                    </labels>
                <created>Tue, 28 Dec 2010 14:23:11 +0000</created>
                <updated>Thu, 30 Dec 2010 17:20:57 +0000</updated>
                    <resolved>Thu, 30 Dec 2010 17:20:57 +0000</resolved>
                            <version>2.0</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15071" author="beberlei" created="Thu, 30 Dec 2010 17:20:57 +0000"  >&lt;p&gt;Duplicate of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-929&quot; title=&quot;A index has to be named as &amp;quot;primary&amp;quot; to be detected Doctrine\ORM\Mapping\Driver\DatabaseDriver::loadMetadataForClass()&quot;&gt;&lt;del&gt;DDC-929&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-949] strange behavior with boolean types when using findOneBy() in a CLI phpunit test</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-949</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I do not see this behavior when running findByOne() calls via the Apache SAPI. No clue really what could possibly cause this. Not sure how to get the error logger to output something in a phpunit test (never really figured out how phpunit supports debugging). Essentially if I run the tests with SQLite the case with &apos;false&apos; fails and when I run with PostgreSQL the case with 0 fails. Essentially in the fail case I get an instance of $this, just like when I pass: false.&lt;/p&gt;

&lt;p&gt;Tell me if this report is useless in the current state and then I will work on separating it out into a standalone CLI script without Symfony2 and phpunit. But I dont want to spend more time on this if it isnt necessary.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12254">DDC-949</key>
            <summary>strange behavior with boolean types when using findOneBy() in a CLI phpunit 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="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="lsmith">Lukas Kahwe</reporter>
                        <labels>
                    </labels>
                <created>Sat, 25 Dec 2010 08:06:21 +0000</created>
                <updated>Sun, 2 Jan 2011 07:14:01 +0000</updated>
                    <resolved>Sun, 2 Jan 2011 03:44:35 +0000</resolved>
                                            <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15030" author="beberlei" created="Tue, 28 Dec 2010 04:37:29 +0000"  >&lt;p&gt;Cannot reproduce.&lt;/p&gt;
</comment>
                    <comment id="15031" author="beberlei" created="Tue, 28 Dec 2010 04:37:59 +0000"  >&lt;p&gt;Attached simpler testcase for reproduce.&lt;/p&gt;</comment>
                    <comment id="15033" author="lsmith" created="Tue, 28 Dec 2010 05:16:30 +0000"  >&lt;p&gt;further testing shows this issue only exists with false and there I can reproduce it on the CLI and via apache. it seems I am hitting: &lt;a href=&quot;http://bugs.php.net/bug.php?id=33876&quot; class=&quot;external-link&quot;&gt;http://bugs.php.net/bug.php?id=33876&lt;/a&gt;&lt;br/&gt;
however the issue also happens with sqlite for the same reason false gets casted to an empty string when not telling PDO explicitly to handle the parameter as a boolean.&lt;/p&gt;</comment>
                    <comment id="15081" author="lsmith" created="Sat, 1 Jan 2011 13:05:15 +0000"  >&lt;p&gt;as explained in the previous comment, the issue is caused by &quot;false&quot; and not by &quot;true&quot; as in the test case.&lt;/p&gt;</comment>
                    <comment id="15087" author="beberlei" created="Sun, 2 Jan 2011 03:44:35 +0000"  >&lt;p&gt;Fixed.&lt;/p&gt;

&lt;p&gt;This issue occured, because BasicEntityPersister did not pass the PARAM: typehints to the DBAL connection.&lt;/p&gt;

&lt;p&gt;Adding this fixes the issue with Booleans on PostgreSQL, however I just realized it also exists for Oracle OCI and needs an adjustment in DBAL to be fixable.&lt;/p&gt;</comment>
                    <comment id="15098" author="lsmith" created="Sun, 2 Jan 2011 06:28:50 +0000"  >&lt;p&gt;I am also seeing the issue with SQLite.&lt;/p&gt;</comment>
                    <comment id="15099" author="lsmith" created="Sun, 2 Jan 2011 07:14:01 +0000"  >&lt;p&gt;ok .. i can confirm the issue is fixed on sqlite and postgresql&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10901" name="DDC949Test.php" size="821" author="beberlei" created="Tue, 28 Dec 2010 04:37:59 +0000" />
                    <attachment id="10898" name="DoctrineORMBugTest.php" size="4562" author="lsmith" created="Sat, 25 Dec 2010 08:06:21 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-945] Crashing Bug: BasicEntityPersister::_getSelectColumnListSQL returns empty list, thus generating wrong SQL</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-945</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have a situation where Doctrine generates a wrong SQL query and crashes with an exception.&lt;/p&gt;

&lt;p&gt;The userland code calls the EntityManager::merge method.&lt;/p&gt;

&lt;p&gt;The query generated looks like &quot;SELECT FROM SomeTable&quot;, meaning it has no select column list, and therefore it&apos;s plainly wrong.&lt;/p&gt;

&lt;p&gt;The entity I am trying to merge back into the entity manager is a regular entity with state detached. The class has a column which is declared as ID and filled with an autogenerated value, three regular columns, and a one-to-many relationship. The to-many-relationship causes BasicEntityPersister::loadOneToManyCollection() to be called, which in turn calls BasicEntityPersister::_getSelectEntitiesSQL, which then calls BasicEntityPersister::_getSelectColumnListSQL, which wrongly returns an empty string, thus leading to the corrupt query without a select column list being generated. The target entity of the one-to-many relationship is a mapped superclass, which has an ID (again with autogenerated values), and a many-to-one relationship inversing the one in the first entity. Further fields depend on its exact type as determined by the inheriting entities, but it will always have some.&lt;/p&gt;

&lt;p&gt;Here is the exception, up to the point where the trace leaves the ORM:&lt;/p&gt;

&lt;p&gt;exception &apos;PDOException&apos; with message &apos;SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;42000&amp;#93;&lt;/span&gt;: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &apos;FROM VersionedDataObject t0&apos; at line 1&apos; in /var/www/invoiceCreator/src/thirdPartyComponents/doctrine/Doctrine/DBAL/Connection.php:577 Stack trace: #0 /var/www/invoiceCreator/src/thirdPartyComponents/doctrine/Doctrine/DBAL/Connection.php(577): PDO-&amp;gt;query(&apos;SELECT FROM Ve...&apos;) #1 /var/www/invoiceCreator/src/thirdPartyComponents/doctrine/Doctrine/ORM/Persisters/BasicEntityPersister.php(1173): Doctrine\DBAL\Connection-&amp;gt;executeQuery(&apos;SELECT FROM Ve...&apos;, Array) #2 /var/www/invoiceCreator/src/thirdPartyComponents/doctrine/Doctrine/ORM/UnitOfWork.php(1984): Doctrine\ORM\Persisters\BasicEntityPersister-&amp;gt;loadOneToManyCollection(Array, Object(persistentData\model\versioning\InputComponentDataVersion), Object(Doctrine\ORM\PersistentCollection)) #3 /var/www/invoiceCreator/src/thirdPartyComponents/doctrine/Doctrine/ORM/PersistentCollection.php(207): Doctrine\ORM\UnitOfWork-&amp;gt;loadCollection(Object(Doctrine\ORM\PersistentCollection)) #4 /var/www/invoiceCreator/src/thirdPartyComponents/doctrine/Doctrine/ORM/UnitOfWork.php(1441): Doctrine\ORM\PersistentCollection-&amp;gt;initialize() #5 /var/www/invoiceCreator/src/thirdPartyComponents/doctrine/Doctrine/ORM/UnitOfWork.php(1323): Doctrine\ORM\UnitOfWork-&amp;gt;doMerge(Object(persistentData\model\versioning\InputComponentDataVersion), Array) #6 /var/www/invoiceCreator/src/thirdPartyComponents/doctrine/Doctrine/ORM/EntityManager.php(520): Doctrine\ORM\UnitOfWork-&amp;gt;merge(Object(persistentData\model\versioning\InputComponentDataVersion))&lt;/p&gt;


&lt;p&gt;This one is a blocker by user standards. The error means that it is impossible to use Doctrine in long-running batch jobs like in my situation, because it does not support merging certain detached objects back into the entity manager at all, while at some point they need to be detached for virtual memory capacity reasons.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12245">DDC-945</key>
            <summary>Crashing Bug: BasicEntityPersister::_getSelectColumnListSQL returns empty list, thus generating wrong SQL</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="dalvarez">Daniel Alvarez Arribas</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 Dec 2010 11:04:51 +0000</created>
                <updated>Sat, 14 Apr 2012 05:48:44 +0000</updated>
                    <resolved>Tue, 28 Dec 2010 06:09:38 +0000</resolved>
                            <version>2.0</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14994" author="dalvarez" created="Wed, 22 Dec 2010 11:10:40 +0000"  >&lt;p&gt;Added a more accurate description of both entities involved.&lt;/p&gt;</comment>
                    <comment id="14996" author="beberlei" created="Wed, 22 Dec 2010 11:53:48 +0000"  >&lt;p&gt;This is not enough information to reproduce this issue. We have tests that show merge and detach works. I need more code, mapping files and a reproduce set.&lt;/p&gt;

&lt;p&gt;If yo udont want to attach it to the issue you can send me a mail.&lt;/p&gt;</comment>
                    <comment id="15017" author="dalvarez" created="Sat, 25 Dec 2010 13:15:07 +0000"  >&lt;p&gt;After analyzing the problem further, I think it is nothing but a subsequent error due to the bidirectional association in the mapped superclass, which is documented to not work in the first place, as relationships declared in mapped superclasses must be unidirectional. After changing the mapped superclass to a regular entity, the application is working.&lt;/p&gt;

&lt;p&gt;The only remaining problem in this case is the crashing effect. This is due to the rudimentary data model validation combined with the total lack of decent error messages in Doctrine 2. As there is no apparent relationship between the symptom (exception due to incorrect SQL being generated) and the effective technical source of the problem (bidirectional relationship declared in a mapped superclass), it is unnecessarily cumbersome to determine what possible sources of error to look for. It would be great if doctrine could defend itself against non-conforming data model inputs by producing an understandable error message instead of just crashing.&lt;/p&gt;

&lt;p&gt;I will leave this bug open as a validation issue.&lt;/p&gt;</comment>
                    <comment id="15021" author="beberlei" created="Mon, 27 Dec 2010 03:55:25 +0000"  >&lt;p&gt;Yeah this is annoying, i check if we can implement a cheap runtime validation when loading the class metadata.&lt;/p&gt;</comment>
                    <comment id="15035" author="beberlei" created="Tue, 28 Dec 2010 06:09:38 +0000"  >&lt;p&gt;Throwing mapping exception if using a mapped superclass with ManyToMany or OneToMany association now.&lt;/p&gt;</comment>
                    <comment id="15060" author="dalvarez" created="Wed, 29 Dec 2010 19:02:44 +0000"  >&lt;p&gt;Thanks for fixing this.&lt;/p&gt;

&lt;p&gt;Shouldn&apos;t it actually only throw an exception when using &lt;b&gt;bidirectional&lt;/b&gt; associations with a mapped superclass?&lt;/p&gt;</comment>
                    <comment id="15076" author="beberlei" created="Fri, 31 Dec 2010 08:34:27 +0000"  >&lt;p&gt;Not exactly but you are right, unidirectional Many To Many associations work if you use the Mapped Superclass only once. I will adjust the patch accordingly.&lt;/p&gt;

&lt;p&gt;For 2.1 there will be an additional feature described in &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-964&quot; title=&quot;Implement @AssociationOverride and @FieldOverride for MappedSuperclasses&quot;&gt;&lt;del&gt;DDC-964&lt;/del&gt;&lt;/a&gt; that allows overriding certain mapped superclass details to avoid these problems.&lt;/p&gt;</comment>
                    <comment id="15077" author="beberlei" created="Fri, 31 Dec 2010 08:41:26 +0000"  >&lt;p&gt;Corrected.&lt;/p&gt;</comment>
                    <comment id="17628" author="beberlei" created="Thu, 22 Mar 2012 22:07:10 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-218&amp;#93;&lt;/span&gt; was &lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/218&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/218&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17845" author="beberlei" created="Sat, 14 Apr 2012 05:48:44 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-335&amp;#93;&lt;/span&gt; was opened&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/335&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/335&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-944] MappingException::mappingNotFound() calls are wrong in ClassMetadataInfo</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-944</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;As you can see in:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php&lt;/a&gt;&lt;br/&gt;
and:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mapping/MappingException.php&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mapping/MappingException.php&lt;/a&gt;&lt;br/&gt;
mappingNotFound() accepts now only 1 argument, but is called with 2; this leads to cryptic errors when the a field does not exist like:&lt;br/&gt;
Doctrine\ORM\Mapping\MappingException: No mapping found for field &apos;EntityClassName&apos;&lt;/p&gt;</description>
                <environment></environment>
            <key id="12242">DDC-944</key>
            <summary>MappingException::mappingNotFound() calls are wrong in ClassMetadataInfo</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="giorgiosironi">Giorgio Sironi</reporter>
                        <labels>
                    </labels>
                <created>Tue, 21 Dec 2010 03:56:57 +0000</created>
                <updated>Tue, 21 Dec 2010 18:29:21 +0000</updated>
                    <resolved>Tue, 21 Dec 2010 18:29:21 +0000</resolved>
                            <version>Git Master</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14993" author="beberlei" created="Tue, 21 Dec 2010 18:29:21 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-932] Schema problem with Postgresql</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-932</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hi, I have a problem when using doctrine 2 with schema in Postgresql.&lt;/p&gt;

&lt;p&gt;This is my php mapping:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&amp;lt;?php

use Doctrine\ORM\Mapping\ClassMetadataInfo;

$metadata-&amp;gt;setInheritanceType(ClassMetadataInfo::INHERITANCE_TYPE_NONE);
$metadata-&amp;gt;setPrimaryTable(array(
    &apos;name&apos; =&amp;gt; &apos;sales.mdp&apos;,
));

$metadata-&amp;gt;setChangeTrackingPolicy(ClassMetadataInfo::CHANGETRACKING_DEFERRED_IMPLICIT);
$metadata-&amp;gt;setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE);
$metadata-&amp;gt;setSequenceGeneratorDefinition(array(
        &apos;sequenceName&apos;   =&amp;gt; &apos;sales.mdp_id_seq&apos;,
        &apos;allocationSize&apos; =&amp;gt; 10,
        &apos;initialValue&apos;   =&amp;gt; 1,
    ));
    
$metadata-&amp;gt;mapField(array(
   &apos;id&apos;         =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;,
   &apos;fieldName&apos;  =&amp;gt; &apos;id&apos;,
   &apos;columnName&apos; =&amp;gt; &apos;id&apos;,
   &apos;type&apos;       =&amp;gt; &apos;integer&apos;,
  ));
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I can generate tables successfully with orm:schema-tool:create.&lt;br/&gt;
I don&apos;t edit anything, and just try to orm:schema-tool:update, the output should be:&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Nothing to update. The database is in sync with the current entity metadata.&lt;/b&gt;&lt;/p&gt;

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

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Updating database schema...

  [PDOException]

  SQLSTATE[42P07]: Duplicate table: 7 ERROR:  relation &lt;span class=&quot;code-quote&quot;&gt;&quot;mdp_id_seq&quot;&lt;/span&gt; already exists
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;my &lt;b&gt;orm:schema-tool:update --dump-sql&lt;/b&gt; outputs&lt;/p&gt;

&lt;div class=&quot;code panel&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 SEQUENCE sales.mdp_id_seq INCREMENT BY 10 MINVALUE 1 START 1;
CREATE TABLE sales.mdp (id INT NOT NULL, rrn VARCHAR(50) NOT NULL, model VARCHAR(255) DEFAULT NULL, tipe VARCHAR(255) DEFAULT NULL, warna VARCHAR(50) DEFAULT NULL, nama_pelanggan VARCHAR(255) DEFAULT NULL, sales VARCHAR(255) DEFAULT NULL, keterangan TEXT DEFAULT NULL, tanggal DATE NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id));
CREATE UNIQUE INDEX sales_mdp_rrn_uniq ON sales.mdp (rrn)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I upload my files in attachment. Please advice, thanks.&lt;/p&gt;</description>
                <environment>Windows XP SP 3&lt;br/&gt;
Postgresql 9.0&lt;br/&gt;
PHP 5.3</environment>
            <key id="12228">DDC-932</key>
            <summary>Schema problem with Postgresql</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="andyajadeh">Andy Aja deh</reporter>
                        <labels>
                    </labels>
                <created>Mon, 13 Dec 2010 21:13:53 +0000</created>
                <updated>Tue, 28 Dec 2010 23:18:23 +0000</updated>
                    <resolved>Tue, 28 Dec 2010 23:18:23 +0000</resolved>
                                            <fixVersion>2.0.1</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14967" author="beberlei" created="Tue, 14 Dec 2010 17:30:54 +0000"  >&lt;p&gt;Are you using RC2? If not please try it with RC2, i fixed a bug regarding this just some days ago.&lt;/p&gt;</comment>
                    <comment id="14968" author="andyajadeh" created="Tue, 14 Dec 2010 22:21:07 +0000"  >&lt;p&gt;Ic, I updated to RC2 and this issue was solved. Thanks Ben. &lt;/p&gt;

&lt;p&gt;But now, I get another problem. When I add a new class &amp;amp; mapping with &lt;b&gt;no schema&lt;/b&gt;, it is generated in the previous mapped schema.&lt;br/&gt;
Is it the way it should works? and if I want to map to public schema, do I need to explicitly write &quot;public.table_name&quot; ?&lt;/p&gt;

&lt;p&gt;Here is my new mapping:&lt;/p&gt;

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

use Doctrine\ORM\Mapping\ClassMetadataInfo;

$metadata-&amp;gt;setInheritanceType(ClassMetadataInfo::INHERITANCE_TYPE_NONE);
$metadata-&amp;gt;setPrimaryTable(array(
   &apos;name&apos; =&amp;gt; &apos;cabang&apos;,
));

$metadata-&amp;gt;setChangeTrackingPolicy(ClassMetadataInfo::CHANGETRACKING_DEFERRED_IMPLICIT);
$metadata-&amp;gt;setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE);
$metadata-&amp;gt;setSequenceGeneratorDefinition(array(
        &apos;sequenceName&apos;   =&amp;gt; &apos;cabang_id_seq&apos;,
        &apos;allocationSize&apos; =&amp;gt; 10,
        &apos;initialValue&apos;   =&amp;gt; 1,
    ));

$metadata-&amp;gt;mapField(array(
   &apos;id&apos;         =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;,
   &apos;fieldName&apos;  =&amp;gt; &apos;id&apos;,
   &apos;columnName&apos; =&amp;gt; &apos;id&apos;,
   &apos;type&apos;       =&amp;gt; &apos;integer&apos;,
   &apos;unsigned&apos;   =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;,
  ));

&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;&amp;lt;?php

use Doctrine\ORM\Mapping\ClassMetadataInfo;

$metadata-&amp;gt;setInheritanceType(ClassMetadataInfo::INHERITANCE_TYPE_NONE);
$metadata-&amp;gt;setPrimaryTable(array(
   &apos;name&apos; =&amp;gt; &apos;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;.kendaraan&apos;,
));

$metadata-&amp;gt;setChangeTrackingPolicy(ClassMetadataInfo::CHANGETRACKING_DEFERRED_IMPLICIT);
$metadata-&amp;gt;setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE);
$metadata-&amp;gt;setSequenceGeneratorDefinition(array(
        &apos;sequenceName&apos;   =&amp;gt; &apos;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;.kendaraan_id_seq&apos;,
        &apos;allocationSize&apos; =&amp;gt; 10,
        &apos;initialValue&apos;   =&amp;gt; 1,
    ));

$metadata-&amp;gt;mapField(array(
   &apos;id&apos;         =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;,
   &apos;fieldName&apos;  =&amp;gt; &apos;id&apos;,
   &apos;columnName&apos; =&amp;gt; &apos;id&apos;,
   &apos;type&apos;       =&amp;gt; &apos;integer&apos;,
   &apos;unsigned&apos;   =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;,
  ));
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I get the following:&lt;/p&gt;

&lt;p&gt;The table &lt;b&gt;cabang&lt;/b&gt;, is not generated in public schema, but in &lt;b&gt;sales&lt;/b&gt; schema (previously mapped sales.mdp), .&lt;br/&gt;
The table &lt;b&gt;public.kendaraan&lt;/b&gt; is generated correctly,&lt;br/&gt;
But even if I write explicitly &quot;public.kendaraan&quot;, (I don&apos;t edit anything, and just try to &lt;b&gt;orm:schema-tool:update&lt;/b&gt;) the --dump-sql still outputs:&lt;/p&gt;

&lt;div class=&quot;code panel&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 SEQUENCE &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;.kendaraan_id_seq INCREMENT BY 10 MINVALUE 1 START 1;
CREATE SEQUENCE cabang_id_seq INCREMENT BY 10 MINVALUE 1 START 1;
CREATE TABLE &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;.kendaraan (id INT NOT NULL, tipe_kendaraan VARCHAR(255) NOT
NULL, warna VARCHAR(255) NOT NULL, no_rangka VARCHAR(255) NOT NULL, no_mesin VARCHAR(255) NOT NULL, tahun INT NOT NULL, rrn VARCHAR(255) NOT NULL, salesman VARCHAR(255) DEFAULT NULL, pelanggan VARCHAR(255) DEFAULT NULL, keterangan VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id));
CREATE UNIQUE INDEX public_kendaraan_no_rangka_uniq ON &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;.kendaraan (no_rangka);
CREATE UNIQUE INDEX public_kendaraan_no_mesin_uniq ON &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;.kendaraan (no_mesin);
CREATE UNIQUE INDEX public_kendaraan_rrn_uniq ON &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;.kendaraan (rrn);
CREATE TABLE cabang (id INT NOT NULL, kode VARCHAR(255) NOT NULL, nama VARCHAR(255) NOT NULL, alamat VARCHAR(255) NOT NULL, PRIMARY KEY(id));
CREATE UNIQUE INDEX cabang_kode_uniq ON cabang (kode);
CREATE UNIQUE INDEX cabang_nama_uniq ON cabang (nama)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Thanks for helping.&lt;/p&gt;</comment>
                    <comment id="14976" author="beberlei" created="Thu, 16 Dec 2010 15:11:53 +0000"  >&lt;p&gt;hm, maybe i understand it wrong but arent unqualified tables ALWAYS generated into the public schema?&lt;/p&gt;

&lt;p&gt;Executing your code with &quot;CREATE ETABLE kenderaan&quot; (without public. prefix) it still puts it into the public schema, not into sales.&lt;/p&gt;</comment>
                    <comment id="14977" author="andyajadeh" created="Thu, 16 Dec 2010 20:53:36 +0000"  >&lt;p&gt;Yes, like you said. The unqualified tables should always be generated into public schema. And my cases here are:&lt;/p&gt;

&lt;p&gt;1. my unqualified table: &lt;b&gt;cabang&lt;/b&gt; is not generated in public schema, but in sales schema.&lt;/p&gt;

&lt;p&gt;2. my fully qualified table: &lt;b&gt;public.kendaraan&lt;/b&gt; is generated correctly in public schema then I don&apos;t edit anything, and just try to orm:schema-tool:update), expected --dump-sql is empty, but I get:&lt;/p&gt;

&lt;div class=&quot;code panel&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 SEQUENCE &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;.kendaraan_id_seq INCREMENT BY 10 MINVALUE 1 START 1;
CREATE SEQUENCE cabang_id_seq INCREMENT BY 10 MINVALUE 1 START 1;
CREATE TABLE &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;.kendaraan (id INT NOT NULL, tipe_kendaraan VARCHAR(255) NOT
NULL, warna VARCHAR(255) NOT NULL, no_rangka VARCHAR(255) NOT NULL, no_mesin VARCHAR(255) NOT NULL, tahun INT NOT NULL, rrn VARCHAR(255) NOT NULL, salesman VARCHAR(255) DEFAULT NULL, pelanggan VARCHAR(255) DEFAULT NULL, keterangan VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id));
CREATE UNIQUE INDEX public_kendaraan_no_rangka_uniq ON &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;.kendaraan (no_rangka);
CREATE UNIQUE INDEX public_kendaraan_no_mesin_uniq ON &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;.kendaraan (no_mesin);
CREATE UNIQUE INDEX public_kendaraan_rrn_uniq ON &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt;.kendaraan (rrn);
CREATE TABLE cabang (id INT NOT NULL, kode VARCHAR(255) NOT NULL, nama VARCHAR(255) NOT NULL, alamat VARCHAR(255) NOT NULL, PRIMARY KEY(id));
CREATE UNIQUE INDEX cabang_kode_uniq ON cabang (kode);
CREATE UNIQUE INDEX cabang_nama_uniq ON cabang (nama)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="15036" author="beberlei" created="Tue, 28 Dec 2010 06:13:51 +0000"  >&lt;p&gt;is your database user named &quot;cabang&quot;? Unqualified is defined by some include path equivalent in PostgreSQL.&lt;/p&gt;</comment>
                    <comment id="15044" author="beberlei" created="Tue, 28 Dec 2010 10:05:51 +0000"  >&lt;p&gt;See 5.7.3 here &lt;a href=&quot;http://www.postgresql.org/docs/current/static/ddl-schemas.html&quot; class=&quot;external-link&quot;&gt;http://www.postgresql.org/docs/current/static/ddl-schemas.html&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="15049" author="andyajadeh" created="Tue, 28 Dec 2010 23:14:16 +0000"  >&lt;p&gt;Oic, my database username is &quot;sales&quot;, so the unqualified schema is generated in &quot;sales&quot; schema.&lt;/p&gt;

&lt;p&gt;Thanks a lot for your help.&lt;/p&gt;</comment>
                    <comment id="15050" author="andyajadeh" created="Tue, 28 Dec 2010 23:18:23 +0000"  >&lt;p&gt;This is not doctrine&apos;s bug, It is my miss understanding about schema search path behavior in postgresql. Thanks.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10893" name="cli-config.php" size="1369" author="andyajadeh" created="Mon, 13 Dec 2010 21:13:53 +0000" />
                    <attachment id="10891" name="Mdp.php" size="2382" author="andyajadeh" created="Mon, 13 Dec 2010 21:13:53 +0000" />
                    <attachment id="10895" name="Sales.Domain.Kendaraan.php" size="2156" author="andyajadeh" created="Tue, 14 Dec 2010 22:58:03 +0000" />
                    <attachment id="10894" name="Sales.Domain.Master.Cabang.php" size="1154" author="andyajadeh" created="Tue, 14 Dec 2010 22:58:03 +0000" />
                    <attachment id="10892" name="Sales.Domain.Mdp.php" size="2101" author="andyajadeh" created="Mon, 13 Dec 2010 21:13:53 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-931] SchemaTool-&gt;dropSchema fails if the given schema doesn&apos;t exist</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-931</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;SchemaTool-&amp;gt;dropSchema&apos;s documentation says:&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; 
Drops the database schema for the given classes.

In any way when an exception is thrown it is supressed since drop was issued for all classes of the schema and some probably just don&apos;t exist.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;However, with a recent upgrade to 2.0-RC2, this doesn&apos;t work anymore. A PDO exception isn&apos;t caught if the specified table doesn&apos;t exist already.&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; 
exception &apos;PDOException&apos; with message &apos;SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table &apos;UserAddress&apos;&apos; in /usr/share/php/Doctrine/DBAL/Connection.php:577
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;I&apos;m not sure if this was caused by the ORM update or if it&apos;s maybe somewhere inside DBAL, which I upgraded at the same time.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12227">DDC-931</key>
            <summary>SchemaTool-&gt;dropSchema fails if the given schema doesn&apos;t exist</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="romanb">Roman S. Borschel</assignee>
                                <reporter username="felicitus">Timo A. Hummel</reporter>
                        <labels>
                    </labels>
                <created>Mon, 13 Dec 2010 18:59:32 +0000</created>
                <updated>Wed, 22 Dec 2010 17:11:12 +0000</updated>
                    <resolved>Wed, 22 Dec 2010 17:11:12 +0000</resolved>
                            <version>2.0-RC2</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14998" author="beberlei" created="Wed, 22 Dec 2010 17:11:12 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-929] A index has to be named as &quot;primary&quot; to be detected Doctrine\ORM\Mapping\Driver\DatabaseDriver::loadMetadataForClass()</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-929</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Condition&lt;/p&gt;

&lt;p&gt;if (isset($indexes&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;primary&amp;#39;&amp;#93;&lt;/span&gt;) &amp;amp;&amp;amp; in_array($column-&amp;gt;getName(), $indexes&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;primary&amp;#39;&amp;#93;&lt;/span&gt;-&amp;gt;getColumns())) {&lt;/p&gt;

&lt;p&gt;needs the primary key to be named as primary. Discovered this when reverse engineering an existing database.&lt;/p&gt;

&lt;p&gt;Fix, that worked for me:&lt;/p&gt;

&lt;p&gt;Replace:&lt;/p&gt;


&lt;p&gt;if (isset($indexes&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;primary&amp;#39;&amp;#93;&lt;/span&gt;) &amp;amp;&amp;amp; in_array($column-&amp;gt;getName(), $indexes&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;primary&amp;#39;&amp;#93;&lt;/span&gt;-&amp;gt;getColumns())) {&lt;br/&gt;
                $fieldMapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;id&amp;#39;&amp;#93;&lt;/span&gt; = true;&lt;/p&gt;

&lt;p&gt;With:&lt;/p&gt;

&lt;p&gt;$primary = false;&lt;/p&gt;

&lt;p&gt;	foreach ($indexes as $index)&lt;br/&gt;
	{&lt;br/&gt;
		if ($index-&amp;gt;isPrimary())&lt;br/&gt;
		{&lt;br/&gt;
			if (in_array($column-&amp;gt;getName(), $index-&amp;gt;getColumns()))&lt;/p&gt;
			{
				$primary = true;
				break;
			}
&lt;p&gt;		}&lt;br/&gt;
	}&lt;/p&gt;

&lt;p&gt;            if ($primary){    &lt;br/&gt;
		$fieldMapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;id&amp;#39;&amp;#93;&lt;/span&gt; = true;&lt;/p&gt;</description>
                <environment>FreeBSD, PostgreSQL 8.4</environment>
            <key id="12224">DDC-929</key>
            <summary>A index has to be named as &quot;primary&quot; to be detected Doctrine\ORM\Mapping\Driver\DatabaseDriver::loadMetadataForClass()</summary>
                <type id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/subtask_alternate.png">Sub-task</type>
                    <parent id="12093">DDC-874</parent>
                        <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="teuzz">Jiri Helmich</reporter>
                        <labels>
                    </labels>
                <created>Mon, 13 Dec 2010 02:33:56 +0000</created>
                <updated>Thu, 30 Dec 2010 17:19:55 +0000</updated>
                    <resolved>Thu, 30 Dec 2010 17:19:55 +0000</resolved>
                            <version>2.0-RC2</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15069" author="beberlei" created="Thu, 30 Dec 2010 17:19:55 +0000"  >&lt;p&gt;Fixed.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-928] Using uninitialised variable in lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-928</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;A call:&lt;/p&gt;

&lt;p&gt;$metadata-&amp;gt;setSequenceGeneratorDefinition($definition);&lt;/p&gt;

&lt;p&gt;is performed a line above the definition of the $definition variable.&lt;/p&gt;

&lt;p&gt;Fix: Switch those two lines:&lt;/p&gt;

&lt;p&gt;//          $metadata-&amp;gt;setSequenceGeneratorDefinition($definition); //was here&lt;br/&gt;
            $definition = array(&lt;br/&gt;
                &apos;sequenceName&apos; =&amp;gt; is_array($column&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;sequence&amp;#39;&amp;#93;&lt;/span&gt;) ? $column&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;sequence&amp;#39;&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;name&amp;#39;&amp;#93;&lt;/span&gt;:$column&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;sequence&amp;#39;&amp;#93;&lt;/span&gt;&lt;br/&gt;
            );&lt;br/&gt;
            $metadata-&amp;gt;setSequenceGeneratorDefinition($definition); //belongs here&lt;/p&gt;

&lt;p&gt;On line 191 in RC2 release.&lt;/p&gt;</description>
                <environment>FreeBSD</environment>
            <key id="12223">DDC-928</key>
            <summary>Using uninitialised variable in lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.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="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="teuzz">Jiri Helmich</reporter>
                        <labels>
                    </labels>
                <created>Mon, 13 Dec 2010 02:14:30 +0000</created>
                <updated>Tue, 28 Dec 2010 06:20:48 +0000</updated>
                    <resolved>Tue, 28 Dec 2010 06:20:48 +0000</resolved>
                            <version>2.0-RC2</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15037" author="beberlei" created="Tue, 28 Dec 2010 06:20:48 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-892] Caches can potentially return false positives due to use of MD5 hash codes as keys. A classic.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-892</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I was just checking the execution path for efficiency and bumped into this block of code in /Doctrine/ORM/AbstracQuery.php,&lt;br/&gt;
starting on line 560:&lt;/p&gt;

&lt;p&gt;    protected function _getResultCacheId()&lt;br/&gt;
    {&lt;br/&gt;
        if ($this-&amp;gt;_resultCacheId) &lt;/p&gt;
{
            return $this-&amp;gt;_resultCacheId;
        }
&lt;p&gt; else &lt;/p&gt;
{
            $sql = $this-&amp;gt;getSql();
            ksort($this-&amp;gt;_hints);
            return md5(implode(&quot;;&quot;, (array)$sql) . var_export($this-&amp;gt;_params, true) .
                var_export($this-&amp;gt;_hints, true).&quot;&amp;amp;hydrationMode=&quot;.$this-&amp;gt;_hydrationMode);
        }
&lt;p&gt;    }&lt;/p&gt;


&lt;p&gt;Of course, MD5 hashes can never be guaranteed to be unique, so this block of the doExecute-Method&lt;br/&gt;
starting on line 508 can return false positives and thus break the user&apos;s assumptions about the ORM&apos;s behavior:&lt;/p&gt;

&lt;p&gt;        // Check result cache&lt;br/&gt;
        if ($this-&amp;gt;_useResultCache &amp;amp;&amp;amp; $cacheDriver = $this-&amp;gt;getResultCacheDriver()) {&lt;br/&gt;
            $id = $this-&amp;gt;_getResultCacheId();&lt;br/&gt;
            $cached = $this-&amp;gt;_expireResultCache ? false : $cacheDriver-&amp;gt;fetch($id);&lt;/p&gt;

&lt;p&gt;            if ($cached === false) &lt;/p&gt;
{
                // Cache miss.
                $stmt = $this-&amp;gt;_doExecute();

                $result = $this-&amp;gt;_em-&amp;gt;getHydrator($this-&amp;gt;_hydrationMode)-&amp;gt;hydrateAll(
                        $stmt, $this-&amp;gt;_resultSetMapping, $this-&amp;gt;_hints
                        );

                $cacheDriver-&amp;gt;save($id, $result, $this-&amp;gt;_resultCacheTTL);

                return $result;
            }
&lt;p&gt; else &lt;/p&gt;
{
                // Cache hit.
                return $cached;
            }
&lt;p&gt;        }&lt;/p&gt;

&lt;p&gt;It is not likely to happen, but possible. Rely on it a couple of million times in a production system, and one day, eventually, it will fail&lt;br/&gt;
and hell will break loose.&lt;/p&gt;

&lt;p&gt;I think it is prohibitive to try to save memory by giving up correctness. If your program does not work, it&apos;s simply broken and there is no need to tune it unless you fix it functionally.&lt;/p&gt;

&lt;p&gt;The only safe solution would be to use a non-lossy hash (i. e. compression) method, if any. Plain query text would do fine too.&lt;/p&gt;

&lt;p&gt;Unless you expect the user to anticipate false positives, i. e.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12160">DDC-892</key>
            <summary>Caches can potentially return false positives due to use of MD5 hash codes as keys. A classic.</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="dalvarez">Daniel Alvarez Arribas</reporter>
                        <labels>
                    </labels>
                <created>Thu, 25 Nov 2010 14:00:10 +0000</created>
                <updated>Sun, 23 Jan 2011 14:55:26 +0000</updated>
                    <resolved>Sun, 23 Jan 2011 14:55:26 +0000</resolved>
                            <version>2.0-BETA4</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15018" author="dalvarez" created="Sat, 25 Dec 2010 13:27:38 +0000"  >&lt;p&gt;Has anyone taken note of this one?&lt;/p&gt;

&lt;p&gt;As it seems, this critical bug has been sitting here for a month, untouched, and apparently even made it into the final release.&lt;/p&gt;

&lt;p&gt;I would offer to fix it myself, but as the fix would consist in removing just one or two MD5 hash method calls, and it would probably have to be validated anyway by a core developer, there is actually not much technical effort I could save you.&lt;/p&gt;

&lt;p&gt;Just a reminder, thanks for your time.&lt;/p&gt;</comment>
                    <comment id="15019" author="beberlei" created="Mon, 27 Dec 2010 03:52:41 +0000"  >&lt;p&gt;The problem is rather that cache keys have a limited length depending on the cache driver.I know that Memcache limits at 255, have to look at the others.&lt;/p&gt;

&lt;p&gt;Plain Text is not a solution, but we could build a range of several md5 or sha1 hashes to reduce the risk of false/positives even more.&lt;/p&gt;</comment>
                    <comment id="15056" author="dalvarez" created="Wed, 29 Dec 2010 18:36:59 +0000"  >&lt;p&gt;Hey Ben,&lt;/p&gt;

&lt;p&gt;thanks for taking care.&lt;/p&gt;

&lt;p&gt;I see the point about the length limitation. Still, I believe is a bad thing to subject correctness to probability considerations. Merely making it more unlikely to happen would only procrastinate a definite solution. Staying with a solution that relies on hash values being unique, is gambling with the probability of software systems malfunctioning randomly for no apparent reason, which is not a desirable outcome.&lt;/p&gt;

&lt;p&gt;I figured out an alternate approach that IMO solves the length limit issue, while, to my knowledge, being correct. This is my first shot at it. But right now I do not see why this, or something like it, should not be feasible.&lt;/p&gt;

&lt;p&gt;You could keep on indexing by MD5 hash value (just to guarantee an upper bound on the key length and circumvent the limits regarding the maximum key length). I think MD5 does that part quite well. But instead of just storing the value, store a map, mapping all of the original full-length keys that resolve to that common MD5 hash value to their individual values. In almost all but a few very rare cases, this map will have exactly one entry. Therefore in almost all cases, all that is retrieved from the cache is the value, plus the original key, enclosed in a map wrapper object. Needless to say, this map can be optimized for one entry. It could even be a list, with only a few bytes overhead. This solution would be almost as fast for read accesses as the most na&#239;ve cache implementation, but still work in cases where keys resolve to the same hash value.&lt;/p&gt;

&lt;p&gt;The details are easy:&lt;/p&gt;

&lt;p&gt;Fetching: Fetch the cache entry (the map) by the key&apos;s MD5 hash value. Then, look the correct value up in the map using the full-length key. Remember this is not any expensive operation. The map contains almost always exactly one value.&lt;/p&gt;

&lt;p&gt;Creating: Fetch the cache entry (the map) by the key&apos;s MD5 hash value. If there is no cache entry at all, create a new map with a single entry in it and store it into the cache. If there is an entry, get the map, add the new entry to it using the full-length key and the value, and store the map back into the cache using the key&apos;s MD5 hash value. Adding a value to the map would also replace any existing entry for the full-length key in case it is already present in the map.&lt;/p&gt;

&lt;p&gt;Deleting: Fetch the cache entry (the map) by the key&apos;s MD5 hash value. Then, use the full-length key to delete the corresponding value from the map. If the map is empty after removing the entry (and it will be almost always), delete the whole cache entry using the key&apos;s MD5 hash value.&lt;/p&gt;

&lt;p&gt;This technique is correct always, and gives almost no overhead for reads. For writes and deletes, you have to fetch first, so there is an overhead, but right now I can&apos;t come up with anything faster&lt;br/&gt;
that isn&apos;t broken.&lt;/p&gt;

&lt;p&gt;An optimization would be implementing an additional direct full-key mapping, too, for those cache providers supporting arbitrary length keys. This could give slightly better write performance when arbitrary-length keys are supported, as there would not be any map to be read in case of writing and deleting, just a direct cache operation.&lt;/p&gt;</comment>
                    <comment id="15061" author="beberlei" created="Thu, 30 Dec 2010 07:51:56 +0000"  >&lt;p&gt;The unhashed key could potentially be very large, which could lead to problems with the value limit of the caches. Plus the unhashed value relies on print_r(), thus on whitespace formatting which i wouldn&apos;t call exactly reliable.&lt;/p&gt;

&lt;p&gt;We need to find a better solution to fix this &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="15085" author="dalvarez" created="Sat, 1 Jan 2011 16:37:36 +0000"  >&lt;p&gt;As for the size limit on cached values, I think it is an independent problem, because any value size limit applies in any case, whether or not you implement unique keys or not. Currently, it also applies e. g. to query results, for which an upper size limit can not be guaranteed in general. Consequently, a strategy for handling such a limit is required anyway. &lt;/p&gt;

&lt;p&gt;The na&#239;ve solution for handling the value size limit would be to simply not cache any values with a total size larger than the value size limit of the respective cache. As the value size limit should actually be reasonably large (memcached e.g. has a default limit of 1 MB), and the limitation is inherent to the cache, this should be perfectly plausible, because it is the caches key functionality that imposes the limit, not Doctrine. I believe the na&#239;ve solution is on-the-spot here, and would recommend to strictly opt against taking further measures (like splitting cache entries into buckets) to work around the problem. Working around this limit should have been implemented in the respective cache in the first place, not in Doctrine, as it concerns the caches key functionality. IMO the ORM should not duplicate cache functionality, rather use it in a proper way. &lt;/p&gt;

&lt;p&gt;But after all, this is an unrelated problem, and it does not affect the point of this bug in any way. &lt;/p&gt;

&lt;p&gt;As for the reliance on print_r: If you consider it to be non-deterministic (producing different output formattings for identical objects) it would be broken (possibly by design). That being said, I do not believe print_r() is non-deterministic by design, though the exact workings of it might not be formally specified. The formatting in the return value string should not introduce ambiguity into the representations of otherwise unique values, and neither produce different values for identical objects. As long as these conditions are met, you should be safe using it for generating cache keys. If not, use something that does fit. This is a mere implementation issue, anyway. You could also strip whitespaces (provided this does not affect uniqueness), to eliminate the whitespace factor. &lt;/p&gt;

&lt;p&gt;If cache size efficiency of stored values is an issue, you could be well-advised to support compressing cache values (losslessly, of course) as an option. &lt;/p&gt;</comment>
                    <comment id="15109" author="beberlei" created="Wed, 5 Jan 2011 12:36:37 +0000"  >&lt;p&gt;Ok, the common recommendation to avoid cache collisions is using a multitude of different hashes and combine them, or use a very large hash.&lt;/p&gt;

&lt;p&gt;So the best solution here is probably to switch to a cache key that has &quot;sha1 + md5 + crc32&quot; of the input and if ext/hash is installed use something much more  powerful like sha256.&lt;/p&gt;</comment>
                    <comment id="15110" author="dalvarez" created="Wed, 5 Jan 2011 17:21:18 +0000"  >&lt;p&gt;That &quot;recommendation&quot; you are referring to might be just the common practice of using a combination of various hash values to increase the accuracy of ensuring data integrity and authenticity (e.g. by providing various different hash values for downloaded files). IMO this practice is feasible only for purposes like those, and can not be relied on if what you want to do is obtain correct results on cache lookups. While a change in hash value means that the file has definitely been modified (compared to the original) it does not imply e. g. that various modified files that have the same hash value have actually the same modified content.&lt;/p&gt;

&lt;p&gt;What you are trying to do could be used in situations where a Bloom Filter (&lt;a href=&quot;http://en.wikipedia.org/wiki/Bloom_filter&quot; class=&quot;external-link&quot;&gt;http://en.wikipedia.org/wiki/Bloom_filter&lt;/a&gt;) could be appropriately used, which is basically such a combination of various hashes. This could perfectly be used to determine whether there is a high chance that a specific value is in the cache. Such information could be useful to optimize disk accesses or costly requests to remote caches. Bloom filters are used e.g. in the Squid Caching HTTP Proxy, but certainly not for keying, rather for cache digests (read: &quot;is it likely that this key is in the cache?&quot;). This is not the case with the Doctrine 2 caches - these should better be 100% reliable.&lt;/p&gt;

&lt;p&gt;Increasing the number or size of hash values will just decrease the probability of a crash, but will not ultimately fix the problem (unless you make the hash values include all original information, but that would be pointless in the first place). And that something is unlikely to happen does not mean it will necessarily take a long time to actually happen. It could as well break an application tomorrow.&lt;/p&gt;

&lt;p&gt;Seriously, I do not know of any theoretically backed recommendation that tolerates wrong results when correctness is expected. There are a couple of approximation techniques appropriate in situations where false positives are anticipated, but I believe no such technique would be an appropriate solution for your situation, simply because no one expects the programming contract to imply having to anticipate false positives.&lt;/p&gt;

&lt;p&gt;But of course, various hashes would still be better than one, though still worth a bug. Personally I would always opt for correctness. Do as you like.&lt;/p&gt;</comment>
                    <comment id="15175" author="beberlei" created="Sun, 23 Jan 2011 14:55:26 +0000"  >&lt;p&gt;Implemented separate chaining to avoid hash key collisions.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-874] orm:convert-mapping</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-874</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have a Postgres SQL database.&lt;br/&gt;
The Base has only one table &quot;User&quot; with two attributes (name and id).&lt;br/&gt;
&quot;Id&quot; is primary key.&lt;/p&gt;

&lt;p&gt;The failure to execute the task:&lt;br/&gt;
php orm doctrine: convert-mapping - from-database yml / home / cristian / database.yml&lt;/p&gt;

&lt;p&gt;is:&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;
  No identifier / primary key for Specified Entity &apos;User&apos;. Every Entity must have for an identifier / primary key&lt;/p&gt;

&lt;p&gt;Script to create the table:&lt;/p&gt;

&lt;p&gt;CREATE TABLE &quot;User&quot;&lt;br/&gt;
(&lt;br/&gt;
  id serial NOT NULL,&lt;br/&gt;
  name character varying (55),&lt;br/&gt;
  CONSTRAINT &quot;User_pkey&quot; PRIMARY KEY (id)&lt;br/&gt;
)&lt;br/&gt;
WITH (&lt;br/&gt;
  OIDS = FALSE&lt;br/&gt;
)&lt;br/&gt;
ALTER TABLE &quot;User&quot; OWNER TO postgres;&lt;/p&gt;</description>
                <environment>Ubuntu 10.10.</environment>
            <key id="12093">DDC-874</key>
            <summary>orm:convert-mapping</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="csrinaldi">Cristian Rinaldi</reporter>
                        <labels>
                    </labels>
                <created>Wed, 10 Nov 2010 14:36:13 +0000</created>
                <updated>Thu, 30 Dec 2010 17:20:15 +0000</updated>
                    <resolved>Thu, 30 Dec 2010 17:20:15 +0000</resolved>
                            <version>2.0-BETA4</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15070" author="beberlei" created="Thu, 30 Dec 2010 17:20:15 +0000"  >&lt;p&gt;Fixed in &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-929&quot; title=&quot;A index has to be named as &amp;quot;primary&amp;quot; to be detected Doctrine\ORM\Mapping\Driver\DatabaseDriver::loadMetadataForClass()&quot;&gt;&lt;del&gt;DDC-929&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
            <subtask id="12224">DDC-929</subtask>
        </subtasks>
        </item>

<item>
            <title>[DDC-837] Two children in inheritance with same property name causes error in hydration</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-837</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This is related to &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-258&quot; title=&quot;DiscriminatorMap Ordering Affects Mapping&quot;&gt;&lt;del&gt;DDC-258&lt;/del&gt;&lt;/a&gt;.  The issue seems to be fixed with regular column types (string, int, etc) but the same issue has cropped up when we have a OneToOne relationship in two child classes that share the same property name.  I have modified the DDC258TestCase class to demonstrate the error.&lt;/p&gt;

&lt;p&gt;To summarize: two classes that inherit from the same class happen to have a property with the same name.  Both of them are oneToOne relationships.  Querying for the objects, one object type (depending on discriminatorMap order) will be hydrate correctly but the other will always be null.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12001">DDC-837</key>
            <summary>Two children in inheritance with same property name causes error in hydration</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="mridgway">Michael Ridgway</reporter>
                        <labels>
                    </labels>
                <created>Tue, 12 Oct 2010 14:59:37 +0000</created>
                <updated>Tue, 28 Dec 2010 08:59:35 +0000</updated>
                    <resolved>Tue, 28 Dec 2010 08:59:35 +0000</resolved>
                            <version>2.0-BETA4</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="14558" author="beberlei" created="Wed, 13 Oct 2010 02:07:04 +0000"  >&lt;p&gt;This is not a bug, its documented behavior and is technically not feasible.&lt;/p&gt;</comment>
                    <comment id="14560" author="mridgway" created="Wed, 13 Oct 2010 09:19:26 +0000"  >&lt;p&gt;Why would this not be feasible on relationships even though it is on regular column types?  I feel like this is the same issue as &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-258&quot; title=&quot;DiscriminatorMap Ordering Affects Mapping&quot;&gt;&lt;del&gt;DDC-258&lt;/del&gt;&lt;/a&gt;.  I understand a child can&apos;t have a property named the same as the parent&apos;s, but two children should be able to have properties with the same name (and currently can if it&apos;s not a relationship).&lt;/p&gt;</comment>
                    <comment id="14568" author="beberlei" created="Thu, 14 Oct 2010 13:52:23 +0000"  >&lt;p&gt;oh maybe i am wrong &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="15042" author="beberlei" created="Tue, 28 Dec 2010 08:59:35 +0000"  >&lt;p&gt;Fixed&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10823" name="DDC258Test.php" size="5354" author="mridgway" created="Tue, 12 Oct 2010 14:59:37 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-617] ObjectHydrator issue with OneToMany relationship</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-617</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;m pretty new to this ORM thing but I am having a weird issue with a DQL query I think should work (or throw an exception). I have 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;namespace Lms\Entities;
/**
 *
 * @Entity
 * @Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;User&quot;&lt;/span&gt;)
 */
class User {

	&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __constructor() {
		$social_media_links = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\Common\Collections\ArrayCollection;
	}
	/**
	 * @Id
	 * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;bigint&quot;&lt;/span&gt;)
	 * @GeneratedValue
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;

	/** @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, nullable=TRUE, length=1024) */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $mission_statement;

	/** @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;) */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $first_name;

	/** @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;) */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $last_name;

	/** @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, nullable=TRUE, length=8) */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $initial;

	/** @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, nullable=TRUE) */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $email;

	/** @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, nullable=TRUE) */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $company;

	/** @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, nullable=TRUE, length=1024) */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $picture;

	/** @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;text&quot;&lt;/span&gt;, nullable=TRUE) */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $bio;

	&lt;span class=&quot;code-comment&quot;&gt;// unidirectional one to many relationship with social media link
&lt;/span&gt;	/**
	 * @ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;SocialMediaLink&quot;&lt;/span&gt;)
	 * @JoinTable(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;Users_Socialmedialinks&quot;&lt;/span&gt;,
	 *      joinColumns={@JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;user_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;)},
	 *      inverseJoinColumns={@JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;socialmedialink_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;, unique=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)}
	 *      )
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $social_media_links;
	

    /**
     * Add social_media_links
     *
     * @param SocialMediaLink $socialMediaLinks
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function addSocialMediaLinks(\SocialMediaLink $socialMediaLinks)
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;social_media_links[] = $socialMediaLinks;
    }

    /**
     * Get social_media_links
     *
     * @&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; Doctrine\Common\Collections\Collection $socialMediaLinks
     */
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function getSocialMediaLinks()
    {
        &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;social_media_links;
    }
}
&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;namespace Lms\Entities;

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

	/**
	 * @Id
	 * @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;bigint&quot;&lt;/span&gt;)
	 * @GeneratedValue
	 */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;

	/** @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;) */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $title;

	/** @Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;) */
	&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $link;

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

&lt;p&gt;And when I execute:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;		$sml = $&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 s FROM Lms\Entities\User u JOIN u.social_media_links  AS s WHERE u.id = ?1 AND s.id = ?2&quot;&lt;/span&gt;)
					-&amp;gt;setParameter(1, 1)
					-&amp;gt;setParameter(2, 1)
					-&amp;gt;getResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I get the following trace:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;1) DoctrineExtensions\PHPUnit\UserTestCase::testEditSocialMediaLink
class_parents(): object or string expected

C:\xampp\htdocs\lms-user-sml-feature\system\application\libraries\Doctrine\ORM\Mapping\ClassMetadataFactory.php:201
C:\xampp\htdocs\lms-user-sml-feature\system\application\libraries\Doctrine\ORM\Mapping\ClassMetadataFactory.php:224
C:\xampp\htdocs\lms-user-sml-feature\system\application\libraries\Doctrine\ORM\Mapping\ClassMetadataFactory.php:148
C:\xampp\htdocs\lms-user-sml-feature\system\application\libraries\Doctrine\ORM\EntityManager.php:235
C:\xampp\htdocs\lms-user-sml-feature\system\application\libraries\Doctrine\ORM\Internal\Hydration\ObjectHydrator.php:220
C:\xampp\htdocs\lms-user-sml-feature\system\application\libraries\Doctrine\ORM\Internal\Hydration\ObjectHydrator.php:75
C:\xampp\htdocs\lms-user-sml-feature\system\application\libraries\Doctrine\ORM\Internal\Hydration\AbstractHydrator.php:98
C:\xampp\htdocs\lms-user-sml-feature\system\application\libraries\Doctrine\ORM\AbstractQuery.php:530
C:\xampp\htdocs\lms-user-sml-feature\system\application\libraries\Doctrine\ORM\AbstractQuery.php:360
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The following data is in the database:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-xml&quot;&gt;&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;?xml version=&lt;span class=&quot;code-quote&quot;&gt;&quot;1.0&quot;&lt;/span&gt; encoding=&lt;span class=&quot;code-quote&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;dataset&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;table name=&lt;span class=&quot;code-quote&quot;&gt;&quot;user&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;column&amp;gt;&lt;/span&gt;id&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/column&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;column&amp;gt;&lt;/span&gt;mission_Statement&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/column&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;column&amp;gt;&lt;/span&gt;first_name&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/column&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;column&amp;gt;&lt;/span&gt;last_name&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/column&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;column&amp;gt;&lt;/span&gt;initial&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/column&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;column&amp;gt;&lt;/span&gt;email&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/column&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;column&amp;gt;&lt;/span&gt;company&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/column&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;column&amp;gt;&lt;/span&gt;picture&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/column&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;column&amp;gt;&lt;/span&gt;bio&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/column&amp;gt;&lt;/span&gt;
		
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;row&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;value&amp;gt;&lt;/span&gt;1&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/value&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;value&amp;gt;&lt;/span&gt;Mission Statement 1&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/value&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;value&amp;gt;&lt;/span&gt;First Name 1&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/value&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;value&amp;gt;&lt;/span&gt;Last Name 1&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/value&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;value&amp;gt;&lt;/span&gt;IN1&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/value&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;value&amp;gt;&lt;/span&gt;email1@email.com&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/value&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;value&amp;gt;&lt;/span&gt;Company 1&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/value&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;value&amp;gt;&lt;/span&gt;Picture 1&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/value&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;value&amp;gt;&lt;/span&gt;Bio 1&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/value&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/row&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;
	
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;table name=&lt;span class=&quot;code-quote&quot;&gt;&quot;socialmedialink&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;column&amp;gt;&lt;/span&gt;id&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/column&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;column&amp;gt;&lt;/span&gt;title&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/column&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;column&amp;gt;&lt;/span&gt;link&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/column&amp;gt;&lt;/span&gt;

		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;row&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;value&amp;gt;&lt;/span&gt;1&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/value&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;value&amp;gt;&lt;/span&gt;Social Media Title 1&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/value&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;value&amp;gt;&lt;/span&gt;Social Media Link 1&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/value&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/row&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;
	
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;table name=&lt;span class=&quot;code-quote&quot;&gt;&quot;users_socialmedialinks&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;column&amp;gt;&lt;/span&gt;user_id&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/column&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;column&amp;gt;&lt;/span&gt;socialmedialink_id&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/column&amp;gt;&lt;/span&gt;

		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;row&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;value&amp;gt;&lt;/span&gt;1&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/value&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;value&amp;gt;&lt;/span&gt;1&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/value&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/row&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;
&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/dataset&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>XAMPP 1.7.3 on Windows Vista</environment>
            <key id="11427">DDC-617</key>
            <summary>ObjectHydrator issue with OneToMany relationship</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="numan">Numan S</reporter>
                        <labels>
                    </labels>
                <created>Sun, 30 May 2010 17:01:11 +0000</created>
                <updated>Tue, 28 Dec 2010 04:25:07 +0000</updated>
                    <resolved>Tue, 28 Dec 2010 04:25:07 +0000</resolved>
                            <version>2.0-BETA1</version>
                                <fixVersion>2.0.1</fixVersion>
                <fixVersion>2.1</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="13084" author="numan" created="Sun, 30 May 2010 18:22:47 +0000"  >&lt;p&gt;After messing around with it a little bit, the following will 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;	
		$sml = $&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,s FROM Lms\Entities\User u JOIN u.social_media_links AS s WHERE u.id = ?1 AND s.id = ?2&quot;&lt;/span&gt;)
					-&amp;gt;setParameter(1, 1)
					-&amp;gt;setParameter(2, 1)
					-&amp;gt;getResult();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="13824" author="romanb" created="Sat, 7 Aug 2010 07:26:59 +0000"  >&lt;p&gt;Hydration does not (yet?) support such kinds of queries where the root entity/schema name is not selected.&lt;/p&gt;</comment>
                    <comment id="14394" author="beberlei" created="Wed, 15 Sep 2010 16:32:32 +0000"  >&lt;p&gt;@roman i think this should be solved in conjunction with &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-736&quot; title=&quot;Nasty ordering issue with fetch-joins&quot;&gt;&lt;del&gt;DDC-736&lt;/del&gt;&lt;/a&gt; and throw an exception if the users tries to do this. Is this possible in linear time?&lt;/p&gt;</comment>
                    <comment id="15029" author="beberlei" created="Tue, 28 Dec 2010 04:25:07 +0000"  >&lt;p&gt;Fixed, a QueryException will now be thrown if attempting to select one or more identification variables without picking at least one root.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10620" name="SocialMediaLink.php" size="1149" author="numan" created="Sun, 30 May 2010 17:01:11 +0000" />
                    <attachment id="10619" name="User.php" size="6871" author="numan" created="Sun, 30 May 2010 17:01:11 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-166] When entity is moved from one collection to another, it is still considered &quot;orphaned&quot;</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-166</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;If I remove an entity from a PersistentCollection, the UnitOfWork marks is as &quot;orphaned&quot; (assuming I set that in my entity). If I then move the entity to another collection, this status doesn&apos;t get removed, and the UnitOfWork deletes it.&lt;/p&gt;</description>
                <environment></environment>
            <key id="10481">DDC-166</key>
            <summary>When entity is moved from one collection to another, it is still considered &quot;orphaned&quot;</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ablock">Avi Block</reporter>
                        <labels>
                    </labels>
                <created>Fri, 20 Nov 2009 20:44:03 +0000</created>
                <updated>Sun, 2 Jan 2011 05:20:06 +0000</updated>
                    <resolved>Sun, 2 Jan 2011 05:20:06 +0000</resolved>
                            <version>2.0-ALPHA3</version>
                                <fixVersion>2.0.1</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15022" author="beberlei" created="Mon, 27 Dec 2010 07:57:04 +0000"  >&lt;p&gt;Hm i think this should be marked as bug&lt;/p&gt;</comment>
                    <comment id="15023" author="beberlei" created="Mon, 27 Dec 2010 16:53:29 +0000"  >&lt;p&gt;Attached a patch to fix this issue, but its not really final yet.&lt;/p&gt;

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

&lt;p&gt;1. Are PersistentCollection::add() and PersistentCollection::remove() the only cases where unscheduleOrphanRemoval() is necessary? What about simple ArrayCollections on a new entity?&lt;br/&gt;
2. What about TO_ONE associations with orphan removal?&lt;/p&gt;</comment>
                    <comment id="15024" author="beberlei" created="Mon, 27 Dec 2010 17:59:31 +0000"  >&lt;p&gt;Patch that solves the issue with ArrayCollections that cannot unschedule orphan removals themselves.&lt;/p&gt;

&lt;p&gt;Now only the problem with ONE_TO_ONE relation persists. However this means we might need a new UnitOfWork instance variable. The reason for this is that the Orphan removal of ONE_TO_ONE is detected in &quot;UnitOfWork::computeChangeSets&quot;. We cannot use the current &quot;UnitOfWork::unscheduleOrphanRemoval&quot; for this, since it would fail on the following ordering problem:&lt;/p&gt;

&lt;p&gt;1. Entity B unschedule Orphan Removal&lt;br/&gt;
2. Entity A schedule Orphan Removal again (#fail)&lt;/p&gt;</comment>
                    <comment id="15092" author="beberlei" created="Sun, 2 Jan 2011 05:20:06 +0000"  >&lt;p&gt;We discussed this issue and came to the conclusion that this behavior is not a bug rather a documentation issue.&lt;/p&gt;

&lt;p&gt;Enabling orphanRemoval=true is the semantical equivalent of saying that the orphan entity is privately owned by the parent. That means it should not be re-used!&lt;/p&gt;

&lt;p&gt;If you want to re-use entities you should rather look into explicit $em-&amp;gt;remove() calls or using cascade=remove.&lt;/p&gt;

&lt;p&gt;I updated the documentation accordingly.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10900" name="DDC166-2.patch" size="4630" author="beberlei" created="Mon, 27 Dec 2010 17:59:31 +0000" />
                    <attachment id="10899" name="DDC166.patch" size="3445" author="beberlei" created="Mon, 27 Dec 2010 16:53:29 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>