<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu May 23 03:06:39 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+DC+AND+resolution+%3D+Unresolved+AND+assignee+%3D+romanb+ORDER+BY+priority+DESC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://www.doctrine-project.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Doctrine Project</title>
        <link>http://www.doctrine-project.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+DC+AND+resolution+%3D+Unresolved+AND+assignee+%3D+romanb+ORDER+BY+priority+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="26" total="26"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DC-963] Doctrine cache - Salt dissociation</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-963</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Doctrine Cache store data into a persistence storage.&lt;/p&gt;

&lt;p&gt;Regarding APC, Doctrine use a share storage.&lt;br/&gt;
Doctrine is able to cache SQL from DQL, and DOM from SQL.&lt;br/&gt;
To do this, Doctrine create a DQL hash, and store the SQL result refer to the hash. &lt;/p&gt;

&lt;p&gt;I&apos;m using a server to host two Doctrine project, a preproduction &amp;amp; production Website. In some case, DQL is the same on both project, but the data model definition isn&apos;t.&lt;/p&gt;

&lt;p&gt;Preproduction convert DQL to SQL using data model definition, and store the SQL result into APC cache refer to the DQL hash.&lt;br/&gt;
Production create a DQL hash, this is the same hash as preproduction.. So production instance use the SQL refer to the preproduction.. &lt;/p&gt;

&lt;p&gt;I&apos;m not sure about the quality of this explanation... But I can add some information is needed.&lt;/p&gt;


&lt;p&gt;The solution of this problem is easy. Just add a SALT to any cache id&apos;s. It&apos;s a Doctrine_Cache problem, not only a Doctrine_Cache_APC problem..&lt;br/&gt;
For Query cache it&apos;s not really important because this cache is optional, but for result cache.. It&apos;s more critical.&lt;br/&gt;
The SALT can be define when instantiate the Doctrine_Cache object, it&apos;s just an option..&lt;/p&gt;


&lt;p&gt;$cacheDriver = new doctrine_Cache_Apc ();&lt;br/&gt;
$cacheDriver-&amp;gt;setOption (&quot;salt&quot;, &quot;domain.tld&quot;);&lt;/p&gt;</description>
                <environment></environment>
            <key id="12351">DC-963</key>
            <summary>Doctrine cache - Salt dissociation</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="armetiz">Thomas Tourlourat - Armetiz</reporter>
                        <labels>
                    </labels>
                <created>Thu, 3 Feb 2011 05:05:19 +0000</created>
                <updated>Mon, 18 Apr 2011 10:13:28 +0000</updated>
                                                                    <component>Caching</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="15219" author="armetiz" created="Thu, 3 Feb 2011 05:12:45 +0000"  >&lt;p&gt;to complete this bug, I think it&apos;s also a problem on DC 2..&lt;/p&gt;</comment>
                    <comment id="15737" author="jaikdean" created="Mon, 18 Apr 2011 10:13:28 +0000"  >&lt;p&gt;There is already an (undocumented?) option &quot;prefix&quot; that allows this.&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;$cacheDriver = new Doctrine_Cache_Apc(array(&apos;prefix&apos; =&amp;gt; &apos;MY UNIQUE SALT&apos;));&lt;/tt&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-924] type mismatch for keyfield in column aggregation</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-924</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;This is the doc exemple on column aggregation inheritance :&lt;/p&gt;

&lt;p&gt;Entity:&lt;br/&gt;
  columns:&lt;br/&gt;
    username: string(20)&lt;br/&gt;
    password: string(16)&lt;br/&gt;
    created_at: timestamp&lt;br/&gt;
    updated_at: timestamp&lt;/p&gt;

&lt;p&gt;User:&lt;br/&gt;
  inheritance:&lt;br/&gt;
    extends: Entity&lt;br/&gt;
    type: column_aggregation&lt;br/&gt;
    keyField: type&lt;br/&gt;
    keyValue: 1&lt;/p&gt;

&lt;p&gt;Group:&lt;br/&gt;
  inheritance:&lt;br/&gt;
    extends: Entity&lt;br/&gt;
    type: column_aggregation&lt;br/&gt;
    keyField: type&lt;br/&gt;
    keyValue: 2&lt;/p&gt;

&lt;p&gt;But the keyField (type) is created as VARCHAR(255) so PostgreSQL return an error on applying inheritance condition :&lt;/p&gt;

&lt;p&gt;SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;42883&amp;#93;&lt;/span&gt;: Undefined function: 7 ERROR:  operator does not exist: character varying = integer         &lt;br/&gt;
  LINE 1: ...D s.application = &apos;frontend&apos; AND s.lft = 1) AND (s.type = 2)                                     &lt;br/&gt;
                                                                     ^                                        &lt;br/&gt;
  HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.&lt;/p&gt;

&lt;p&gt;I found this with symfony sfFilebasePlugin on sfFilebase:create-root task.&lt;/p&gt;</description>
                <environment>PostgreSQL</environment>
            <key id="12095">DC-924</key>
            <summary>type mismatch for keyfield in column aggregation</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="romanb">Roman S. Borschel</assignee>
                                <reporter username="nono">Arnaud Morvan</reporter>
                        <labels>
                    </labels>
                <created>Thu, 11 Nov 2010 12:02:12 +0000</created>
                <updated>Thu, 11 Nov 2010 12:02:12 +0000</updated>
                                    <version>1.2.3</version>
                                <fixVersion>1.2.3</fixVersion>
                                <component>Inheritance</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-925] missing hasOne() method-call in many-to-many relation</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-925</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Here&apos;s my YAML-file for the model: &lt;a href=&quot;http://pastie.org/1290649&quot; class=&quot;external-link&quot;&gt;http://pastie.org/1290649&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&apos;m using the following command to build the whole model: symfony doctrine:build --all --and-load&lt;br/&gt;
By this command symfony will create the model using Doctrine.&lt;/p&gt;

&lt;p&gt;Please have a closer look at the class BaseTicketHasHardware: &lt;a href=&quot;http://pastie.org/1290737&quot; class=&quot;external-link&quot;&gt;http://pastie.org/1290737&lt;/a&gt;&lt;br/&gt;
If I compare it to the class BaseTicketHasNote I expect a class like this: &lt;a href=&quot;http://pastie.org/1290765&quot; class=&quot;external-link&quot;&gt;http://pastie.org/1290765&lt;/a&gt;&lt;br/&gt;
But Doctrine has created this class: &lt;a href=&quot;http://pastie.org/1290766&quot; class=&quot;external-link&quot;&gt;http://pastie.org/1290766&lt;/a&gt;&lt;/p&gt;</description>
                <environment>Debian Lenny&lt;br/&gt;
Apache 2.0&lt;br/&gt;
PHP 5.3.3-0.dotdeb.1&lt;br/&gt;
Symfony 1.4.8 - using Doctrine 1.2.x</environment>
            <key id="12097">DC-925</key>
            <summary>missing hasOne() method-call in many-to-many relation</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="romanb">Roman S. Borschel</assignee>
                                <reporter username="simonsimcity">Simon Schick</reporter>
                        <labels>
                    </labels>
                <created>Thu, 11 Nov 2010 16:49:56 +0000</created>
                <updated>Thu, 11 Nov 2010 16:49:56 +0000</updated>
                                                                    <component>Relations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-902] Xcache Cache Driver is not documented</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-902</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Xcache Cache Driver is not documented at all. Is it working? Is it stable? Can we use it?&lt;/p&gt;</description>
                <environment>All</environment>
            <key id="12035">DC-902</key>
            <summary>Xcache Cache Driver is not documented</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="romanb">Roman S. Borschel</assignee>
                                <reporter username="leszczu">Piotr Leszczy&#324;ski</reporter>
                        <labels>
                    </labels>
                <created>Tue, 26 Oct 2010 14:38:59 +0000</created>
                <updated>Tue, 26 Oct 2010 14:38:59 +0000</updated>
                                    <version>1.2.0-ALPHA1</version>
                <version>1.2.0-ALPHA2</version>
                <version>1.2.0-ALPHA3</version>
                <version>1.2.0-BETA1</version>
                <version>1.2.0-BETA2</version>
                <version>1.2.0-BETA3</version>
                <version>1.2.0-RC1</version>
                <version>1.2.0</version>
                <version>1.2.1</version>
                <version>1.2.2</version>
                <version>1.2.3</version>
                <version>1.2.4</version>
                                                <component>Caching</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-870] NestedSet not moving children of child nodes correctly</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-870</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;The best way I can explain the issue is with code. Please see the below:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;&amp;lt;?php

