<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sat May 25 15:20:42 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=labels+%3D+schematool&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=labels+%3D+schematool</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="19" total="19"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DMIG-40] DBAL Enum fields migration issue / PostgreSQL</title>
                <link>http://www.doctrine-project.org/jira/browse/DMIG-40</link>
                <project id="10041" key="DMIG">Doctrine Migrations</project>
                        <description>&lt;p&gt;When using Custom Doctrine DBAL Enums the migration created using diff&lt;/p&gt;

&lt;p&gt;works fine the first time.&lt;/p&gt;

&lt;p&gt;However the next time it generates a SQL statement trying to change to field type to INT from integer;  (Redundant)&lt;br/&gt;
and a truncated statement:&lt;/p&gt;

&lt;p&gt;&quot;ALTER schemaname.fieldname SET&quot; .. And that&apos;s it.&lt;/p&gt;
</description>
                <environment>PostgreSQL and migrations</environment>
            <key id="14805">DMIG-40</key>
            <summary>DBAL Enum fields migration issue / 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>
                                <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="josdewitte">jos de witte</reporter>
                        <labels>
                        <label>postgresql</label>
                        <label>schematool</label>
                    </labels>
                <created>Wed, 24 Apr 2013 10:53:03 +0000</created>
                <updated>Wed, 24 Apr 2013 11:36:09 +0000</updated>
                    <resolved>Wed, 24 Apr 2013 11:36:09 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20099" author="ocramius" created="Wed, 24 Apr 2013 11:36:09 +0000"  >&lt;p&gt;This is a DBAL issue. Please verify the issue using the DBAL schema tools (latest master) only and eventually open a DBAL issue.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DMIG-39] Issue when using serjal columns in PostgreSQL with Doctrine ORM Identity fields</title>
                <link>http://www.doctrine-project.org/jira/browse/DMIG-39</link>
                <project id="10041" key="DMIG">Doctrine Migrations</project>
                        <description>&lt;p&gt;When using Doctrine ORM mapping fields like this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; integer
     *
     * @ORM\Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy=&lt;span class=&quot;code-quote&quot;&gt;&quot;IDENTITY&quot;&lt;/span&gt;)
     * @ORM\SequenceGenerator(sequenceName=&lt;span class=&quot;code-quote&quot;&gt;&quot;schemaname.tablename_id_seq&quot;&lt;/span&gt;, allocationSize=1, initialValue=1)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $id;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It first creates the migration perfectly as a serial column with the correct schema.&lt;/p&gt;

&lt;p&gt;However when making a new migration diff it generates DROP statements for every sequence for these id, so we have to remove them manually every time.&lt;/p&gt;
</description>
                <environment>PostgreSQL and migrations</environment>
            <key id="14804">DMIG-39</key>
            <summary>Issue when using serjal columns in PostgreSQL with Doctrine ORM Identity fields</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                                <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="josdewitte">jos de witte</reporter>
                        <labels>
                        <label>postgresql</label>
                        <label>schematool</label>
                    </labels>
                <created>Wed, 24 Apr 2013 10:50:40 +0000</created>
                <updated>Wed, 24 Apr 2013 11:30:57 +0000</updated>
                    <resolved>Wed, 24 Apr 2013 11:30:57 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20098" author="ocramius" created="Wed, 24 Apr 2013 11:30:57 +0000"  >&lt;p&gt;This is a DBAL problem. &lt;/p&gt;

&lt;p&gt;Please verify this with the DBAL diff tools (latest master) only and eventually report a DBAL issue without involving migrations.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DMIG-37] PostgreSQL generated SQL statements in migrations that use doublequotes create syntax errors in PHP</title>
                <link>http://www.doctrine-project.org/jira/browse/DMIG-37</link>
                <project id="10041" key="DMIG">Doctrine Migrations</project>
                        <description>&lt;p&gt;When using some reserved field names in PostgreSQL DBAL, the generated SQL statements will quote those field names. (Make a table with fieldname &quot;left&quot; for example)&lt;/p&gt;

&lt;p&gt;When the migrationversion is generated, the doublequote is not escaped:&lt;/p&gt;

&lt;p&gt;addSQL(&quot;ALTER table x add column &quot;left&quot; integer&quot;);&lt;/p&gt;

&lt;p&gt;This does not compile of course, should be&lt;/p&gt;

&lt;p&gt;addSQL(&quot;ALTER table x add column \&quot;left\&quot; integer&quot;);&lt;/p&gt;

&lt;p&gt;Regards!&lt;/p&gt;</description>
                <environment>PostgreSQL backend, using migration versions with field or schemanames that use reserved names.</environment>
            <key id="14741">DMIG-37</key>
            <summary>PostgreSQL generated SQL statements in migrations that use doublequotes create syntax errors in PHP</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="josdewitte">jos de witte</reporter>
                        <labels>
                        <label>PostgreSQL</label>
                        <label>schematool</label>
                    </labels>
                <created>Thu, 28 Mar 2013 22:16:36 +0000</created>
                <updated>Thu, 28 Mar 2013 22:16:36 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2469] SQLite handling for ENUM-Fields</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2469</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;SQLite doesn&apos;t support ENUMS!&lt;/p&gt;

