<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Tue May 21 03:19: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/si/jira.issueviews:issue-xml/DDC-1137/DDC-1137.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Doctrine Project</title>
    <link>http://www.doctrine-project.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.7</version>
        <build-number>850</build-number>
        <build-date>21-02-2013</build-date>
    </build-info>

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

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

&lt;p&gt;Inserting&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;die( print_r( $fromSchema, 1 ) . print_r( $toSchema, 1 ) . print_r( $schemaDiff, 1 ) );&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;into Doctrine/ORM/Tools/SchemaTool.php line 632 shows $fromSchema outputs&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;[_tables:protected] =&amp;gt; Array
        (
            [test]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;but $toSchema outputs&lt;/p&gt;

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

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

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

&lt;p&gt;In summary, Doctrine/DBAL/Schema/Comparator considers foo.test a new table, because Doctrine/DBAL/Schema/AbstractSchemaManager lists its table as &quot;test&quot; rather than &quot;foo.test&quot;. &lt;/p&gt;
</description>
                <environment>Linux 2.6.18-194.32.1.el5.centos.plus x86_64 GNU/Linux&lt;br/&gt;
</environment>
            <key id="12614">DDC-1137</key>
            <summary>SchemaTool#getUpdateSchemaSql() does not respect database identifier in table names</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="hlomas">Hugh Lomas</reporter>
                        <labels>
                    </labels>
                <created>Thu, 5 May 2011 17:23:11 +0000</created>
                <updated>Sat, 14 May 2011 10:10:20 +0000</updated>
                                    <version>2.0.4</version>
                                                <component>ORM</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15808" author="hlomas" created="Thu, 5 May 2011 18:37:09 +0000"  >&lt;p&gt;It seems that changing AbstractSchemaManager.php to the following corrected the issue for me, however I am not sure of any repercussions that may arise as a result, being unfamiliar with the codebase.&lt;/p&gt;

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

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