$root = new Test();
$root-&amp;gt;name = &apos;1&apos;;
$root-&amp;gt;save();

// Create root node
$tree = Doctrine::getTable(&apos;Test&apos;)-&amp;gt;getTree();
$tree-&amp;gt;createRoot($root);

// Create child node
$child1 = new Test();
$child1-&amp;gt;name = &apos;2&apos;;
$child1-&amp;gt;save();

// Add child
$child1-&amp;gt;getNode()-&amp;gt;moveAsLastChildOf($root);

// Create child node
$child2 = new Test();
$child2-&amp;gt;name = &apos;3&apos;;
$child2-&amp;gt;save();

// Add child2 as node of child1
$child2-&amp;gt;getNode()-&amp;gt;moveAsLastChildOf($child1);

// Create child node
$child3 = new Test();
$child3-&amp;gt;name = &apos;4&apos;;
$child3-&amp;gt;save();

// Add child3 as node of child2
$child3-&amp;gt;getNode()-&amp;gt;moveAsLastChildOf($child2);

// Add another root just to be nice
$root2 = new Test();
$root2-&amp;gt;name = &apos;5&apos;;
$root2-&amp;gt;save();

// Create root node
$tree-&amp;gt;createRoot($root2);

/**
 * Now we have the following tree (Each &apos;-&apos; indicates 1 level):
 * 1
 * - 2
 * - - 3
 * - - - 4
 * 5
 */

/**
 * Lets say I want to move node &apos;3&apos; to be a root.
 * With this I assume that all of the current nodes
 * children will be moved with it:
 */
$tree-&amp;gt;createRoot(child2);

/**
 * Now the (implied) tree should look like this:
 * 1
 * - 2
 * 3
 * - 4
 * 5
 * 
 * Instead, the tree actually looks like this:
 * 1
 * - 2
 * - - - 4
 * 3
 * 5
 */

/**
 * I will now demostrate incorrect moving back of child nodes.
 */
$child2-&amp;gt;getNode()-&amp;gt;moveAsLastChildOf($child1);
/**
 * Now the tree should go back to looking like this:
 * 1
 * - 2
 * - - 3
 * - - - 4
 * 5
 * 
 * But the tree now looks like this:
 * 1
 * - 2
 * - - - 4
 * - - 3
 * 5
 */
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>Ubuntu 10.04 x64&lt;br/&gt;
PHP 5.3.2</environment>
            <key id="11933">DC-870</key>
            <summary>NestedSet not moving children of child nodes correctly</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="romanb">Roman S. Borschel</assignee>
                                <reporter username="theashman">Ashley Broadley</reporter>
                        <labels>
                    </labels>
                <created>Mon, 20 Sep 2010 11:25:54 +0000</created>
                <updated>Mon, 20 Sep 2010 11:53:27 +0000</updated>
                                    <version>1.2.3</version>
                                                <component>Nested Set</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14420" author="theashman" created="Mon, 20 Sep 2010 11:28:02 +0000"  >&lt;p&gt;Fixing code spacing&lt;/p&gt;</comment>
                    <comment id="14421" author="theashman" created="Mon, 20 Sep 2010 11:49:04 +0000"  >&lt;p&gt;I have also noticed that moving a root node back into its original position as a child also corrupts the tree. I have added an example to the original post&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-1015] bindComponent not called before inherited classes base definitions</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-1015</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;If I define a base model:&lt;/p&gt;

&lt;p&gt;Entity:&lt;br/&gt;
  connection:  other&lt;br/&gt;
  columns:&lt;br/&gt;
    name: {}&lt;br/&gt;
    size:    {}&lt;/p&gt;

&lt;p&gt;and inherited model:&lt;/p&gt;

&lt;p&gt;Box:&lt;br/&gt;
  inheritance:&lt;br/&gt;
    extends: Entity&lt;br/&gt;
    type: column_aggregation&lt;/p&gt;


&lt;p&gt;Then file with base definition of Box does not contain bindComponent sentence to bind Box model with connection specified for Entity model.&lt;/p&gt;</description>
                <environment>symfony 1.4</environment>
            <key id="12786">DC-1015</key>
            <summary>bindComponent not called before inherited classes base definitions</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="romanb">Roman S. Borschel</assignee>
                                <reporter username="ardi">Adrian Nowicki</reporter>
                        <labels>
                    </labels>
                <created>Mon, 4 Jul 2011 21:21:12 +0000</created>
                <updated>Mon, 4 Jul 2011 21:21:12 +0000</updated>
                                                                    <component>Inheritance</component>
                <component>Schema Files</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-999] Query cache key can be incorrectly generated</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-999</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;1. We have two versions of the application on the same server. &lt;br/&gt;
2. Second application has an updated database. New field is added to one of the models. &lt;br/&gt;
3. When the second app is hit first, query is stored in APC.&lt;br/&gt;
4. First app finds cached query and tries to call it. Exception is thrown as it doesn&apos;t know anything about the new field yet.&lt;/p&gt;

&lt;p&gt;Situation often happens on shared development machine when one developer adds a field but others don&apos;t have in their models yet. It also happens on staging server if it&apos;s shared with production.&lt;/p&gt;

&lt;p&gt;I suspect it only affects &lt;b&gt;queries without explicitly listed fields&lt;/b&gt;. &lt;/p&gt;

&lt;p&gt;To quickly fix the issue in my symfony project I extended Doctrine_Cache_Apc to implement namespaces (&lt;a href=&quot;https://gist.github.com/944524&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/944524&lt;/a&gt;). More appropriate place to fix it would be Doctrine_Query_Abstract::calculateQueryCacheHash().&lt;/p&gt;</description>
                <environment></environment>
            <key id="12587">DC-999</key>
            <summary>Query cache key can be incorrectly generated</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="romanb">Roman S. Borschel</assignee>
                                <reporter username="kuba">Jakub Zalas</reporter>
                        <labels>
                    </labels>
                <created>Thu, 28 Apr 2011 04:50:07 +0000</created>
                <updated>Mon, 27 Jun 2011 18:20:20 +0000</updated>
                                    <version>1.2.4</version>
                                                <component>Caching</component>
                <component>Query</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16084" author="grass" created="Mon, 27 Jun 2011 18:20:20 +0000"  >&lt;p&gt;Could this be a duplicate of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-389&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DC-389&lt;/a&gt; ?&lt;br/&gt;
Are you querying a model with a *-to-many relation and applying a limit?&lt;/p&gt;

&lt;p&gt;See also &lt;a href=&quot;http://www.doctrine-project.org/documentation/manual/1_2/en/dql-doctrine-query-language:limit-and-offset-clauses:the-limit-subquery-algorithm&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/documentation/manual/1_2/en/dql-doctrine-query-language:limit-and-offset-clauses:the-limit-subquery-algorithm&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-971] Tree result sets hydrators are checking for column level not field level</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-971</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Tree hierarchy hydrators (Doctrine_Collection::toHierarchy and Doctrine_Array_Hierarchy_Driver::hydrateResultSet) are checking wheter the column `level` exists.&lt;/p&gt;

&lt;p&gt;The level column can be aliased, and for oracle, it is required to do so. Therefor it is better to check, whether the aliased field level exists.&lt;/p&gt;

&lt;p&gt;Patch included in pull request&lt;/p&gt;</description>
                <environment></environment>
            <key id="12392">DC-971</key>
            <summary>Tree result sets hydrators are checking for column level not field level</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="romanb">Roman S. Borschel</assignee>
                                <reporter username="adrive">Miloslav &quot;adrive&quot; Kmet</reporter>
                        <labels>
                    </labels>
                <created>Wed, 16 Feb 2011 06:37:11 +0000</created>
                <updated>Wed, 16 Feb 2011 06:37:11 +0000</updated>
                                    <version>1.2.3</version>
                                                <component>Nested Set</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-946] Oracle Doctrine_RawSql()-&gt;count() generates illegal SQL</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-946</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Example RawSQL:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$q = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Doctrine_RawSql();
    $q-&amp;gt;select(&apos;{k.*}&apos;)
          -&amp;gt;from(&apos;SHP_MANDANT_KATEGORIE k&apos;)
          -&amp;gt;addComponent(&apos;k&apos;, &apos;ShpMandantKategorie k&apos;)
          -&amp;gt;where( &apos;k.id_mandant=&apos; . $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getIdMandant() )
          -&amp;gt;andWhere( &apos;k.id_parent=&apos; . $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getIdMandantkategorie() )
          -&amp;gt;andWhere( &apos;k.aktiv=1&apos; )
          -&amp;gt;orderBy( &apos;k.sortorder&apos; ); 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;$q-&amp;gt;count() generates:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-sql&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; COUNT(*) as num_results 
&lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; (&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; DISTINCT k.id_mandantkategorie 
              &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; SHP_MANDANT_KATEGORIE k 
              &lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; k.id_mandant=2 AND k.id_parent=1520 AND k.aktiv=1) as results
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The illegal Part ist the &quot;as results&quot; at the end...&lt;/p&gt;</description>
                <environment></environment>
            <key id="12204">DC-946</key>
            <summary>Oracle Doctrine_RawSql()-&gt;count() generates illegal SQL</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="lars_pohlmann">Lars Pohlmann</reporter>
                        <labels>
                        <label>oracle</label>
                    </labels>
                <created>Wed, 8 Dec 2010 04:45:02 +0000</created>
                <updated>Mon, 6 Aug 2012 08:11:10 +0000</updated>
                                    <version>1.2.3</version>
                                                <component>Native SQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18428" author="lars_pohlmann" created="Mon, 6 Aug 2012 08:10:30 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;will this ever be corrected?&lt;br/&gt;
I just came across the same bug in another project...&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-1057] Inserts instead of updates for related objects</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-1057</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Ok, so the object relations go like this:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Comparison
	&lt;ul&gt;
		&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1:N&amp;#93;&lt;/span&gt; Product (FK:comparison_id)
		&lt;ul&gt;
			&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1:N&amp;#93;&lt;/span&gt; Rules (FK:product_id, FK:option_id)&lt;/li&gt;
			&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1:N&amp;#93;&lt;/span&gt; Parameters (FK:product_id)
			&lt;ul&gt;
				&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1:N&amp;#93;&lt;/span&gt; Options (FK:parameter_id)&lt;/li&gt;
			&lt;/ul&gt;
			&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The testing code looks like following:&lt;/p&gt;

&lt;p&gt;== CODE START ==&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unable to find source-code formatter for language: php.&lt;/span&gt; Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml&lt;/div&gt;&lt;pre&gt;
$comp = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Application_Model_Comparison();

/* Filling $comp with data */

&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ($i = 0; $i &amp;lt; 10; $i++) {

    $product = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Application_Model_Product();

    &lt;span class=&quot;code-comment&quot;&gt;// Options referenced in Rules
&lt;/span&gt;    $options = array();

    &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ($j = 0; $j &amp;lt; 10; $j++) {

        $param = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Application_Model_Parameter();

        &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ($k = 0; $k &amp;lt; 10; $k++) {

            $option = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Application_Model_Option();

            $param-&amp;gt;Options-&amp;gt;add($option);

            &lt;span class=&quot;code-comment&quot;&gt;// Register a single option &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; parameter
&lt;/span&gt;            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!isset($options[$j])) {
                $options[$j] = $option;
            }
        }

        $product-&amp;gt;Parameters-&amp;gt;add($param);
    }

    &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ($j = 0; $j &amp;lt; 10; $j++) {
        $rule = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Application_Model_Rule();

        $rule-&amp;gt;Option = $options[$j];
        $product-&amp;gt;Rules-&amp;gt;add($rule);
    }

    $comp-&amp;gt;Products-&amp;gt;add($product);
}

/**
 * The first save() goes nicely, all objects
 * are created (INSERTed)
 */ 

$comp-&amp;gt;save();

&lt;span class=&quot;code-comment&quot;&gt;// Remove every second product
&lt;/span&gt;$pCount = $comp-&amp;gt;Products-&amp;gt;count();

&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ($i = 0; $i &amp;lt; $pCount; $i += 2) {
    $comp-&amp;gt;Products-&amp;gt;remove($i);
}

/**
 * Fails &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; trying to save
 *
 * Comparison-&amp;gt;Product-&amp;gt;Parameter-&amp;gt;Option
 * INSERT ... `parameter_id` cannot be NULL
 *
 * Comparison-&amp;gt;Product-&amp;gt;Rule
 * INSERT ... `product_id` cannot be NULL
 */

$comp-&amp;gt;save();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;== CODE END ==&lt;/p&gt;

&lt;p&gt;The first save() cleans up the relation information in the graph. All child objects are INSERTED instead of UPDATE.&lt;/p&gt;</description>
                <environment>linux, apache2, php 5.3</environment>
            <key id="13870">DC-1057</key>
            <summary>Inserts instead of updates for related objects</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="romanb">Roman S. Borschel</assignee>
                                <reporter username="grisha">Grzegorz Godlewski</reporter>
                        <labels>
                    </labels>
                <created>Fri, 20 Jul 2012 09:36:53 +0000</created>
                <updated>Fri, 20 Jul 2012 09:41:36 +0000</updated>
                                    <version>1.2.4</version>
                                                <component>Relations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-829] Hydrator/RecordDriver/setLastElement And APC useResultCache</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-829</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;1) I have a Query with APC useResultCache  with leftJoin between User and Avatar. (With no avatar for this User).&lt;br/&gt;
2) I have au Query without APC useResultCache  with leftJoin between Gallery, User and Avatar (Same user than 1))&lt;/p&gt;

&lt;p&gt;On the first show of my page =&amp;gt; OK&lt;br/&gt;
On second show of my page (With APC Cache) error when i call user-&amp;gt;getGalleries() :&lt;/p&gt;

&lt;p&gt;In Hydrator/RecordDriver.php setLastElement()&lt;/p&gt;

&lt;p&gt;$coll is instanceOf Doctrine_Null and count($coll) return 1, so =&amp;gt; Crash because -&amp;gt;getLast doesn&apos;t exist in Doctrine_Null class&lt;/p&gt;

&lt;p&gt;If you add in setLastElement() (Before if (count($coll) &amp;gt; 0) ....&lt;/p&gt;

&lt;p&gt;if ($coll instanceOf Doctrine_Null) &lt;/p&gt;
{
        	return;
        }

&lt;p&gt;It&apos;s works.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11779">DC-829</key>
            <summary>Hydrator/RecordDriver/setLastElement And APC useResultCache</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="romanb">Roman S. Borschel</assignee>
                                <reporter username="zaor">PIERRONT Julien</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 Aug 2010 17:02:25 +0000</created>
                <updated>Mon, 16 Aug 2010 17:02:25 +0000</updated>
                                    <version>1.2.0</version>
                                                <component>Caching</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-812] Postgresql and query cache</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-812</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;After enabling:&lt;/p&gt;