&lt;p&gt;But when I try create the schema of the following Entity Doctrine generates this &quot;CREATE TABLE&quot; - Statement:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
CREATE TABLE Entity ([...] NOT NULL, taxation ENUM(&apos;incl&apos;, &apos;excl&apos;), maxNumbe[...]
&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;
class Entity {
...

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     *
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, columnDefinition=&lt;span class=&quot;code-quote&quot;&gt;&quot;ENUM(&apos;incl&apos;, &apos;excl&apos;)&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $taxation = self::TAXATION_INCL;

...
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;hr /&gt;
&lt;p&gt;Produces this error:&lt;/p&gt;

&lt;p&gt;&lt;font color=&quot;red&quot;&gt;&lt;b&gt;SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;HY000&amp;#93;&lt;/span&gt;: General error: 1 near &quot;&apos;incl&apos;&quot;: syntax error&apos;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14986">DDC-2469</key>
            <summary>SQLite handling for ENUM-Fields</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="rosslau@my-hammer.de">Andy Rosslau</reporter>
                        <labels>
                        <label>query</label>
                        <label>schematool</label>
                        <label>sqlite</label>
                    </labels>
                <created>Fri, 24 May 2013 06:45:46 +0000</created>
                <updated>Fri, 24 May 2013 07:35:54 +0000</updated>
                    <resolved>Fri, 24 May 2013 07:35:54 +0000</resolved>
                            <version>Git Master</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20431" author="ocramius" created="Fri, 24 May 2013 07:35:45 +0000"  >&lt;p&gt;Usage of &lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;columnDefinition&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt; in annotations or generally metadata mappings is all about vendor specific syntax. `columnDefinition` is designed to allow overriding the default ORM column generated DDL to build vendor specific syntax/types, therefore the issue is invalid&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2464] useless index for the middle table of many-to-many relationship</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2464</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have entity A and B, the relationship between A and B is many-to-many. which means Doctrine2 will generate a middle table called AB for me.&lt;/p&gt;

&lt;p&gt;entity A:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
class Station {
    /**
     * @ORM\ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Fun&quot;&lt;/span&gt;, mappedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;stations&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $funs;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;entity B:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
class Fun {
    /**
     * @ORM\ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Station&quot;&lt;/span&gt;, inversedBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;funs&quot;&lt;/span&gt;)
     * @ORM\JoinTable(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;stations_have_funs&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $stations;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;the schema of middle table stations_have_funs:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
CREATE TABLE `stations_have_funs` (
  `fun_id` &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(11) NOT NULL,
  `station_id` &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(11) NOT NULL,
  PRIMARY KEY (`fun_id`,`station_id`),
  KEY `IDX_45C921911CA4BE49` (`fun_id`),
  KEY `IDX_45C9219121BDB235` (`station_id`),
  CONSTRAINT `FK_45C921911CA4BE49` FOREIGN KEY (`fun_id`) REFERENCES `funs` (`id`) ON DELETE CASCADE,
  CONSTRAINT `FK_45C9219121BDB235` FOREIGN KEY (`station_id`) REFERENCES `stations` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;I noticed that there are 2 useless index(fun_id and station_id). Since fun_id and station_id are the primary key of this table. Do we really need 2 extra/duplicated index ?&lt;/p&gt;</description>
                <environment></environment>
            <key id="14975">DDC-2464</key>
            <summary>useless index for the middle table of many-to-many relationship</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="scourgen">scourgen</reporter>
                        <labels>
                        <label>ddl</label>
                        <label>schematool</label>
                    </labels>
                <created>Tue, 21 May 2013 09:34:54 +0000</created>
                <updated>Tue, 21 May 2013 09:44:10 +0000</updated>
                                    <version>Git Master</version>
                                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2425] Parent entity sometimes fails to load when validating/updating schema.</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2425</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Should not have reported, was a stupid mistake on my part.&lt;/p&gt;</description>
                <environment>Debian 6.0.6 x64</environment>
            <key id="14826">DDC-2425</key>
            <summary>Parent entity sometimes fails to load when validating/updating schema.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/trivial.png">Trivial</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="selosindis">Scott Gibson</reporter>
                        <labels>
                        <label>Cli</label>
                        <label>orm</label>
                        <label>schematool</label>
                    </labels>
                <created>Fri, 3 May 2013 19:41:55 +0000</created>
                <updated>Fri, 3 May 2013 20:17:09 +0000</updated>
                    <resolved>Fri, 3 May 2013 20:17:09 +0000</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2421] Many-To-Many relation creation failed when using non PK entity field</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2421</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Given these entities :&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * &lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt; Domain
 *
 * @ORM\Entity
 * @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;profils_domains&quot;&lt;/span&gt;)
 */
class Domain
{
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     *
     * @ORM\Id
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, length=22, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name = &apos;&apos;;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * &lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt; Web
 *
 * @ORM\Entity
 * @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;profils_webs&quot;&lt;/span&gt;,
 *          uniqueConstraints={@ORM\UniqueConstraint(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;web_unique&quot;&lt;/span&gt;,columns={&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;})}
 * )
 */
class Web
{
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; integer
     *
     * @ORM\Id
     * @ORM\GeneratedValue
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     *
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, length=22, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name = &apos;&apos;;

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Domain
     *
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Domain&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;LAZY&quot;&lt;/span&gt;)
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $domain;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * &lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt; WebsGroup
 *
 * @ORM\Entity
 * @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;profils_websgroups&quot;&lt;/span&gt;,
 *          uniqueConstraints={@ORM\UniqueConstraint(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;websgroup_unique&quot;&lt;/span&gt;,columns={&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;})}
 * )
 */
class WebsGroup
{
    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; integer
     *
     * @ORM\Id
     * @ORM\GeneratedValue
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; string
     *
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;string&quot;&lt;/span&gt;, length=22, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $name = &apos;&apos;;

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; Domain
     *
     * @ORM\ManyToOne(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Domain&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;LAZY&quot;&lt;/span&gt;)
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;name&quot;&lt;/span&gt;, nullable=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $domain;

    /**
     * @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; ArrayCollection
     *
     * @ORM\ManyToMany(targetEntity=&lt;span class=&quot;code-quote&quot;&gt;&quot;Web&quot;&lt;/span&gt;, indexBy=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;, fetch=&lt;span class=&quot;code-quote&quot;&gt;&quot;EXTRA_LAZY&quot;&lt;/span&gt;)
     * @ORM\JoinTable(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;profils_websgroups_webs&quot;&lt;/span&gt;,
     *      joinColumns={
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;websgroup_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;),
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;)
     *          },
     *      inverseJoinColumns={
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;web_id&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;),
     * @ORM\JoinColumn(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, referencedColumnName=&lt;span class=&quot;code-quote&quot;&gt;&quot;domain&quot;&lt;/span&gt;, onDelete=&lt;span class=&quot;code-quote&quot;&gt;&quot;CASCADE&quot;&lt;/span&gt;)
     *          }
     *      )
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $webs;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I&apos;ve got a domain, some web sites per domain and websgroups which group web sites. I want to be sure in my database that a web group from a domain D can contain only web sites from the very same domain but when calling the console tool for creating my schema it raise :&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
[Doctrine\ORM\ORMException]                                                                                                                                      
  Column name `domain` referenced &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; relation from Entity\WebsGroup towards Entity\Web does not exist. 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It&apos;s because domain is already an association to an entity which and is not part of the primary key.&lt;/p&gt;

&lt;p&gt;I&apos;ve quick fixed &lt;tt&gt;getDefiningClass&lt;/tt&gt; from &lt;tt&gt;Doctrine\ORM\Tools\SchemaTool&lt;/tt&gt; to make it work but i really don&apos;t know if it&apos;s the proper way :&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; function getDefiningClass($class, $referencedColumnName)
    {
        $referencedFieldName = $class-&amp;gt;getFieldName($referencedColumnName);

        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($class-&amp;gt;hasField($referencedFieldName)) {
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; array($class, $referencedFieldName);
        } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (in_array($referencedColumnName, $class-&amp;gt;getIdentifierColumnNames())) {
            &lt;span class=&quot;code-comment&quot;&gt;// it seems to be an entity as foreign key
&lt;/span&gt;            foreach ($class-&amp;gt;getIdentifierFieldNames() as $fieldName) {
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($class-&amp;gt;hasAssociation($fieldName) &amp;amp;&amp;amp; $class-&amp;gt;getSingleAssociationJoinColumnName($fieldName) == $referencedColumnName) {
                    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getDefiningClass(
                        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;getClassMetadata($class-&amp;gt;associationMappings[$fieldName][&apos;targetEntity&apos;]),
                        $class-&amp;gt;getSingleAssociationReferencedJoinColumnName($fieldName)
                    );
                }
            }
        } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (in_array($referencedColumnName, $class-&amp;gt;getAssociationNames())) {
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getDefiningClass(
                $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;getClassMetadata($class-&amp;gt;associationMappings[$referencedColumnName][&apos;targetEntity&apos;]),
                $class-&amp;gt;getSingleAssociationReferencedJoinColumnName($referencedColumnName)
            );
        }

        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>Ubuntu linux 12.04, php 5.4.9</environment>
            <key id="14818">DDC-2421</key>
            <summary>Many-To-Many relation creation failed when using non PK entity field</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="jedi_bc">Bruno CHALOPIN</reporter>
                        <labels>
                        <label>schematool</label>
                    </labels>
                <created>Mon, 29 Apr 2013 08:51:36 +0000</created>
                <updated>Wed, 1 May 2013 09:03:08 +0000</updated>
                    <resolved>Wed, 1 May 2013 09:03:08 +0000</resolved>
                            <version>Git Master</version>
                <version>2.3.3</version>
                                                <component>Mapping Drivers</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20128" author="fabio.bat.silva" created="Mon, 29 Apr 2013 18:27:56 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=jedi_bc&quot; class=&quot;user-hover&quot; rel=&quot;jedi_bc&quot;&gt;Bruno CHALOPIN&lt;/a&gt; Except for some CS this fix seems good.&lt;/p&gt;

&lt;p&gt;If you have time you can send as &lt;a href=&quot;https://github.com/doctrine/doctrine2/pulls&quot; class=&quot;external-link&quot;&gt;pull request&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20129" author="jedi_bc" created="Tue, 30 Apr 2013 12:48:59 +0000"  >&lt;p&gt;I&apos;ve start making a PR and a test case but it is linked to &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2413&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DDC-2413&lt;/a&gt;&lt;br/&gt;
I&apos;m looking in making a proper fix to &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-2413&quot; title=&quot;orm:schema-tool:update want to drop&amp;amp;create PK on join table using composite keys&quot;&gt;&lt;del&gt;DDC-2413&lt;/del&gt;&lt;/a&gt; first.&lt;/p&gt;</comment>
                    <comment id="20140" author="beberlei" created="Wed, 1 May 2013 09:03:08 +0000"  >&lt;p&gt;You cannot use a reference column that is not a primary key. Doctrine does not support this.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2288] Schema Tool doesn&apos;t update collation on table level</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2288</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In Symfony2, when updating the collation option of a table, the schema tool doesn&apos;t recognize the change: &lt;/p&gt;

&lt;p&gt;Changing from:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
* @ORM\Table()
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;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; 
* @ORM\Table(options={&lt;span class=&quot;code-quote&quot;&gt;&quot;collate&quot;&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;utf8_swedish_ci&quot;&lt;/span&gt;})
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Results in:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
$ php app/console doctrine:schema:update --dump-sql
Nothing to update - your database is already in sync with the current entity metadata.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; </description>
                <environment></environment>
            <key id="14468">DDC-2288</key>
            <summary>Schema Tool doesn&apos;t update collation on table level</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="rickard">Rickard Andersson</reporter>
                        <labels>
                        <label>collation</label>
                        <label>schematool</label>
                    </labels>
                <created>Fri, 8 Feb 2013 09:50:30 +0000</created>
                <updated>Fri, 8 Feb 2013 09:50:30 +0000</updated>
                                                                    <component>Mapping Drivers</component>
                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2238] doctrine:schema:update partially broken</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2238</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;the app/console doctrine:schema:update command generates a seemingly random number of statements like these:&lt;/p&gt;

&lt;p&gt;ALTER TABLE geodata ALTER humidity SET ;&lt;br/&gt;
ALTER TABLE geodata ALTER lake SET ;&lt;br/&gt;
ALTER TABLE message ALTER translate SET ;&lt;/p&gt;


&lt;p&gt;which are obvious invalid SQL commands. The mappings are fine, validate and the application works just fine. Here&apos;s an example from the mapping files including two of the above statements:&lt;/p&gt;

&lt;p&gt;&amp;lt;field name=&quot;coast&quot; type=&quot;boolean&quot;/&amp;gt;&lt;br/&gt;
&amp;lt;field name=&quot;lake&quot; type=&quot;boolean&quot;/&amp;gt;&lt;br/&gt;
&amp;lt;field name=&quot;river&quot; type=&quot;boolean&quot;/&amp;gt;&lt;br/&gt;
&amp;lt;field name=&quot;humidity&quot; type=&quot;float&quot;/&amp;gt;&lt;br/&gt;
&amp;lt;field name=&quot;biome&quot; type=&quot;string&quot;/&amp;gt;&lt;/p&gt;


&lt;p&gt;I am using doctrine2-spatial as an extension for GIS information. This problem shows up both in entities using spatial data and entities not using spatial data.&lt;/p&gt;

&lt;p&gt;I&apos;ll gladly help debug this, as right now I can&apos;t update my dev database with --force, I need to use --dump-sql and filter out the invalid lines.&lt;/p&gt;
</description>
                <environment>OS X 10.7.5&lt;br/&gt;
PHP 5.4.4&lt;br/&gt;
Postgres SQL 9.1.6&lt;br/&gt;
&lt;br/&gt;
also confirmed on:&lt;br/&gt;
Linux (Debian testing, Kernel 2.6.32)&lt;br/&gt;
PHP 5.4.4&lt;br/&gt;
PostgreSQL 9.1.9&lt;br/&gt;
Doctrine 2.3.2</environment>
            <key id="14378">DDC-2238</key>
            <summary>doctrine:schema:update partially broken</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="tom">Tom Vogt</reporter>
                        <labels>
                        <label>postgresql</label>
                        <label>schematool</label>
                    </labels>
                <created>Fri, 11 Jan 2013 18:19:11 +0000</created>
                <updated>Wed, 1 May 2013 12:37:16 +0000</updated>
                    <resolved>Wed, 1 May 2013 12:37:05 +0000</resolved>
                            <version>2.3</version>
                                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19286" author="beberlei" created="Sat, 12 Jan 2013 09:05:50 +0000"  >&lt;p&gt;Can you dump the SchemaDiff/ColumnDiff instances that are returned from lib/Doctrine/DBAL/Schema/Comparator.php?&lt;/p&gt;</comment>
                    <comment id="19291" author="tom" created="Sat, 12 Jan 2013 10:57:26 +0000"  >&lt;p&gt;requested dump of SchemaDiff&lt;/p&gt;</comment>
                    <comment id="19292" author="tom" created="Sat, 12 Jan 2013 10:58:51 +0000"  >&lt;p&gt;added in the file schemadiff.txt - I added this in Schematool.php - getUpdateSchemaSql():&lt;/p&gt;

&lt;p&gt;        $comparator = new Comparator();&lt;br/&gt;
        $schemaDiff = $comparator-&amp;gt;compare($fromSchema, $toSchema);&lt;br/&gt;
        \Doctrine\Common\Util\Debug::dump($schemaDiff, 6);&lt;/p&gt;

&lt;p&gt;if you need other output, just tell me what entity to dump and where. I&apos;ll be happy to help.&lt;/p&gt;

&lt;p&gt;The file also contains the buggy update statements it creates towards the end. There&apos;s a few non-crucial bugs included, where it alters the geospatial columns to themselves (i.e. river.course already is a geometry/linestring). I don&apos;t worry about those because they don&apos;t break anything.&lt;/p&gt;</comment>
                    <comment id="20024" author="tom" created="Mon, 15 Apr 2013 19:26:18 +0000"  >&lt;p&gt;Is there any update on this? I&apos;m still having this issue, with many different entities, always the same problem, for example:&lt;/p&gt;

&lt;p&gt;ALTER TABLE event ALTER priority SET ;&lt;/p&gt;

&lt;p&gt;Which is an integer field on an entity that doesn&apos;t have any GIS elements, so I&apos;m not even sure if it&apos;s caused by that anymore.&lt;/p&gt;</comment>
                    <comment id="20147" author="beberlei" created="Wed, 1 May 2013 12:24:08 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=tom&quot; class=&quot;user-hover&quot; rel=&quot;tom&quot;&gt;Tom Vogt&lt;/a&gt; I added a fix for PostgreSQL today, can you verify again if this works? Its included in the 2.3 branch.&lt;/p&gt;</comment>
                    <comment id="20150" author="beberlei" created="Wed, 1 May 2013 12:37:05 +0000"  >&lt;p&gt;Duplicate of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DBAL-504&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DBAL-504&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                <outwardlinks description="duplicates">
                            <issuelink>
            <issuekey id="14806">DBAL-504</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                    <attachment id="11373" name="schemadiff.txt" size="79257" author="tom" created="Sat, 12 Jan 2013 10:57:26 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DDC-2135] Setting column defaults using options in the annotations causes redundant alter statements </title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2135</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When using the Column annotation on an entity and passing the options parameter to set a default value for a column, the doctrine cli will generate the alter statement every time the schema-tool is run. &lt;/p&gt;

&lt;p&gt;This doesn&apos;t break the functionality of updating the schema using the cli but when you have multiple entities using default values in this manner it becomes cumbersome to investigate issues during updates that fail and you need to dump the generated sql to examine. &lt;/p&gt;

&lt;p&gt;Use case: We have a number of entities that include &apos;boolean&apos; flags. The data for these entities is inserted into the database through an integration process handled by another application. For all of the flags we want to set a default value of 0 to avoid having to modify the integration scripts when a new flag is added to an entity and the data is not available yet. &lt;/p&gt;

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

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
/**
 * @ORM\Entity
 * @ORM\Table(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;example&quot;&lt;/span&gt;)
 */
class Example
{
    
    /**
     * @ORM\Id
     * @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;)
     */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $id;
    
    /** @ORM\Column(type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;, options={&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;&quot;&lt;/span&gt; = 0}) */
    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; $disabled;
    
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$ php bin/doctrine orm:schema-tool:update --dump-sql
ALTER TABLE example CHANGE disabled disabled TINYINT(1) DEFAULT &apos;0&apos; NOT NULL;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This alter statement is generated on every run of the schema-tool even though the schema has already been altered.  &lt;/p&gt;</description>
                <environment></environment>
            <key id="14210">DDC-2135</key>
            <summary>Setting column defaults using options in the annotations causes redundant alter statements </summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="ccomer">Cory Comer</reporter>
                        <labels>
                        <label>Cli</label>
                        <label>schematool</label>
                    </labels>
                <created>Fri, 9 Nov 2012 20:36:11 +0000</created>
                <updated>Wed, 1 May 2013 12:57:19 +0000</updated>
                    <resolved>Wed, 1 May 2013 12:57:19 +0000</resolved>
                            <version>2.2.2</version>
                                <fixVersion>2.3.4</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20156" author="beberlei" created="Wed, 1 May 2013 12:57:19 +0000"  >&lt;p&gt;This is fixed for 2.3.4&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

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

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

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

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

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

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

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

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

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

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

<item>
            <title>[DDC-2011] Schema tool fail to handle ManyToMany relation with an existing joinTable</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2011</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The schemaTool fail with a Doctrine\DBAL\Schema\SchemaException when trying to handle ManyToMany relation with an existing joinTable.&lt;/p&gt;

&lt;p&gt;My use case :&lt;/p&gt;

&lt;p&gt;I&apos;m using the Tree DoctrineExtension with the Closure strategy. It create a mapping between my Category entity and a CategoryClosure entity.&lt;/p&gt;

&lt;p&gt;For conveniency, I&apos;ve setup a ManyToMany relation between Category and Category with the CategoryClosure table as joinTable. &lt;/p&gt;

&lt;p&gt;Doctrine ORM handle perfectly this case but the schema tool is failing with :&lt;br/&gt;
The table with name &apos;category_closure&apos; already exists.&lt;/p&gt;

</description>
                <environment></environment>
            <key id="14010">DDC-2011</key>
            <summary>Schema tool fail to handle ManyToMany relation with an existing joinTable</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="2">Won&apos;t Fix</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="erichard">Erwan Richard</reporter>
                        <labels>
                        <label>schematool</label>
                    </labels>
                <created>Tue, 4 Sep 2012 07:44:43 +0000</created>
                <updated>Sat, 9 Feb 2013 22:15:31 +0000</updated>
                    <resolved>Sat, 9 Feb 2013 22:15:26 +0000</resolved>
                            <version>Git Master</version>
                                                <component>Tools</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="19506" author="asm89" created="Sat, 9 Feb 2013 22:15:31 +0000"  >&lt;p&gt;You can&apos;t expect the schematool to play nice if you use the table of an entity as m2m table.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-483] default values make orm:validate-schema fail</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-483</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;% ./bin/doctrine.php --env=development orm:schema-tool:update --dump-sql                                                                                                  
ALTER TABLE groups CHANGE active active TINYINT(1) DEFAULT &apos;1&apos; NOT NULL;
ALTER TABLE module ADD root_order INT DEFAULT 0 NOT NULL
% ./bin/doctrine.php --env=development orm:schema-tool:update --force
Updating database schema...
Database schema updated successfully! &quot;2&quot; queries were executed
% ./bin/doctrine.php --env=development orm:schema-tool:update --dump-sql                                                                                                  ALTER TABLE groups CHANGE active active TINYINT(1) DEFAULT &apos;1&apos; NOT NULL;
ALTER TABLE module CHANGE root_order root_order INT DEFAULT 0 NOT NULL
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;My entities define these columns like this:&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;Group&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    /**
     * @ORM\Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;active&quot;&lt;/span&gt;, 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;, options={&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;&quot;&lt;/span&gt;:&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;})
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $active = &lt;span class=&quot;code-keyword&quot;&gt;true&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;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;Module&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    /**
     * @ORM\Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;root_order&quot;&lt;/span&gt;, type=&lt;span class=&quot;code-quote&quot;&gt;&quot;integer&quot;&lt;/span&gt;, options={&lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;&quot;&lt;/span&gt;:0})
     */
    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $rootOrder = 0;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>MySQL, PHP 5.3, Doctrine 2.3</environment>
            <key id="14757">DBAL-483</key>
            <summary>default values make orm:validate-schema fail</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="till">Till</reporter>
                        <labels>
                        <label>schematool</label>
                    </labels>
                <created>Thu, 4 Apr 2013 10:52:22 +0000</created>
                <updated>Wed, 1 May 2013 08:45:46 +0000</updated>
                    <resolved>Wed, 1 May 2013 08:45:46 +0000</resolved>
                                            <fixVersion>2.3.4</fixVersion>
                                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20130" author="kaserf" created="Tue, 30 Apr 2013 17:09:39 +0000"  >&lt;p&gt;We are having the same issue. Is there any workaround for this?&lt;/p&gt;</comment>
                    <comment id="20131" author="kaserf" created="Tue, 30 Apr 2013 20:34:16 +0000"  >&lt;p&gt;I&apos;ve investigated a bit and noticed several things:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;looks like doctrine does not (officially?) support setting of default options in the annotation. It is recommended to use the instance default ($rootOrder = 0).&lt;/li&gt;
	&lt;li&gt;in the comparator class the Column-&amp;gt;getDefault() is compared, but I found out that in one table (I guess the one from mysql) the default is set directly, in the other one (I guess the doctrine one generated from the annotations) the default is empty but the customSchemaOptions&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;default&amp;quot;&amp;#93;&lt;/span&gt; is set.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;So based on this I would say:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;the $column-&amp;gt;getDefault needs to be checked against the other $column-&amp;gt;getCustomSchemaOption(&quot;default&quot;) and vice versa&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Please correct me if I&apos;m wrong&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-482] SQL Server Schema Manager returns incorrect value for autoincrement on IDENTITY columns</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-482</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;When calculating table diffs, SQLServerSchemaManager returns column definitions for identity columns with _autoincrement set to FALSE. &lt;/p&gt;

&lt;p&gt;This causes the schema update SQL generation to pump out a &lt;br/&gt;
ALTER TABLE x ALTER COLUMN id INT IDENTITY NOT NULL&lt;br/&gt;
for every single identity column in the schema.&lt;/p&gt;

&lt;p&gt;The culprit is in DBAL\Schema\SQLServerSchemaManager, starting at line 43:&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;        $dbType = strtolower($tableColumn[&apos;TYPE_NAME&apos;]);
        $dbType = strtok($dbType, &apos;(), &apos;);

        $autoincrement = false;
        if (stripos($dbType, &apos;identity&apos;)) {
            $dbType = trim(str_ireplace(&apos;identity&apos;, &apos;&apos;, $dbType));
            $autoincrement = true;
        }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When the column in question is an identity int column, the TYPE_NAME is &quot;int identity&quot;. The second line of the snippet drops the &quot;identity&quot; signifier, causing the following lines that determine autoincrement to do nothing.&lt;/p&gt;

&lt;p&gt;I simply moved the second line to below the autoincrement block ie:&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;        $dbType = strtolower($tableColumn[&apos;TYPE_NAME&apos;]);

        $autoincrement = false;
        if (stripos($dbType, &apos;identity&apos;)) {
            $dbType = trim(str_ireplace(&apos;identity&apos;, &apos;&apos;, $dbType));
            $autoincrement = true;
        }

        $dbType = strtok($dbType, &apos;(), &apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This change solves this issue for me, and as far as I can tell, has no other consequences.&lt;/p&gt;</description>
                <environment>SQL Server</environment>
            <key id="14753">DBAL-482</key>
            <summary>SQL Server Schema Manager returns incorrect value for autoincrement on IDENTITY columns</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="wschalle">William Schaller</reporter>
                        <labels>
                        <label>schematool</label>
                        <label>sqlserver</label>
                        <label>sqlsrv</label>
                    </labels>
                <created>Wed, 3 Apr 2013 15:25:55 +0000</created>
                <updated>Wed, 1 May 2013 13:09:45 +0000</updated>
                    <resolved>Wed, 1 May 2013 13:09:45 +0000</resolved>
                            <version>2.2</version>
                <version>2.3</version>
                <version>2.3.3</version>
                                <fixVersion>2.3.4</fixVersion>
                                <component>Schema Managers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="20158" author="beberlei" created="Wed, 1 May 2013 13:09:45 +0000"  >&lt;p&gt;Fixed for 2.3.4 and was fixed for 2.4 in a different way already.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-474] SchemaManager / Connection on PostgreSQL platform does not respect filterExpression for sequences</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-474</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;Dear Symfony team,&lt;/p&gt;

&lt;p&gt;the filterExpression on AbstractSchemaManager seems not to work for sequences.&lt;/p&gt;

&lt;p&gt;This only happens under postgres. &lt;/p&gt;

&lt;p&gt;It seems the way the sequences are handled are the culprit: It tries to get min_value etc of sequences without matching sequence names to the filter expression in advance. &lt;/p&gt;

&lt;p&gt;If for example access to the sequences is denied, (Different schema without permissions for the current entity manager), any higher-level ORM operations like generating migration versions fail.&lt;/p&gt;

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

&lt;p&gt;the context is when using migrations. Positive regexp expressions do not limit the migration to a single schema. eg ^schemaname.$&lt;br/&gt;
Instead, all sequences on the current database are returned.&lt;br/&gt;
When trying to limit a migration to a single schema consecutively this doesn&apos;t work.&lt;br/&gt;
We are using a per-schema connection, so this results in a lot of hassle for us.&lt;/p&gt;</description>
                <environment>Windows &amp;amp; Linux</environment>
            <key id="14734">DBAL-474</key>
            <summary>SchemaManager / Connection on PostgreSQL platform does not respect filterExpression for sequences</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="10000" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="josdewitte">jos de witte</reporter>
                        <labels>
                        <label>postgresql</label>
                        <label>schematool</label>
                    </labels>
                <created>Wed, 27 Mar 2013 20:39:57 +0000</created>
                <updated>Wed, 24 Apr 2013 20:05:59 +0000</updated>
                                    <version>2.2.2</version>
                                                <component>Schema Managers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="20000" author="beberlei" created="Sun, 14 Apr 2013 10:16:56 +0000"  >&lt;p&gt;Can you paste an exception trace? I see that filtering is applied to sequences, but your description seems to indicate this happens due to an SQL query much earlier?&lt;/p&gt;</comment>
                    <comment id="20097" author="josdewitte" created="Wed, 24 Apr 2013 10:43:00 +0000"  >&lt;p&gt;Dear Benjamin,&lt;/p&gt;

&lt;p&gt;the context is when using migrations. Positive regexp expressions do not limit the migration to a single schema. eg ^schemaname.$&lt;br/&gt;
Instead, all sequences on the current database are returned. &lt;br/&gt;
When trying to limit a migration to a single schema consecutively this doesn&apos;t work.&lt;br/&gt;
We are using a per-schema connection, so this results in a lot of hassle for us.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-420] Schema Drop SQL incorrect on PostgreSQL with entities with GeneratedValue(strategy=&quot;IDENTITY&quot;)</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-420</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;This problem is probably related to #&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DBAL-54&quot; title=&quot;Incorrect sequence dropping in PostgreSQL&quot;&gt;&lt;del&gt;DBAL-54&lt;/del&gt;&lt;/a&gt;. However that was closed by the raiser as he changed his Entity model and it went away.&lt;/p&gt;

&lt;p&gt;When schema drop is run the following error occurs:&lt;br/&gt;
Doctrine\DBAL\DBALException: An exception occurred while executing &apos;DROP SEQUENCE radacct_radacctid_seq&apos;:&lt;/p&gt;

&lt;p&gt;SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;2BP01&amp;#93;&lt;/span&gt;: Dependent objects still exist: 7 ERROR:  cannot drop sequence radacct_radacctid_seq because other objects depend on it&lt;br/&gt;
DETAIL:  default for table radacct column radacctid depends on sequence radacct_radacctid_seq&lt;br/&gt;
HINT:  Use DROP ... CASCADE to drop the dependent objects too.&lt;/p&gt;


&lt;p&gt;The source of this problem is the difference between strategy=&quot;IDENTITY&quot; and strategy=&quot;SEQUENCE&quot;&lt;/p&gt;

&lt;p&gt;With SEQUENCE doctrine creates the table schema with field type BIGINT and no specified. It then creates a seperate sequence and as far as I can tell takes care of getting and inserting the next id number itself.&lt;/p&gt;

&lt;p&gt;With IDENTITY doctrine creates the table schema with field type BIGSERIAL and no specified default. Now postgres automatically creates a sequence and creates the column with type BIGINT and sets the DEFAULT to the pgpsql statement required to get the nextval from the sequence.&lt;/p&gt;

&lt;p&gt;At this point the two differently configured tables will work successfully and identically, except SEQUENCE tables will only get a correct new ID when run through the doctrine code while IDENTITY tables will get the correct new ID whenever an insert is done to the table.&lt;/p&gt;

&lt;p&gt;Because in the case of an IDENTITY field postgresql creates the field with a default value refering to the sequence the sequence can not be deleted before the table reference is removed.&lt;/p&gt;

&lt;p&gt;For my case I need the IDENTITY fields to work as we have a RADIUS server that needs to insert into one table which is managed and mapped to an entity in Doctrine.&lt;/p&gt;

&lt;p&gt;Swapping the order of DROP TABLE and DROP SEQUENCE commands in Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php in getQueries() line 159. Does not work as a quick fix. The following error occurs as the sequence is quite correctly be dropped along with the table.&lt;/p&gt;

&lt;p&gt;Doctrine\DBAL\DBALException: An exception occurred while executing &apos;DROP SEQUENCE radacct_radacctid_seq&apos;:&lt;/p&gt;

&lt;p&gt;SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;42P01&amp;#93;&lt;/span&gt;: Undefined table: 7 ERROR:  sequence &quot;radacct_radacctid_seq&quot; does not exist&lt;/p&gt;
</description>
                <environment>Symfony 2.1, PHP5.4, PostgreSQL 9.1 on Ubuntu 12.04</environment>
            <key id="14403">DBAL-420</key>
            <summary>Schema Drop SQL incorrect on PostgreSQL with entities with GeneratedValue(strategy=&quot;IDENTITY&quot;)</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="adamashley">Adam Ashley</reporter>
                        <labels>
                        <label>postgresql</label>
                        <label>schematool</label>
                    </labels>
                <created>Wed, 23 Jan 2013 09:22:22 +0000</created>
                <updated>Sun, 14 Apr 2013 12:37:30 +0000</updated>
                    <resolved>Sun, 14 Apr 2013 12:37:30 +0000</resolved>
                            <version>2.3.2</version>
                                <fixVersion>2.3.4</fixVersion>
                                <component>Schema Managers</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="19395" author="adamashley" created="Thu, 24 Jan 2013 00:00:41 +0000"  >&lt;p&gt;This issue also appears to affect Doctrine_Migrations. Generated migrations try to drop and recreate automatically generated sequences associated with SERIAL fields making a mess of the database.&lt;/p&gt;</comment>
                    <comment id="19882" author="beberlei" created="Fri, 22 Mar 2013 10:05:35 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-289&amp;#93;&lt;/span&gt; was opened&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/dbal/pull/289&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/289&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19985" author="powerkiki" created="Fri, 12 Apr 2013 06:20:15 +0000"  >&lt;p&gt;@Adam Ashley, could you test whether &lt;a href=&quot;https://github.com/doctrine/dbal/pull/289&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/289&lt;/a&gt; solve your issue ?&lt;/p&gt;</comment>
                    <comment id="20008" author="doctrinebot" created="Sun, 14 Apr 2013 12:36:08 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-289&amp;#93;&lt;/span&gt; was closed:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/dbal/pull/289&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/289&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-411] Schema updater breaks when using backticks in tablenames.</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-411</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;When using backticks around table-names (for example &quot;`Order`&quot;), the Doctrine schema update tool wants to recreate all foreign keys on every run.&lt;/p&gt;

&lt;p&gt;This error was introduced in commit cb3ec49cb4401bd1c8be6ba9671f651802586eaf&lt;/p&gt;</description>
                <environment>Debian Linux 6.0, PHP 5.3.3, MySQL 5.1.63</environment>
            <key id="14359">DBAL-411</key>
            <summary>Schema updater breaks when using backticks in tablenames.</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="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="endaco">Endaco</reporter>
                        <labels>
                        <label>schematool</label>
                    </labels>
                <created>Tue, 8 Jan 2013 11:24:46 +0000</created>
                <updated>Tue, 8 Jan 2013 11:24:46 +0000</updated>
                                    <version>2.3.2</version>
                                                <component>Schema Managers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-367] Reverse engnering do not work with Oracle DB</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-367</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$ doctrine orm:convert-mapping --filter=&lt;span class=&quot;code-quote&quot;&gt;&quot;ms$ions&quot;&lt;/span&gt; xml .

  [Doctrine\DBAL\DBALException]
  Unknown database type binary_float requested, Doctrine\DBAL\Platforms\OraclePlatform may not support it.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;cli-config.php:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;

use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\Common\Annotations\AnnotationRegistry;

require_once &apos;Doctrine/Common/&lt;span class=&quot;code-object&quot;&gt;ClassLoader&lt;/span&gt;.php&apos;;

define(&apos;APPLICATION_ENV&apos;, &lt;span class=&quot;code-quote&quot;&gt;&quot;development&quot;&lt;/span&gt;);
error_reporting(E_ALL);

$classLoader = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\Common\&lt;span class=&quot;code-object&quot;&gt;ClassLoader&lt;/span&gt;(&apos;Doctrine&apos;);
$classLoader-&amp;gt;register();

$config = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\ORM\Configuration();
$config-&amp;gt;setProxyDir(__DIR__);
$config-&amp;gt;setProxyNamespace(&apos;Proxies&apos;);

$config-&amp;gt;setAutoGenerateProxyClasses((APPLICATION_ENV == &lt;span class=&quot;code-quote&quot;&gt;&quot;development&quot;&lt;/span&gt;));

AnnotationRegistry::registerFile(&lt;span class=&quot;code-quote&quot;&gt;&quot;Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php&quot;&lt;/span&gt;);
$reader = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; AnnotationReader();
$driverImpl = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\ORM\Mapping\Driver\AnnotationDriver($reader, array(__DIR__ . &lt;span class=&quot;code-quote&quot;&gt;&quot;/../php/ru/niifhm/bioinformatics/biodb/model&quot;&lt;/span&gt;));
$config-&amp;gt;setMetadataDriverImpl($driverImpl);

&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (APPLICATION_ENV == &lt;span class=&quot;code-quote&quot;&gt;&quot;development&quot;&lt;/span&gt;) {
    $cache = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\Common\Cache\ArrayCache();
} &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
    $cache = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\Common\Cache\ApcCache();
}

