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

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/si/jira.issueviews:issue-xml/DC-335/DC-335.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Doctrine Project</title>
    <link>http://www.doctrine-project.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.7</version>
        <build-number>850</build-number>
        <build-date>21-02-2013</build-date>
    </build-info>

<item>
            <title>[DC-335] Oracle identifier too long in normal SELECT when using longer table name or column</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-335</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Unfortunatelly oracle has max identifier length for 30 characters. When using longer model names eg. misCompanyContributor with column names the generated aliases for selected columns mix tableized modelname with colum name joined by two __, and sometimes the generated alias should exceed the allowed 30 characters long identifiers, and oracle complains with:&lt;/p&gt;

&lt;p&gt;{{&lt;br/&gt;
ORA-00972: identifier is too long&lt;br/&gt;
}}&lt;/p&gt;

&lt;p&gt;An example of large select with alias:&lt;br/&gt;
{{&lt;br/&gt;
SELECT&lt;br/&gt;
...&lt;br/&gt;
mis_contributor.contributor_id AS mis_contributor__contributor_id&lt;br/&gt;
..&lt;br/&gt;
FROM mis_contributor  ...&lt;br/&gt;
}}&lt;/p&gt;</description>
                <environment>Oracle</environment>
            <key id="10579">DC-335</key>
            <summary>Oracle identifier too long in normal SELECT when using longer table name or column</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="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="adrive">Miloslav &quot;adrive&quot; Kmet</reporter>
                        <labels>
                    </labels>
                <created>Mon, 7 Dec 2009 23:59:18 +0000</created>
                <updated>Wed, 13 Oct 2010 18:28:25 +0000</updated>
                                    <version>1.2.1</version>
                                                <component>Query</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="14562" author="mdhooge" created="Wed, 13 Oct 2010 17:12:31 +0000"  >&lt;p&gt;A workaround is available in &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-72&quot; title=&quot;DQL Auto generated column aliases cause &amp;quot;ORA-00972: identifier is too long&amp;quot; on Oracle&quot;&gt;&lt;del&gt;DC-72&lt;/del&gt;&lt;/a&gt; for version 1.1.4&lt;/p&gt;</comment>
                    <comment id="14563" author="mdhooge" created="Wed, 13 Oct 2010 18:28:25 +0000"  >&lt;p&gt;I have applied the following patch to use aliases of identifiers (what is after the &quot;as&quot; when defining field name).&lt;/p&gt;

&lt;p&gt;So far, it seems to work... But I am quite sure I didn&apos;t take all possible cases into consideration.&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;--- lib/vendor/doctrine/Doctrine/Hydrator/Graph.php.orig	2010-10-07 19:09:10.000000000 +0200
+++ lib/vendor/doctrine/Doctrine/Hydrator/Graph.php	2010-10-14 00:08:05.000000000 +0200
@@ -298,10 +298,10 @@
                 }
 
                 $e = explode(&apos;__&apos;, $key);
-                $last = strtolower(array_pop($e));
+                $fieldName = strtolower(array_pop($e));
                 $cache[$key][&apos;dqlAlias&apos;] = $this-&amp;gt;_tableAliases[strtolower(implode(&apos;__&apos;, $e))];
                 $table = $this-&amp;gt;_queryComponents[$cache[$key][&apos;dqlAlias&apos;]][&apos;table&apos;];
-                $fieldName = $table-&amp;gt;getFieldName($last);
+                $last = $table-&amp;gt;getColumnName($fieldName);
                 $cache[$key][&apos;fieldName&apos;] = $fieldName;
                 if ($table-&amp;gt;isIdentifier($fieldName)) {
                     $cache[$key][&apos;isIdentifier&apos;] = true;

--- lib/vendor/doctrine/Doctrine/Query.php.orig	2010-10-07 19:09:10.000000000 +0200
+++ lib/vendor/doctrine/Doctrine/Query.php	2010-10-14 00:03:28.000000000 +0200
@@ -494,12 +494,12 @@
                 $parentAlias = $this-&amp;gt;getSqlTableAlias($componentAlias . &apos;.&apos; . $parent-&amp;gt;getComponentName());
                 $sql[] = $this-&amp;gt;_conn-&amp;gt;quoteIdentifier($parentAlias) . &apos;.&apos; . $this-&amp;gt;_conn-&amp;gt;quoteIdentifier($columnName)
                        . &apos; AS &apos;
-                       . $this-&amp;gt;_conn-&amp;gt;quoteIdentifier($tableAlias . &apos;__&apos; . $columnName);
+                       . $this-&amp;gt;_conn-&amp;gt;quoteIdentifier($tableAlias . &apos;__&apos; . $fieldName);
             } else {
-                $columnName = $table-&amp;gt;getColumnName($fieldName);
+                $columnName = $table-&amp;gt;getColumnName($fieldName); // Really needed?
                 $sql[] = $this-&amp;gt;_conn-&amp;gt;quoteIdentifier($tableAlias) . &apos;.&apos; . $this-&amp;gt;_conn-&amp;gt;quoteIdentifier($columnName)
                        . &apos; AS &apos;
-                       . $this-&amp;gt;_conn-&amp;gt;quoteIdentifier($tableAlias . &apos;__&apos; . $columnName);
+                       . $this-&amp;gt;_conn-&amp;gt;quoteIdentifier($tableAlias . &apos;__&apos; . $fieldName);
             }
         }
 
@@ -554,7 +554,7 @@
 
             return $this-&amp;gt;_conn-&amp;gt;quoteIdentifier($tableAlias . &apos;.&apos; . $name)
                    . &apos; AS &apos;
-                   . $this-&amp;gt;_conn-&amp;gt;quoteIdentifier($tableAlias . &apos;__&apos; . $name);
+                   . $this-&amp;gt;_conn-&amp;gt;quoteIdentifier($tableAlias . &apos;__&apos; . $field);
         }
     }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>