&lt;p&gt;$manager-&amp;gt;setAttribute(Doctrine_Core::ATTR_QUERY_CACHE, $cacheDriver);&lt;br/&gt;
(both Memcache and APC)&lt;/p&gt;

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

&lt;p&gt;Doctrine_Connection_Pgsql_Exception: SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;08P01&amp;#93;&lt;/span&gt;: &amp;lt;&amp;gt;: 7 ERROR: bind message supplies 8 parameters, but prepared statement &quot;pdo_stmt_00000008&quot; requires 16 in /home/taat/www/library/Doctrine/1.2.2/lib/Doctrine/Connection.php on line 1082&lt;/p&gt;

&lt;p&gt;Without the cache everything works OK.&lt;br/&gt;
RESULT_CACHE works OK too.&lt;/p&gt;

&lt;p&gt;Maybe this may help somehow:&lt;br/&gt;
&lt;a href=&quot;http://bugs.php.net/33886&quot; class=&quot;external-link&quot;&gt;http://bugs.php.net/33886&lt;/a&gt;&lt;/p&gt;
</description>
                <environment>Postgresql 8.4, Ubuntu 10.04, PHP 5.3, latest APC and Memcache, Memcached</environment>
            <key id="11735">DC-812</key>
            <summary>Postgresql and query cache</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="romanb">Roman S. Borschel</assignee>
                                <reporter username="admirau">admirau</reporter>
                        <labels>
                    </labels>
                <created>Fri, 6 Aug 2010 17:13:54 +0000</created>
                <updated>Fri, 6 Aug 2010 17:14:47 +0000</updated>
                                    <version>1.2.2</version>
                                                <component>Caching</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-807] Equal nest relation uses incorrect SQL and returns incorrect data</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-807</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;The equal nest relation works incorrectly twice. The SQL it produces is wrong. And even if correct the SQL it still returns wrong data.&lt;br/&gt;
In my example below $profile-&amp;gt;getFriends() returns incorrect data and even tries to write these wrong data when I do $profile-&amp;gt;setEmail(&quot;...&quot;); $profile-&amp;gt;save()&lt;br/&gt;
I&apos;m certain that SQL query in Nest.php is wrong, but not only SQL. Even after fixing SQL the data is still incorrect. I digged through the code and suspect that the problem is in Doctrine_Collection which seems to works with only one referenceField, while in an &quot;equal relationship&quot; this field varies row to row.&lt;/p&gt;

&lt;p&gt;Here goes steps to reproduce.&lt;/p&gt;

&lt;p&gt;Schema.yml&lt;br/&gt;
==========&lt;/p&gt;

&lt;p&gt;Profile:&lt;br/&gt;
  columns:&lt;br/&gt;
    id:&lt;br/&gt;
      type: integer&lt;br/&gt;
      primary: true&lt;br/&gt;
      autoincrement: true&lt;br/&gt;
    email:&lt;br/&gt;
      type: varchar(255)&lt;br/&gt;
      notnull: true&lt;br/&gt;
  relations:&lt;br/&gt;
    Friends: &lt;/p&gt;
{ class: Profile, refClass: UserFriend, local: requestor_user_id, foreign: receiver_user_id, equal: true }


&lt;p&gt;Fixtures:&lt;br/&gt;
======&lt;/p&gt;

&lt;p&gt;Profile:&lt;br/&gt;
  -&lt;br/&gt;
    id: 1&lt;br/&gt;
    email: one@example.org&lt;br/&gt;
  -&lt;br/&gt;
    id: 2&lt;br/&gt;
    email: two@example.org&lt;br/&gt;
  -&lt;br/&gt;
    id: 3&lt;br/&gt;
    email: three@example.org&lt;br/&gt;
  -&lt;br/&gt;
    id: 4&lt;br/&gt;
    email: four@example.org&lt;/p&gt;

&lt;p&gt;UserFriend:&lt;br/&gt;
  -&lt;br/&gt;
    requestor_user_id: 1&lt;br/&gt;
    receiver_user_id:  2&lt;br/&gt;
  -&lt;br/&gt;
    requestor_user_id: 4&lt;br/&gt;
    receiver_user_id:  1&lt;br/&gt;
  -&lt;br/&gt;
    requestor_user_id: 2&lt;br/&gt;
    receiver_user_id:  3&lt;/p&gt;


&lt;p&gt;PHP test&lt;br/&gt;
=======&lt;br/&gt;
$user = Doctrine_Core::getTable(&apos;Profile&apos;)-&amp;gt;find(1);&lt;br/&gt;
var_dump($user-&amp;gt;getFriends()-&amp;gt;toArray());&lt;/p&gt;


&lt;p&gt;Output&lt;br/&gt;
======&lt;br/&gt;
array(2) {&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;=&amp;gt;&lt;br/&gt;
  array(3) {&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;id&amp;quot;&amp;#93;&lt;/span&gt;=&amp;gt;&lt;br/&gt;
    string(1) &quot;2&quot;&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;email&amp;quot;&amp;#93;&lt;/span&gt;=&amp;gt;&lt;br/&gt;
    string(15) &quot;two@example.org&quot;&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;UserFriend&amp;quot;&amp;#93;&lt;/span&gt;=&amp;gt;&lt;br/&gt;
    array(2) {&lt;br/&gt;
      &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;=&amp;gt;&lt;br/&gt;
      array(3) &lt;/p&gt;
{
        [&quot;requestor_user_id&quot;]=&amp;gt;
        string(1) &quot;1&quot;
        [&quot;receiver_user_id&quot;]=&amp;gt;
        string(1) &quot;2&quot;
        [&quot;Receiver&quot;]=&amp;gt;
        bool(false)
      }
&lt;p&gt;      &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;=&amp;gt;&lt;br/&gt;
      array(3) &lt;/p&gt;
{
        [&quot;requestor_user_id&quot;]=&amp;gt;
        string(1) &quot;2&quot;
        [&quot;receiver_user_id&quot;]=&amp;gt;
        string(1) &quot;2&quot;
        [&quot;Receiver&quot;]=&amp;gt;
        bool(false)
      }
&lt;p&gt;    }&lt;br/&gt;
  }&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;=&amp;gt;&lt;br/&gt;
  array(3) {&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;id&amp;quot;&amp;#93;&lt;/span&gt;=&amp;gt;&lt;br/&gt;
    string(1) &quot;4&quot;&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;email&amp;quot;&amp;#93;&lt;/span&gt;=&amp;gt;&lt;br/&gt;
    string(16) &quot;four@example.org&quot;&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;UserFriend&amp;quot;&amp;#93;&lt;/span&gt;=&amp;gt;&lt;br/&gt;
    array(1) {&lt;br/&gt;
      &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;=&amp;gt;&lt;br/&gt;
      array(3) &lt;/p&gt;
{
        [&quot;requestor_user_id&quot;]=&amp;gt;
        string(1) &quot;4&quot;
        [&quot;receiver_user_id&quot;]=&amp;gt;
        string(1) &quot;4&quot;
        [&quot;Receiver&quot;]=&amp;gt;
        bool(false)
      }
&lt;p&gt;    }&lt;br/&gt;
  }&lt;br/&gt;
}&lt;/p&gt;