$config-&amp;gt;setMetadataCacheImpl($cache);
$config-&amp;gt;setQueryCacheImpl($cache);

$connectionOptions = array(
    &apos;driver&apos;   =&amp;gt; &apos;oci8&apos;,
    &apos;host&apos;     =&amp;gt; &apos;host.name&apos;,
    &apos;dbname&apos;   =&amp;gt; &apos;db.name&apos;,
    &apos;user&apos;     =&amp;gt; &apos;user.name&apos;,
    &apos;password&apos; =&amp;gt; &apos;user.password&apos;
);

$em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config);
$platform = $em-&amp;gt;getConnection()-&amp;gt;getDatabasePlatform();
$platform-&amp;gt;registerDoctrineTypeMapping(&apos;&lt;span class=&quot;code-keyword&quot;&gt;enum&lt;/span&gt;&apos;, &apos;string&apos;);

$em-&amp;gt;getConfiguration()-&amp;gt;setMetadataDriverImpl(
    &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\ORM\Mapping\Driver\DatabaseDriver(
        $em-&amp;gt;getConnection()-&amp;gt;getSchemaManager()
    )
);

$helperSet = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Symfony\Component\Console\Helper\HelperSet(array(
    &apos;db&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em-&amp;gt;getConnection()),
    &apos;em&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)
));
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>PHP 5.3.3-1ubuntu9.10 with Suhosin-Patch (cli) (built: Feb 11 2012 06:21:15)&lt;br/&gt;
oci8-1.4.7 as PHP extension builded from pecl repository with instantclient-basic-linux.x64-11.2.0.3.0.zip and instantclient-sdk-linux.x64-11.2.0.3.0.zip&lt;br/&gt;
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production</environment>
            <key id="14141">DBAL-367</key>
            <summary>Reverse engnering do not work with Oracle DB</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="zeleniy">Zelenin Alexandr</reporter>
                        <labels>
                        <label>Cli</label>
                        <label>oracle</label>
                        <label>schematool</label>
                    </labels>
                <created>Thu, 18 Oct 2012 13:43:14 +0000</created>
                <updated>Wed, 23 Jan 2013 21:55:55 +0000</updated>
                                    <version>2.3</version>
                                                <component>Drivers</component>
                <component>Schema Managers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19377" author="ocramius" created="Wed, 23 Jan 2013 21:55:55 +0000"  >&lt;p&gt;Formatting&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-346] Generated schema fails on MySQL (BLOB/TEXT cant have DEFAULT value)</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-346</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;In my symfony 2.1 project i was including &lt;a href=&quot;https://github.com/schmittjoh/JMSPaymentCoreBundle&quot; class=&quot;external-link&quot;&gt;JMSPaymentCoreBundle&lt;/a&gt; and did the vanilla installation.&lt;/p&gt;