&lt;p&gt;As it can be seen from output, the relation &quot;UserFriend&quot; shows insane data:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;sometime there are two records in &quot;UserFriend&quot; - and that&apos;s wrong&lt;/li&gt;
	&lt;li&gt;user 4 has friendship with 4 - that&apos;s also wrong, not in the fixtures.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment>Debian</environment>
            <key id="11710">DC-807</key>
            <summary>Equal nest relation uses incorrect SQL and returns incorrect data</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="romanb">Roman S. Borschel</assignee>
                                <reporter username="denis.chmel">Denis Chmel</reporter>
                        <labels>
                    </labels>
                <created>Tue, 3 Aug 2010 10:40:59 +0000</created>
                <updated>Tue, 3 Aug 2010 10:42:24 +0000</updated>
                                    <version>1.2.2</version>
                                                <component>Nested Set</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="13769" author="denis.chmel" created="Tue, 3 Aug 2010 10:42:24 +0000"  >&lt;p&gt;If this will be useful. here&apos;s the SQL it produces:&lt;/p&gt;

&lt;p&gt;SELECT&lt;br/&gt;
  profile.id      AS profile__id,&lt;br/&gt;
  profile.email   AS profile__email,&lt;br/&gt;
  user_friend.requestor_user_id AS user_friend__requestor_user_id,&lt;br/&gt;
  user_friend.receiver_user_id  AS user_friend__receiver_user_id&lt;br/&gt;
FROM profile&lt;br/&gt;
INNER JOIN user_friend ON profile.id = user_friend.receiver_user_id OR profile.id = user_friend.requestor_user_id&lt;br/&gt;
WHERE&lt;br/&gt;
profile.id IN(SELECT  receiver_user_id FROM user_friend WHERE requestor_user_id = 1)&lt;br/&gt;
OR profile.id IN (SELECT requestor_user_id FROM user_friend WHERE receiver_user_id = 1)&lt;br/&gt;
ORDER BY profile.id ASC&lt;/p&gt;

&lt;p&gt;It&apos;s very clear that an OR in the inner join and another OR in where are not connected, while they must be. Here&apos;s the correct part (in my opinion)&lt;/p&gt;

&lt;p&gt;...&lt;br/&gt;
WHERE&lt;br/&gt;
profile.id IN(SELECT  receiver_user_id FROM user_friend WHERE requestor_user_id = 1) AND user_friend.receiver_user_id=1&lt;br/&gt;
OR profile.id IN (SELECT requestor_user_id FROM user_friend WHERE receiver_user_id = 1) AND user_friend.receiver_user_id=1&lt;br/&gt;
...&lt;/p&gt;

&lt;p&gt;But this only fixes the problem with 2 records in &quot;UserFriends&quot;, but not the second (&quot;user 4 has friendship with 4 - that&apos;s also wrong, not in the fixtures.&quot;).&lt;br/&gt;
That another issue is somewhere inside Collection and how it works with the referenceField.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-905] Fields with foreign key shouldn&apos;t require definition</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-905</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Sample schema attached.&lt;/p&gt;

&lt;p&gt;Now, keeping attached schema in mind. &lt;/p&gt;

&lt;p&gt;We have core tables that lots of other tables refer via foreign keys to them, like user, company, etc. &lt;/p&gt;

&lt;p&gt;We need to explicitly define foreign keys (like user_id) &quot;definitely same as&quot; User.id on each table. By design, this seems unnecessary, and has load on refactoring processes, ie. type change on User.id. &lt;/p&gt;

&lt;p&gt;Doctrine is already parsing foreign relations from schema, It can use parent table field definition (User.id) in refering table fields (user_id) and on the schema user_id can be defined as:&lt;/p&gt;

&lt;p&gt;user_id: ~&lt;/p&gt;</description>
                <environment></environment>
            <key id="12041">DC-905</key>
            <summary>Fields with foreign key shouldn&apos;t require definition</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="romanb">Roman S. Borschel</assignee>
                                <reporter username="lashae">Alaattin Kahramanlar</reporter>
                        <labels>
                    </labels>
                <created>Fri, 29 Oct 2010 07:51:21 +0000</created>
                <updated>Sun, 31 Oct 2010 03:31:51 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="10832" name="schema.yml" size="1383" author="lashae" created="Fri, 29 Oct 2010 07:53:41 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-891] [PATCH] Relation array as the result of Doctrine_Table::bind()</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-891</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;It would be handy to return a relation array as the result of Doctrine_Table::bind(), because the relation parser&apos;s bind() already returns this value.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12012">DC-891</key>
            <summary>[PATCH] Relation array as the result of Doctrine_Table::bind()</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="romanb">Roman S. Borschel</assignee>
                                <reporter username="rybakit">Eugene Leonovich</reporter>
                        <labels>
                    </labels>
                <created>Mon, 18 Oct 2010 05:12:51 +0000</created>
                <updated>Mon, 18 Oct 2010 05:13:29 +0000</updated>
                                                                    <component>Relations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                    <attachment id="10827" name="bind.patch" size="1161" author="rybakit" created="Mon, 18 Oct 2010 05:12:51 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-890] public function detach break the nested set tree [patch attached]</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-890</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;If I detach a node from the tree using &lt;tt&gt;$node-&amp;gt;detach();&lt;/tt&gt; it set the left and right value to zero without shifting, creating a possible tree corruption.&lt;br/&gt;
It still work somehow because inserting a new node will shift the value but keep the hole in the tree.&lt;/p&gt;

&lt;p&gt;I&apos;ve looked to the original commit in Trac (&lt;a href=&quot;http://trac.doctrine-project.org/changeset/4089&quot; class=&quot;external-link&quot;&gt;http://trac.doctrine-project.org/changeset/4089&lt;/a&gt;) and I don&apos;t think the original idea of the commit was to leave a hole.&lt;br/&gt;
I&apos;ve added 3 lines of code (that I copied from the delete function which works properly), the coresponding patch is joigned to the bug ticket&lt;/p&gt;</description>
                <environment>not environment dependant</environment>
            <key id="12008">DC-890</key>
            <summary>public function detach break the nested set tree [patch attached]</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>
                                <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="alex-pex">Alexandre PAIXAO</reporter>
                        <labels>
                    </labels>
                <created>Thu, 14 Oct 2010 12:12:36 +0000</created>
                <updated>Thu, 14 Oct 2010 12:20:06 +0000</updated>
                                                                    <component>Nested Set</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14567" author="alex-pex" created="Thu, 14 Oct 2010 12:18:31 +0000"  >&lt;p&gt;ex:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;root                1       4&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;- node A       2       3&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;after detach :&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;root                1       4&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;- node A         0       0&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;then a new one :&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;root                1       6&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;- node B        4       5&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;- node A         0       0&lt;/tt&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10826" name="NestedSet.patch" size="490" author="alex-pex" created="Thu, 14 Oct 2010 12:12:36 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-1001] Doctrine Caching page does not mention the &quot;prefix&quot; option</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-1001</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/documentation/manual/1_1/en/caching&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/documentation/manual/1_1/en/caching&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When not using a prefix with multiple / yet similay projects a mixup of query caching will occur (for example with sfDoctrineGuard queries). This is very easialy fixed with a prefix - but I only realized after two months - that this feature actually existed. There is no mention of this in the documention.&lt;/p&gt;

&lt;p&gt;A mention of the feature &lt;/p&gt;

&lt;p&gt;$q = Doctrine_Query::create()&lt;br/&gt;
    -&amp;gt;useResultCache(new Doctrine_Cache_Apc(array(&apos;prefix&apos;=&amp;gt;&apos;myproject_&apos;)));&lt;/p&gt;

&lt;p&gt;Would have helped me and I think it will also help others.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12595">DC-1001</key>
            <summary>Doctrine Caching page does not mention the &quot;prefix&quot; option</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="arendvw">Arend van Waart</reporter>
                        <labels>
                    </labels>
                <created>Fri, 29 Apr 2011 19:26:40 +0000</created>
                <updated>Mon, 27 Jun 2011 18:14:37 +0000</updated>
                                    <version>1.2.4</version>
                                                <component>Caching</component>
                <component>Documentation</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16083" author="grass" created="Mon, 27 Jun 2011 18:14:37 +0000"  >&lt;p&gt;I concur with Arend - mentioning of &apos;prefix&apos; in the documentation could make this valuable feature much less of a pain to find...&lt;br/&gt;
Still holds true in 1.2. documentation: &lt;a href=&quot;http://www.doctrine-project.org/projects/orm/1.2/docs/manual/caching/en&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/projects/orm/1.2/docs/manual/caching/en&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-945] Doctrine_Query::create()-&gt;where(&apos;table.field =&apos;) unexpectedly returns a result</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-945</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;While firing the following query with Doctrine, I did not expect Doctrine to return me a record, however, even though there is a syntax error (in my opinion) it gave me the first record of the table.&lt;/p&gt;

&lt;p&gt;$q = \Doctrine_Query::create()&lt;br/&gt;
-&amp;gt;from(&apos;User u&apos;)&lt;br/&gt;
-&amp;gt;where(&apos;u.Id =&apos;, $userId);&lt;/p&gt;

&lt;p&gt;$r = $q-&amp;gt;fetchOne();&lt;/p&gt;

&lt;p&gt;Note that the question mark in the where method is ommitted. This will return a User model with an Id of 1.&lt;/p&gt;

&lt;p&gt;I would expect this to generate an invalid SQL statement (or even fail to pass the DQL validation). &lt;/p&gt;

&lt;p&gt;Giving the first record doesn&apos;t seem to be appropriate in my opinion.&lt;/p&gt;</description>
                <environment>PHP 5.3.0</environment>
            <key id="12198">DC-945</key>
            <summary>Doctrine_Query::create()-&gt;where(&apos;table.field =&apos;) unexpectedly returns a result</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>
                                <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="johnhuijbers">John Huijbers</reporter>
                        <labels>
                    </labels>
                <created>Mon, 6 Dec 2010 09:06:07 +0000</created>
                <updated>Tue, 7 Dec 2010 03:16:02 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-993] Many-to-many Relation defined one way </title>
                <link>http://www.doctrine-project.org/jira/browse/DC-993</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;When a many-tomany relation has been defined on only one of the end of the relation, and ofcourse in the cross-refClass, things get weird. I&apos;ll use the &lt;b&gt;user-groups&lt;/b&gt; relation (as found in the documentation) as example.&lt;/p&gt;

&lt;p&gt;If in the &lt;b&gt;group&lt;/b&gt; model has not defined the &lt;tt&gt;hasMany&lt;/tt&gt;, then a &lt;b&gt;user&lt;/b&gt; can be instantiated and saved. When instantiated, the relation &lt;em&gt;groups&lt;/em&gt; would return an empty array, groups can ben added like:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$u = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; User();
var_dump($u-&amp;gt;groups);
$u-&amp;gt;groups[] = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Group();
var_dump($u-&amp;gt;groups);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;This would output an empty array, and subsequently an array containing the new group.&lt;/p&gt;

&lt;p&gt;However, if a &lt;b&gt;user&lt;/b&gt; would be retrieved from the database, and the relation &lt;em&gt;groups&lt;/em&gt; would be called, then the following message will appear (which is not helpfull at alllll, I&apos;ve spend hours figuring it out!):&lt;/p&gt;

&lt;p&gt;Uncaught exception &apos;Doctrine_Record_UnknownPropertyException&apos; with message &apos;Unknown record property / related component &quot;groups&quot;&apos; .....&lt;/p&gt;

&lt;p&gt;I will never forget this, but it&apos;s not described in the documentation and the error is not helping either. So either one of these step hvae to be taken. Or even better, making it work without requiring the &lt;tt&gt;hasMany&lt;/tt&gt; in &lt;b&gt;group&lt;/b&gt;, to &lt;em&gt;users&lt;/em&gt;.&lt;/p&gt;</description>
                <environment>MySQL database, Lenny</environment>
            <key id="12535">DC-993</key>
            <summary>Many-to-many Relation defined one way </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>
                                <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="kweij">Klaas van der Weij</reporter>
                        <labels>
                    </labels>
                <created>Tue, 5 Apr 2011 07:09:51 +0000</created>
                <updated>Tue, 5 Apr 2011 07:09:51 +0000</updated>
                                    <version>1.2.2</version>
                <version>1.2.3</version>
                <version>1.2.4</version>
                                                <component>Relations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-607] Doctrine concrete inheritance link between tables</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-607</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I pointed out a strange problem:&lt;br/&gt;
I have two tables that are linked with a one to many relation ship.&lt;br/&gt;
Each table has some concrete inherited tables.&lt;br/&gt;
Here is the schema:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Batch:
  columns:
    code: string
    is_pure: &lt;span class=&quot;code-object&quot;&gt;boolean&lt;/span&gt;

Flask:
  columns:
    batch_id: integer
    code: string
    quantity: integer
  relations:
    Batch:
      local: batch_id
      foreign: id
      foreignType: many
    
ProducedBatch:
  inheritance:
    type: concrete
    &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt;: Batch
  columns:
    production_date: date
    
BoughtBatch:
  inheritance:
    type: concrete
    &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt;: Batch
  columns:
    supplier: string
    
ProducedFlask:
  inheritance:
    type: concrete
    &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt;: Flask
  columns:
    weight: integer
    
BoughtFlask:
  inheritance:
    type: concrete
    &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt;: Flask
  columns:
    price: integer
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The problem occurs when I try to populate the database.&lt;br/&gt;
Here is the data:&lt;/p&gt;

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

ProducedFlask:
  F1:
    Batch: B1
    code: Flask1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When loading fixtures, I get 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;Invalid row key specified: (batch) B1, referred to in (produced_flask) F1&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In fact, Doctrine doesn&apos;t take into account the primary key inherited from Flask table.&lt;br/&gt;
The mapping should be done between parent and child tables.&lt;/p&gt;

&lt;p&gt;The only solution to solve this is to set a relationship between each couple of sub-table (ProducedFlask -&amp;gt; ProducedBatch and BoughtFlask -&amp;gt; BoughtFlask).&lt;/p&gt;</description>
                <environment>Symfony 1.4.3, php5.3.0 (snow leopard version)</environment>
            <key id="11149">DC-607</key>
            <summary>Doctrine concrete inheritance link between tables</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="jc13">Julien Chiron</reporter>
                        <labels>
                    </labels>
                <created>Tue, 30 Mar 2010 05:44:45 +0000</created>
                <updated>Wed, 21 Jul 2010 03:59:18 +0000</updated>
                                                                    <component>Inheritance</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="13627" author="etag" created="Wed, 21 Jul 2010 03:59:18 +0000"  >&lt;p&gt;It is very strange that the doctrine inheritance system don&apos;t inherite all the relationship of the mother-table on all sub-table. I think that it will be a very good improvement to fix this problem.&lt;/p&gt;

&lt;p&gt;For example if you are this model :&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unable to find source-code formatter for language: yml.&lt;/span&gt; Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml&lt;/div&gt;&lt;pre&gt; 
motherTable:
  columns:
     code: string
     relationTable_id: integer
  relation:
     relationTableRelation:
            local: relationTable_id
            foreign: id
            type: one     

subTable:
    inheritance:
        type: concrete
    colums:
        name: string

relationTable:
    columns:
        code: integer
    relations:
        motherTableRelation:
            local: id
            foreign: relationTable_id
            type: many
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;In this example, the relationTableRelation will be inherited, it is good but the other side of the relation in relation table will always go on motherTable and not on subTable, but motherTable is always empty, moreover subTable don&apos;t share its ID with motherTable, so this side of the relationship is unusefull because we can find subTable element in relation with a relationTable element.&lt;/p&gt;

&lt;p&gt;It will be good to find a solution to this issue &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-497] A new task to set migration to a certain version</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-497</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;It would be nice to have a task which you could tell to set to the proper version. If the migrations_version table did not exist yet, it would create the table and set the version.&lt;/p&gt;