&lt;p&gt;After that i ran&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
php app/console doctrine:schema:update --dump-sql
php app/console doctrine:schema:update --force
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;A lot of schema updates were done. I ran it again, and two schema updates were still showing up.&lt;br/&gt;
Running the command again, and they still show up.&lt;/p&gt;

&lt;p&gt;I then tried to run the two schema updates against my database and MySQL complains with the following error:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
Error: 1101 - BLOB/TEXT column &apos;extended_data&apos; can&apos;t have a &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt; value
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;According to the &lt;a href=&quot;https://dev.mysql.com/doc/refman/5.5/en/blob.html&quot; class=&quot;external-link&quot;&gt;Documentation&lt;/a&gt; BLOB/TEXT indeed cannot have default values. I am not sure why Doctrine thinks it has to set this default value.&lt;/p&gt;

&lt;p&gt;The statements look like this:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
sascha@debian:/&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt;/www/myproject/Symfony$ php app/console doctrine:schema:update --dump-sql
ALTER TABLE payment_instructions CHANGE extended_data extended_data LONGTEXT NOT NULL COMMENT &apos;(DC2Type:extended_payment_data)&apos;;
ALTER TABLE financial_transactions CHANGE extended_data extended_data LONGTEXT DEFAULT NULL COMMENT &apos;(DC2Type:extended_payment_data)&apos;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I already reported this problem in the JMSPaymentCoreBundle &lt;a href=&quot;https://github.com/schmittjoh/JMSPaymentCoreBundle/issues/57&quot; class=&quot;external-link&quot;&gt;Issue&lt;/a&gt; Queue where  i then was referred to over here.&lt;/p&gt;

&lt;p&gt;Also, i am not sure if Doctrine DBAL is the best match for this issue, so if it is wrong please move it to the right project issue queue.&lt;/p&gt;

&lt;p&gt;Thank you very much and best of Regards!&lt;br/&gt;
Sascha&lt;/p&gt;</description>
                <environment>Symfony 2.1.x (dev/master), Doctrine 2.2.3, MySQL 5.5.x</environment>
            <key id="14046">DBAL-346</key>
            <summary>Generated schema fails on MySQL (BLOB/TEXT cant have DEFAULT value)</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="thenetexperts">Sascha Ahmann</reporter>
                        <labels>
                        <label>Cli</label>
                        <label>schematool</label>
                    </labels>
                <created>Wed, 19 Sep 2012 10:10:10 +0000</created>
                <updated>Thu, 20 Sep 2012 17:29:30 +0000</updated>
                    <resolved>Thu, 20 Sep 2012 17:29:30 +0000</resolved>
                            <version>2.2.2</version>
                                <fixVersion>2.3</fixVersion>
                                <component>Schema Managers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>