&lt;p&gt;Explanation:&lt;br/&gt;
  Most times migrations come as an after thought after the code db is already pushed live.  Therefore you have to manually create the migrations table and set it to a version just before the newest migration.&lt;/p&gt;

&lt;p&gt;  It might also be better to just update the migrate task to check if a migration_version table exists, if not to just run the single migration which is specified.&lt;/p&gt;</description>
                <environment>All</environment>
            <key id="10880">DC-497</key>
            <summary>A new task to set migration to a certain version</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="isleshocky77">Stephen Ostrow</reporter>
                        <labels>
                    </labels>
                <created>Fri, 12 Feb 2010 17:33:32 +0000</created>
                <updated>Sat, 13 Feb 2010 01:55:11 +0000</updated>
                                    <version>1.2.1</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-464] [Inheritance] Couldn&apos;t save record with inheritance by a relationship if the record has no column modified (solution proposed)</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-464</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Please consider the following TestCase&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;Inheritance with no property setted, saved by relationship&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;class Doctrine_Ticket_DC464_TestCase &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Doctrine_UnitTestCase
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function prepareTables()
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;tables[] = &apos;Ticket_DC464_Entity&apos;;
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;tables[] = &apos;Ticket_DC464_Article&apos;;
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;tables[] = &apos;Ticket_DC464_User&apos;;
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;tables[] = &apos;Ticket_DC464_Group&apos;;
        parent::prepareTables();
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function testTest()
    {
        $User = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Ticket_DC464_User();

        $Article = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Ticket_DC464_Article();
        $Article-&amp;gt;title = &apos;my first article&apos;;
        $Article-&amp;gt;Author = $User;

        $Article-&amp;gt;save();

        $UserFetched = Doctrine::getTable(&apos;Ticket_DC464_User&apos;)-&amp;gt;find(1);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertTrue($UserFetched &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; Ticket_DC464_User);
       &lt;span class=&quot;code-comment&quot;&gt;//$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertEqual($UserFetched-&amp;gt;type, 1);
&lt;/span&gt;

    }
}



class Ticket_DC464_Entity &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Doctrine_Record
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setTableDefinition()
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;hasColumn(&apos;id&apos;, &apos;integer&apos;, 11, array(&apos;autoincrement&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;, &apos;primary&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;));
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;hasColumn(&apos;facultative_field&apos;, &apos;string&apos;, 255);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;hasColumn(&apos;type&apos;, &apos;string&apos;, 255);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;setSubClasses(array(
             &apos;Ticket_DC464_User&apos; =&amp;gt;  array(&apos;type&apos; =&amp;gt; 1),
             &apos;Ticket_DC464_Group&apos; =&amp;gt; array(&apos;type&apos; =&amp;gt; 2),
        ));

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;option(&apos;type&apos;, &apos;InnoDB&apos;);
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setUp()
    {
    }
}

class Ticket_DC464_User &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Ticket_DC464_Entity { }
class Ticket_DC464_Group &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Ticket_DC464_Entity { }

class Ticket_DC464_Article &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Doctrine_Record
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setTableDefinition()
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;hasColumn(&apos;id&apos;, &apos;integer&apos;, 11, array(&apos;autoincrement&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;, &apos;primary&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;));
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;hasColumn(&apos;title&apos;, &apos;string&apos;, 30);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;hasColumn(&apos;author_id&apos;, &apos;integer&apos;, 11);

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;option(&apos;type&apos;, &apos;InnoDB&apos;);
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setUp()
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;hasOne(&apos;Ticket_DC464_User as Author&apos;, array(
             &apos;local&apos; =&amp;gt; &apos;author_id&apos;,
             &apos;foreign&apos; =&amp;gt; &apos;id&apos;));
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;Notice that in the test, the $User instance has no property setted (in fact in this test, the &quot;useless_field&quot; in the model is... useless).&lt;/p&gt;

&lt;p&gt;This test fails (the $User object is not saved) because the method UnitOfWork-&amp;gt;saveRelatedLocalKeys() - called in saveGraph(), itself called by $Article-&amp;gt;save() - returns false because no column has been modified (line 395).&lt;/p&gt;



&lt;p&gt;To fix this, the Record-&amp;gt;assignInheritanceValues() should be executed in top of isModified(), or for each related object in UnitOfWork-&amp;gt;saveRelatedLocalKeys() (and probably UnitOfWork-&amp;gt;saveRelatedForeignKeys() too).&lt;/p&gt;

&lt;p&gt;I&apos;ve attached the test.&lt;/p&gt;</description>
                <environment></environment>
            <key id="10806">DC-464</key>
            <summary>[Inheritance] Couldn&apos;t save record with inheritance by a relationship if the record has no column modified (solution proposed)</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>
                                <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="colin.darie">Colin Darie</reporter>
                        <labels>
                    </labels>
                <created>Fri, 29 Jan 2010 23:51:39 +0000</created>
                <updated>Wed, 9 Jun 2010 06:50:22 +0000</updated>
                                    <version>1.2.1</version>
                                                <component>Inheritance</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="11527" author="colin.darie" created="Sat, 30 Jan 2010 02:51:11 +0000"  >&lt;p&gt;Fix test with the right prefixes&lt;/p&gt;</comment>
                    <comment id="12259" author="jwage" created="Mon, 15 Mar 2010 17:51:17 +0000"  >&lt;p&gt;Do you have a patch for the issue too?&lt;/p&gt;</comment>
                    <comment id="12286" author="colin.darie" created="Tue, 16 Mar 2010 13:32:52 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;no I doesn&apos;t have a patch for this, because I was not sure what the best way to solve this.&lt;br/&gt;
However, patching the isModified() method is maybe the safest way, with a simple  $this-&amp;gt;assignInheritanceValues(); at top (around line 2100).&lt;/p&gt;</comment>
                    <comment id="13210" author="jwage" created="Tue, 8 Jun 2010 16:51:40 +0000"  >&lt;p&gt;Can you provide a patch for that change then so I can see it and test it? Thanks, Jon&lt;/p&gt;</comment>
                    <comment id="13247" author="colin.darie" created="Wed, 9 Jun 2010 06:50:22 +0000"  >&lt;p&gt;I&apos;ve attached the patch.&lt;/p&gt;

&lt;p&gt;Once again, this patch fix the issue but there is maybe a better way to fix it to avoid the assignInheritanceValues() at each time.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10332" name="DC464TestCase.php" size="3293" author="colin.darie" created="Sat, 30 Jan 2010 02:51:11 +0000" />
                    <attachment id="10634" name="Record.php.patch" size="487" author="colin.darie" created="Wed, 9 Jun 2010 06:50:22 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-781] Column order in generated SQL is based on relationships, instead of SELECT clause</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-781</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;When executing below query as follows:&lt;br/&gt;
        $q = Doctrine_Query::create()&lt;br/&gt;
                -&amp;gt;select(&apos;bc.id, bbl.printed_name, bbl.rate, bc.name, bc.is_rate_variable&apos;)&lt;br/&gt;
                -&amp;gt;from(&apos;BillBatchLine bbl, bbl.Bill_Charge bc&apos;)&lt;br/&gt;
                -&amp;gt;where(&apos;bbl.bill_batch_id = ?&apos;, $bill_batch_id);&lt;br/&gt;
        return $q-&amp;gt;execute(array(), Doctrine::HYDRATE_NONE);&lt;/p&gt;

&lt;p&gt;SQL generated is:&lt;br/&gt;
SELECT b.printed_name AS b_&lt;em&gt;printed_name, b.rate AS b&lt;/em&gt;&lt;em&gt;rate, b2.id AS b2&lt;/em&gt;&lt;em&gt;id, b2.name AS b2&lt;/em&gt;&lt;em&gt;name, b2.is_rate_variable AS b2&lt;/em&gt;_is_rate_variable FROM Bill_Batch_Lines b LEFT JOIN bill_charges b2 ON b.bill_charge_id = b2.id AND (b2.deleted_at IS NULL) WHERE (b.bill_batch_id = &apos;2&apos; AND b.society_id = &apos;1&apos; AND b2.society_id = &apos;1&apos; AND (b.deleted_at IS NULL))&lt;/p&gt;

&lt;p&gt;Basically, columns are ordered based on relationships and not as defined in the SELECT clause&lt;/p&gt;</description>
                <environment>Windows / PHP 5.2.4 / MySQL 5.1.41 / Symfony 1.4.0</environment>
            <key id="11603">DC-781</key>
            <summary>Column order in generated SQL is based on relationships, instead of SELECT clause</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>
                                <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="prasadgupte">Prasad Gupte</reporter>
                        <labels>
                    </labels>
                <created>Sat, 10 Jul 2010 05:14:28 +0000</created>
                <updated>Sat, 10 Jul 2010 05:14:28 +0000</updated>
                                    <version>1.2.0</version>
                                                <component>Native SQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-752] Data type &quot;decimal&quot; can be unsigned in MySQL 5.0</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-752</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;I have found in official docs of MySQL v5.0: &lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html&quot; class=&quot;external-link&quot;&gt;http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Decimals can be unsigned: DECIMAL[(M&lt;span class=&quot;error&quot;&gt;&amp;#91;,D&amp;#93;&lt;/span&gt;)] &lt;span class=&quot;error&quot;&gt;&amp;#91;UNSIGNED&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;ZEROFILL&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Here above is my &quot;&lt;tt&gt;schema.yml&lt;/tt&gt;&quot; file:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;background-color: #EEEEEE;border-color: #333333;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;border-bottom-color: #333333;background-color: #EFEFEF;&quot;&gt;&lt;b&gt;schema.yml&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot; style=&quot;background-color: #EEEEEE;&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
Project:
  columns:
    id:
      type: integer(4)
      unsigned: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      primary: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      autoincrement: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
    salary_range_from:
      type: decimal(12)
      scale: 2
      unsigned: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After i run:&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;./symfony doctrine:build --all&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;my &quot;&lt;tt&gt;schema.sql&lt;/tt&gt;&quot; is:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;background-color: #EEEEEE;border-color: #333333;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;border-bottom-color: #333333;background-color: #EFEFEF;&quot;&gt;&lt;b&gt;schema.sql&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot; style=&quot;background-color: #EEEEEE;&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
CREATE TABLE `project` (
  `id` INT AUTO_INCREMENT, 
  `salary_range_from` DECIMAL(12, 2), 
  INDEX `company_id_idx` (`company_id`), PRIMARY KEY(`id`)
) DEFAULT CHARACTER SET utf8 ENGINE = INNODB;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>OS: FreeBSD 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 amd64&lt;br/&gt;
PHP: 5.2.13 (cli) (built: May  6 2010 01:51:58), Zend Engine v2.2.0, with Xdebug v2.0.5&lt;br/&gt;
Symfony: 1.4.6-DEV (/web/vendor/symfony/1.4-svn/lib)&lt;br/&gt;
MySQL: Ver 14.14 Distrib 5.1.46, for portbld-freebsd8.0 (amd64) using  5.2</environment>
            <key id="11522">DC-752</key>
            <summary>Data type &quot;decimal&quot; can be unsigned in MySQL 5.0</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>
                                <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="fruit">Ilya Sabelnikov</reporter>
                        <labels>
                    </labels>
                <created>Fri, 18 Jun 2010 10:38:31 +0000</created>
                <updated>Fri, 18 Jun 2010 10:38:31 +0000</updated>
                                                                    <component>Native SQL</component>
                <component>Schema Files</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-1032] [PATCH] Doctrine_Collection::isModified() does not support deep like Doctrine_Record but probably should</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-1032</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;$record instanceof Doctrine_Record;&lt;br/&gt;
$collection instanceof Doctrine_Collection;&lt;/p&gt;

&lt;p&gt;Using the $record object I can find out if it has been modified : $record-&amp;gt;isModified().&lt;br/&gt;
I can also have this check all the relations also by passing true : $record-&amp;gt;isModified(true);&lt;/p&gt;

&lt;p&gt;However, the $collection object only support the first level and not the relations of its member records,&lt;br/&gt;
$collection-&amp;gt;isModified() returns false if one of the entry has one its relations modified (as it should).&lt;/p&gt;

&lt;p&gt;The improvement would be to allow this method to accept true, like it&apos;s $record counterpart, which would return true instead.&lt;/p&gt;

&lt;p&gt;See attached patch.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12963">DC-1032</key>
            <summary>[PATCH] Doctrine_Collection::isModified() does not support deep like Doctrine_Record but probably should</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/trivial.png">Trivial</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="romanb">Roman S. Borschel</assignee>
                                <reporter username="roychri">Christian Roy</reporter>
                        <labels>
                    </labels>
                <created>Tue, 23 Aug 2011 18:05:04 +0000</created>
                <updated>Tue, 23 Aug 2011 18:24:25 +0000</updated>
                                    <version>1.2.3</version>
                <version>1.2.4</version>
                                                <component>Relations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11058" name="DC-1032.patch" size="865" author="roychri" created="Tue, 23 Aug 2011 18:05:04 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-730] &quot;// ?? should this not be $this-&gt;_table-&gt;getComponentName() ??&quot; in Doctrine/Relation/Parser.php</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-730</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;In class Doctrine_Relation_Parser, in method completeDefinition(), at line 508 (for svn r.7676) there is the code:&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;php&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-none&quot;&gt;&#160;               foreach ((array) $this-&amp;gt;_table-&amp;gt;getIdentifierColumnNames() as $id) {
                    // ?? should this not be $this-&amp;gt;_table-&amp;gt;getComponentName() ??
                    $column = strtolower($table-&amp;gt;getComponentName())
                            . &apos;_&apos; . $id;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The comment on line 509 seems right, since &lt;em&gt;$table&lt;/em&gt; is a &quot;temporary&quot; variable created in a previous &lt;em&gt;foreach&lt;/em&gt; loop a few lines before (l. 472) and not used anywhere else... (I didn&apos;t make a test case though, that&apos;s why I tagged it as &quot;Task&quot; rather than &quot;Bug&quot;)&lt;/p&gt;

&lt;p&gt;I attached a patch, just in case.&lt;/p&gt;

&lt;p&gt;G.X&lt;/p&gt;</description>
                <environment>doctrine1 svn 1.2 rev. 7676</environment>
            <key id="11479">DC-730</key>
            <summary>&quot;// ?? should this not be $this-&gt;_table-&gt;getComponentName() ??&quot; in Doctrine/Relation/Parser.php</summary>
                <type id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/task.png">Task</type>
                                <priority id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/trivial.png">Trivial</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="romanb">Roman S. Borschel</assignee>
                                <reporter username="gx">Guilliam X</reporter>
                        <labels>
                    </labels>
                <created>Sat, 12 Jun 2010 10:33:21 +0000</created>
                <updated>Wed, 16 Jun 2010 06:07:16 +0000</updated>
                                    <version>1.2.2</version>
                                                <component>Relations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="13324" author="gx" created="Tue, 15 Jun 2010 06:46:47 +0000"  >&lt;p&gt;Edited the patch with &quot;branches/1.2&quot; as root&lt;/p&gt;

&lt;p&gt;I can&apos;t provide a test case but they all run without failure after patching &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="13333" author="gx" created="Wed, 16 Jun 2010 06:07:16 +0000"  >&lt;p&gt;Converted patch to Unix-like EOL style (was made on Windows...)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10656" name="DC-730.patch" size="760" author="gx" created="Wed, 16 Jun 2010 06:07:16 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>