<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu May 23 09:44:11 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+fixVersion+%3D+%221.2.0%22&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+fixVersion+%3D+%221.2.0%22</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="15" total="15"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DC-895] [I18n] Defining languages with locality (eg. en_GB) breaks functionality with SQL Integrity error - fix included</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-895</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;When defining languages as language_COUNTRY codes (supported by symfony by default), the functionality to work with I18n records breaks, resulting in &quot;SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;23000&amp;#93;&lt;/span&gt;: Integrity constraint violation: 1062 Duplicate entry&quot; errors.&lt;/p&gt;

&lt;p&gt;The reason is very simple: Doctrine&apos;s I18n language column is defined as a CHAR(2), thus shortening eg. &quot;en_GB&quot; value to &quot;en&quot;, thus causing the above SQL error when a &quot;en&quot; translation for a record already exists.&lt;/p&gt;

&lt;p&gt;The solution is even simpler: change the column&apos;s length to 7 in the Doctrine_I18n class&apos;s options: I&apos;ve tested this and all runs great: the correct SQL is being generated, the models behave correct, ...&lt;/p&gt;</description>
                <environment>all</environment>
            <key id="12019">DC-895</key>
            <summary>[I18n] Defining languages with locality (eg. en_GB) breaks functionality with SQL Integrity error - fix included</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="4levels">Erik Van Kelst</reporter>
                        <labels>
                    </labels>
                <created>Wed, 20 Oct 2010 04:21:59 +0000</created>
                <updated>Wed, 20 Oct 2010 04:42:40 +0000</updated>
                    <resolved>Wed, 20 Oct 2010 04:42:40 +0000</resolved>
                            <version>1.2.0</version>
                <version>1.2.1</version>
                <version>1.2.2</version>
                <version>1.2.3</version>
                                <fixVersion>1.2.0</fixVersion>
                <fixVersion>1.2.1</fixVersion>
                <fixVersion>1.2.2</fixVersion>
                <fixVersion>1.2.3</fixVersion>
                                <component>I18n</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14583" author="4levels" created="Wed, 20 Oct 2010 04:42:40 +0000"  >&lt;p&gt;Length of the i18n column is configurable...&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-764] Major-&gt;please.....Value of Primary key from sequence in Postgres table NOT being set (although sequence gets incremented)</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-764</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;In the ERD/schema that I have set up, a couple levels down in hierarchal order, a table has 3 composite foreign keys, and one sequence of its own. That sequence does not get get set into the &apos;Table-&amp;gt;sequence variable&apos;. That means when the file &apos;UnitOfWork&apos; executes the function &apos;_assignSequence()&apos;, it finds no sequence name, and skips the assignment of the sequence value. &lt;/p&gt;

&lt;p&gt;This of course blows up my inserts.&lt;/p&gt;

&lt;p&gt;I have included the following documentation:&lt;/p&gt;

&lt;p&gt;A/ An installation and further description README.tx file.&lt;br/&gt;
B/ SQL script to generate a anonymous version of my ERD - I.E. the table names and column names have been changed to protect the guilty (and proprietary)&lt;br/&gt;
C/ A fixture file to load some data.&lt;br/&gt;
D/ A *.png file showing a graphical view of the ERD.&lt;br/&gt;
E/ The generated schema.yml file from ./symfony doctrine:build-schema&lt;br/&gt;
F/ A modifiled (has certain echo statements for troubleshooting purposes) UnitOfWork.php file.&lt;br/&gt;
G/ A task file to run that tries to load the schema with valid values.&lt;br/&gt;
H/ An output file from running the Task and modified UnitOfWork.php file showing the exact point of error during insert.&lt;/p&gt;

&lt;p&gt;Please let me know what I can do to help get this troubleshot quicly. Thx&lt;br/&gt;
E/ &lt;/p&gt;</description>
                <environment>Ubuntu9.10 / PHP 5.2.6-3ubuntu4.5 with Suhosin-Patch 0.9.6.2 / Postgres-8.4 / Symfony 1.4.1 </environment>
            <key id="11550">DC-764</key>
            <summary>Major-&gt;please.....Value of Primary key from sequence in Postgres table NOT being set (although sequence gets incremented)</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="gearond">Dennis Gearon</reporter>
                        <labels>
                    </labels>
                <created>Thu, 24 Jun 2010 20:51:13 +0000</created>
                <updated>Fri, 25 Jun 2010 18:00:37 +0000</updated>
                    <resolved>Fri, 25 Jun 2010 18:00:37 +0000</resolved>
                            <version>1.2.1</version>
                                <fixVersion>1.2.0</fixVersion>
                <fixVersion>1.2.1</fixVersion>
                <fixVersion>1.2.2</fixVersion>
                <fixVersion>1.2.3</fixVersion>
                                <component>Connection</component>
                <component>Record</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="13414" author="gearond" created="Fri, 25 Jun 2010 13:27:20 +0000"  >&lt;p&gt;Don&apos;t know if it&apos;s related, but I ran:&lt;/p&gt;

&lt;p&gt;./symfony doctrine:build-sql&lt;/p&gt;

&lt;p&gt;on the database in this bug report, and none of the tables got sequences assigned to them, nor default values set coming from a sequence.&lt;/p&gt;

&lt;p&gt;This is Postgres.&lt;/p&gt;</comment>
                    <comment id="13415" author="gearond" created="Fri, 25 Jun 2010 13:54:31 +0000"  >&lt;p&gt;So much for getting around this problem easily, &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/sad.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;

&lt;p&gt;I tried doing this:&lt;/p&gt;

&lt;p&gt;$e_table=Doctrine::getTable(&apos;E&apos;);&lt;br/&gt;
$e_table-&amp;gt;setOption(&apos;sequenceName&apos;, &apos;e_id&apos;);&lt;br/&gt;
$e_options=$e_table-&amp;gt;getOptions();&lt;br/&gt;
var_dump($e_options);&lt;/p&gt;

&lt;p&gt;before inserting a record into the &apos;E&apos; table. The option value &apos;sequenceName&apos; is in the option array and returns correctly. However, when doing an insert immediatley after the above code, I get:&lt;/p&gt;

&lt;p&gt;   &apos;sequence name was Array&apos; (from my troubleshooting &apos;echo&apos; statements in the modified UnitOfWork.php file)&lt;/p&gt;

&lt;p&gt;and the following errors: (you have to be using my modified UOW.php file to get the same line number there.)&lt;/p&gt;

&lt;p&gt;Warning: Illegal offset type in /home/bugreport/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection/UnitOfWork.php on line 917&lt;/p&gt;

&lt;p&gt;Warning: Illegal offset type in /home/bugreport/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Record.php on line 2222&lt;/p&gt;

&lt;p&gt;Warning: Illegal offset type in /home/bugreport/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Record.php on line 2223&lt;br/&gt;
PREVIOUS line was processingSingleInsert&lt;/p&gt;

&lt;p&gt;Warning: Invalid argument supplied for foreach() in /home/bugreport/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Record.php on line 1151&lt;/p&gt;

&lt;p&gt;So I am wondering, does the public function table-&amp;gt;setOption();   even work, correclty that is?&lt;/p&gt;
</comment>
                    <comment id="13416" author="gearond" created="Fri, 25 Jun 2010 14:06:09 +0000"  >&lt;p&gt;If I instead just retrieve the next val of the sequence manually, change &apos;id&apos; column manually, then it works. But It then fails on the insert into the &apos;J&apos; table.&lt;/p&gt;

&lt;p&gt;Apparently, Doctrine does not like composite primary foreign keys with a sequence also part of the foreign key. I wonder if my file would work on the Oracle version?&lt;/p&gt;</comment>
                    <comment id="13417" author="gearond" created="Fri, 25 Jun 2010 17:57:39 +0000"  >&lt;p&gt;Showing simpler version of ERD/Schema converting Primary Foreign Keys to Foreign keys. The then required unique index on the former Primary Foreign Keys has not yet been coded. Just create it on all the keys in tables E and J, that were listed as primary in the first version in the zip file&lt;/p&gt;</comment>
                    <comment id="13418" author="gearond" created="Fri, 25 Jun 2010 18:00:37 +0000"  >&lt;p&gt;See last comment, but the short answer is . . . at this date, 2010-06-25, even Doctrine 2.0-DBAL can&apos;t do what I&apos;m trying to get verson 1.2.1 to do.&lt;/p&gt;

&lt;p&gt;So I got around it by converting primary foreign keys to foreign keys and then putting a unique index on the formerly primary keys.&lt;/p&gt;

&lt;p&gt;However, the child of the table treated that way, E(parent), J(child), now only has one foreign key, for E. To get all the ancestors, I will have to do subselects and joins. Oh well.&lt;/p&gt;
</comment>
                </comments>
                    <attachments>
                    <attachment id="10679" name="bugreport.zip" size="52298" author="gearond" created="Thu, 24 Jun 2010 20:51:13 +0000" />
                    <attachment id="10681" name="bug_report_create_postgresql.sql" size="7103" author="gearond" created="Fri, 25 Jun 2010 17:57:39 +0000" />
                    <attachment id="10680" name="schema.yml" size="5469" author="gearond" created="Fri, 25 Jun 2010 17:57:39 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-403] Eliminate queries produced by Doctrine_Node_NestedSet::getDescendants() when possible</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-403</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;h3&gt;&lt;a name=&quot;Howtoreproduce&quot;&gt;&lt;/a&gt;How to reproduce&lt;/h3&gt;

&lt;ol&gt;
	&lt;li&gt;fetch a tree with nested set
&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;$root = Doctrine::getTable($model)-&amp;gt;getTree()-&amp;gt;findRoot($rootId);
$treeObject= Doctrine::getTable($model)-&amp;gt;getTree()-&amp;gt;fetchTree($root-&amp;gt;getId()); 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;issue
&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;$root-&amp;gt;getNode()-&amp;gt;getChildren();

or there will be a total query mess in a lambda function with a loop getChildren().
...
&amp;lt;?php foreach($root-&amp;gt;getChildren() as $child): ?&amp;gt;
   ....
&amp;lt;?php endforeach; ?&amp;gt;
...

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Problem is described more verbosely here &amp;#8211; &lt;a href=&quot;http://codeutopia.net/blog/2008/08/30/understanding-doctrines-nestedset-feature/&quot; class=&quot;external-link&quot;&gt;http://codeutopia.net/blog/2008/08/30/understanding-doctrines-nestedset-feature/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Whatbehaviorisexpected&quot;&gt;&lt;/a&gt;What behavior is expected&lt;/h3&gt;
&lt;p&gt;An already fetched record instance is returned, without calling database and without causing query flooding.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Likeinpropel.&quot;&gt;&lt;/a&gt;Like in propel.&lt;/h3&gt;
&lt;p&gt;In propel if you are calling ....::retrieveTree($id) it returns the root&lt;br/&gt;
with completed, pooled (cached) and linked  tree.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Whathappens&quot;&gt;&lt;/a&gt;What happens&lt;/h3&gt;
&lt;p&gt;An additional query is issued&lt;/p&gt;

&lt;p&gt;This is a big slip in architecture of Doctrine`s nested set implementation.&lt;/p&gt;</description>
                <environment></environment>
            <key id="10693">DC-403</key>
            <summary>Eliminate queries produced by Doctrine_Node_NestedSet::getDescendants() when possible</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="zidler">alex</reporter>
                        <labels>
                    </labels>
                <created>Wed, 6 Jan 2010 20:52:18 +0000</created>
                <updated>Fri, 16 Apr 2010 12:18:05 +0000</updated>
                                    <version>1.2.1</version>
                                <fixVersion>1.2.0</fixVersion>
                                <component>Nested Set</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-299] Doctrine::loadModels() returns an incorrect result if there is some models named before &quot;Base&quot;</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-299</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;If there is a model named before &quot;Base&quot; (in the alpabetical order), like &quot;Address&quot;, Doctrine::loadModels() returns an incorrect array by including the BaseAddress class :&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;Array
(
    [Address] =&amp;gt; Address
    [BaseAddress] =&amp;gt; BaseAddress
)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This happens because in the list of files, Address.class.php (where Address extends BaseAddress) comes before BaseAddress.class.php. So BaseAddress is already loaded when loadModels() checks if the BaseAddress class exists. Then this class is added in the loaded models without check if this is a valid model class.&lt;/p&gt;

&lt;p&gt;This can be easily fixed :&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;// Doctrine/Core.php , line 679:
&lt;/span&gt;
&lt;span class=&quot;code-comment&quot;&gt;// replace :
&lt;/span&gt;
$loadedModels[$className] = $className;

&lt;span class=&quot;code-comment&quot;&gt;// by :
&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (self::isValidModelClass($className)) {
  $loadedModels[$className] = $className;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="10525">DC-299</key>
            <summary>Doctrine::loadModels() returns an incorrect result if there is some models named before &quot;Base&quot;</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="colin.darie">Colin Darie</reporter>
                        <labels>
                    </labels>
                <created>Sun, 29 Nov 2009 16:14:59 +0000</created>
                <updated>Mon, 30 Nov 2009 16:07:15 +0000</updated>
                    <resolved>Mon, 30 Nov 2009 16:07:15 +0000</resolved>
                            <version>1.2.0-RC1</version>
                                <fixVersion>1.2.0</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="10909" author="jwage" created="Mon, 30 Nov 2009 16:07:15 +0000"  >&lt;p&gt;Thanks for the ticket and fix.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-295] Export_Schema does not properly account for classes that have a prefix.</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-295</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;When trying to run doctrine-cli generate-yaml-models (I think other tasks are affected too), I get a yaml file consisting of { }.&lt;br/&gt;
I think this is because on line 48 of Doctrine/Export/Schema.php  $classPrefix is not passed to Doctrine_Core::loadModels($directory) even if it is set in the configuration array.&lt;br/&gt;
This is causing doctrine to think there are no models to generate the yaml for if I am using the $classPrefix.&lt;/p&gt;

&lt;p&gt;I&apos;m just learning Doctrine so it&apos;s entirely possibly something else is to blame for my issue, but this is where I was able to trace it to.&lt;/p&gt;</description>
                <environment></environment>
            <key id="10513">DC-295</key>
            <summary>Export_Schema does not properly account for classes that have a prefix.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="matthewmi11er">Matthew Miller</reporter>
                        <labels>
                    </labels>
                <created>Thu, 26 Nov 2009 05:12:16 +0000</created>
                <updated>Mon, 30 Nov 2009 18:18:30 +0000</updated>
                    <resolved>Mon, 30 Nov 2009 17:28:38 +0000</resolved>
                            <version>1.2.0-BETA3</version>
                <version>1.2.0-RC1</version>
                                <fixVersion>1.2.0</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="10895" author="jwage" created="Sat, 28 Nov 2009 22:02:50 +0000"  >&lt;p&gt;I fixed an issue similar to this last week. Make sure you&apos;re all fully up-to-date from the 1.2 branch and let me know if the problem still persists there.&lt;/p&gt;

&lt;p&gt;Thanks, Jon&lt;/p&gt;</comment>
                    <comment id="10896" author="matthewmi11er" created="Sun, 29 Nov 2009 05:23:14 +0000"  >&lt;p&gt;I did an svn checkout from here &lt;a href=&quot;http://svn.doctrine-project.org/branches/1.2/&quot; class=&quot;external-link&quot;&gt;http://svn.doctrine-project.org/branches/1.2/&lt;/a&gt; and the behavior appears to be the same.&lt;/p&gt;</comment>
                    <comment id="10916" author="jwage" created="Mon, 30 Nov 2009 17:28:38 +0000"  >&lt;p&gt;I added an attribute for setting the class prefix:&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;$manager-&amp;gt;setAttribute(Doctrine_Core::ATTR_MODEL_CLASS_PREFIX, &apos;MyPrefix_&apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Later we can make use of this attribute in more places possibly.&lt;/p&gt;</comment>
                    <comment id="10924" author="matthewmi11er" created="Mon, 30 Nov 2009 18:13:44 +0000"  >&lt;p&gt;I&apos;ll do some more testing to get a better idea of what&apos;s going on but here&apos;s what I&apos;ve got so far.&lt;/p&gt;

&lt;p&gt;line 627 of Core.php in the loadModelsfunction you have: &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;$classPrefix = $classPrefix === &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; ? $manager-&amp;gt;getAttribute(Doctrine_Core::ATTR_MODEL_CLASS_PREFIX) : &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Shouldn&apos;t the final null be $classPrefix? Otherwise I think you&apos;re overwriting a prefix that was passed as a parameter to the function.&lt;/p&gt;

&lt;p&gt;When generating the models from the DB I pass options  to the Doctrine_Cli that look something 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;$options[&apos;generate_models_options&apos;] = array(
    &apos;pearStyle&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;,
    &apos;generateTableClasses&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;,
    &apos;classPrefix&apos; =&amp;gt; &apos;Model_&apos;,
    &apos;baseClassPrefix&apos; =&amp;gt; &apos;Base_&apos;,
    &apos;baseClassesDirectory&apos; =&amp;gt; &apos;Base&apos;,
    &apos;classPrefixFiles&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;,
    &apos;generateAccessors&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;,
);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Would it make sense to use these or similar for generating the yaml from the models?&lt;/p&gt;

&lt;p&gt;My initial test got me a little further but now it&apos;s having trouble loading the Base classes. It looks like this has to do with the baseClassPrefix and baseClassesDirectory but I&apos;ll test it more later.&lt;/p&gt;</comment>
                    <comment id="10925" author="jwage" created="Mon, 30 Nov 2009 18:18:30 +0000"  >&lt;p&gt;Yes you are right, the line was wrong and the null should have been $classPrefix. As for the options, I am not sure. You will just need to play with different combinations until it works. Make sure that the class name and path to the file with the class in it are the same. That is how it is able to autoload the model classes.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-288] Doctrine_Parser_Yml dependany on sfYaml causing issues for non symfony users</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-288</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;I am currently undergoing an integration with the Zend Framework. Unfortunatly we do not use the Symfony framework and have no scope available to include it. &lt;/p&gt;

&lt;p&gt;The requirement for sfyaml in its rawest form has caused me to have to rewrite part of your parser to ensure it includes the crrect files which I have now included in our working version of Doctrine.&lt;/p&gt;

&lt;p&gt;As Symfony appears to be distributed under an open license surely it would make sense for you to actually include this (or a modified version of this) into your library. &lt;/p&gt;

&lt;p&gt;This would make the code much more portable and reusable for people who do not use symfony&lt;/p&gt;

&lt;p&gt;My &quot;Quick Fix&quot; just involved dropping all the sfYaml files into the parser folder and doing a straight include untill I can find a more elegant solution&lt;/p&gt;</description>
                <environment></environment>
            <key id="10504">DC-288</key>
            <summary>Doctrine_Parser_Yml dependany on sfYaml causing issues for non symfony users</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="matt.cockayne">Matt Cockayne</reporter>
                        <labels>
                    </labels>
                <created>Wed, 25 Nov 2009 07:03:43 +0000</created>
                <updated>Thu, 18 Feb 2010 11:13:49 +0000</updated>
                    <resolved>Mon, 30 Nov 2009 17:49:49 +0000</resolved>
                            <version>1.2.0</version>
                                <fixVersion>1.2.0</fixVersion>
                                <component>File Parser</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="10885" author="theashman" created="Fri, 27 Nov 2009 10:39:18 +0000"  >&lt;p&gt;I could not get your &apos;quick fix&apos; to work no matter whether i dumped the files in the parser dir, on my include path or anywhere.&lt;/p&gt;

&lt;p&gt;Would it not be a good idea to reformat the sfYaml class names into the Pear/Zend/Doctrine scheme and integrate them into doctrine it&apos;s self?&lt;/p&gt;

&lt;p&gt;for example:&lt;br/&gt;
File name:&lt;br/&gt;
sfYaml.php -&amp;gt; Doctrine/Parser/Yaml.php&lt;br/&gt;
Class name:&lt;br/&gt;
sfYaml -&amp;gt; Doctrine_Parser_Yaml&lt;/p&gt;

&lt;p&gt;File name:&lt;br/&gt;
sfYamlDumper.php -&amp;gt; Doctrine/Parser/Yaml/Dumper.php&lt;br/&gt;
Class name:&lt;br/&gt;
sfYamlDumper -&amp;gt; Doctrine_Parser_Yaml_Dumper&lt;/p&gt;

&lt;p&gt;etc...&lt;/p&gt;

&lt;p&gt;If these files are going to be used as standard i would think it to be a good idea.&lt;/p&gt;</comment>
                    <comment id="10886" author="matt.cockayne" created="Fri, 27 Nov 2009 16:18:39 +0000"  >&lt;p&gt;Hi Ashley&lt;/p&gt;

&lt;p&gt;This link will show you how I added the files to create my quick fix from the files stored in my subversion repo. &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://subversion.zucchi.co.uk/listing.php?repname=titan&amp;amp;path=%2Ftrunk%2Flibrary%2FDoctrine%2FParser%2F#path_trunk_library_Doctrine_Parser_&quot; class=&quot;external-link&quot;&gt;http://subversion.zucchi.co.uk/listing.php?repname=titan&amp;amp;path=%2Ftrunk%2Flibrary%2FDoctrine%2FParser%2F#path_trunk_library_Doctrine_Parser_&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As well as puutting the files in the parser dir I also had to change the requires at the top of the yaml.ph file.&lt;/p&gt;

&lt;p&gt;Changeing the names of the classes would be a good idea for a more permanent fix but I will leave that to the good people at Doctrine to decide to put in place&lt;/p&gt;</comment>
                    <comment id="10893" author="jwage" created="Sat, 28 Nov 2009 21:51:05 +0000"  >&lt;p&gt;I will fix the issue first thing this week. @Ashley, this is the way it used to be before this change. The issue is then we don&apos;t get bug fixes from sfYaml. It is better if we use it as a vendor library.&lt;/p&gt;</comment>
                    <comment id="10922" author="jwage" created="Mon, 30 Nov 2009 17:49:49 +0000"  >&lt;p&gt;I moved the sfYaml external folder to the Parser folder. This should work better for everyone now.&lt;/p&gt;</comment>
                    <comment id="10993" author="localheinz" created="Thu, 3 Dec 2009 17:15:45 +0000"  >&lt;p&gt;It&apos;s nice that one can now skip to add &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;/library/Doctrine&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt; to the included paths, but it&apos;s not so nice that now the sfYaml files can not be found.&lt;/p&gt;</comment>
                    <comment id="11019" author="exceptione" created="Sun, 6 Dec 2009 00:04:43 +0000"  >&lt;p&gt;This ticket is not fixed. The doctrine autoloader should handle all it&apos;s dependencies, including those from symphony. These kind of things should not leak outside doctrine.&lt;/p&gt;

&lt;p&gt;It took me quite some time to figure out. It is a severe bug.&lt;/p&gt;</comment>
                    <comment id="11020" author="jwage" created="Sun, 6 Dec 2009 00:48:01 +0000"  >&lt;p&gt;hmm, What is the problem? The Doctrine::autoload() function does handle the autoloading of sfYaml now. Can you explain more detail about the problem you are encountering?&lt;/p&gt;</comment>
                    <comment id="11021" author="matt.cockayne" created="Sun, 6 Dec 2009 07:30:14 +0000"  >&lt;p&gt;I had a problem too in it nit being handled by the autoloader. It may be down to how I have integrated Doctrine into my Zend Framework app, so I cant really comment on that one&lt;/p&gt;

&lt;p&gt;the problem is easily fixed with a simple set of requires in the parser file. not ideal but it works for the moment&lt;/p&gt;</comment>
                    <comment id="11022" author="jwage" created="Sun, 6 Dec 2009 10:12:57 +0000"  >&lt;p&gt;What was the problem? What was the error you got? I&apos;d like to try and help fix something in Doctrine to make this handled better so any other more specific information anyone can provide would be much appreciated.&lt;/p&gt;</comment>
                    <comment id="11038" author="ppetermann" created="Mon, 7 Dec 2009 12:13:21 +0000"  >&lt;p&gt;In an Application using Zend Framework 1.9.6 and Doctrine 1.2,&lt;/p&gt;

&lt;p&gt;$ doctrine-cli generate-models-yaml&lt;br/&gt;
PHP Fatal error:  Class &apos;sfYaml&apos; not found in /path/to//library/Doctrine/Doctrine/Parser/Yml.php on line 80&lt;br/&gt;
Fatal error: Class &apos;sfYaml&apos; not found in /path/to/library/Doctrine/Doctrine/Parser/Yml.php on line 80&lt;/p&gt;

&lt;p&gt;further investigation shows that the method in Core.php, which was modified with the new Path is never called.&lt;/p&gt;

&lt;p&gt;the thing is, usually one sets up Zend Framework, so it uses the Doctrine autoloader&lt;br/&gt;
whenever a class is prefixed with Doctrine (by registering that namespace)&lt;br/&gt;
however, since sfYaml doesnt fall under that rule, the Zend Autoloader does not know that it needs to forward this, therefor the Doctrine one is never called.&lt;/p&gt;

&lt;p&gt;A workarround is to add&lt;br/&gt;
    	require_once &apos;Doctrine.php&apos;;&lt;br/&gt;
        $autoloader = Zend_Loader_Autoloader::getInstance();&lt;br/&gt;
        $autoloader-&amp;gt;registerNamespace(&apos;sfYaml&apos;)-&amp;gt;pushAutoloader(array(&apos;Doctrine&apos;, &apos;autoload&apos;), &apos;sfYaml&apos;);&lt;br/&gt;
to the Zend Booststrap class - like in your _initDoctrine method.&lt;/p&gt;

&lt;p&gt;This, tbfh, is still an ugly workarround, but so is the sfYaml loading in the doctrine autoloader itself. Personally i agree with the OP, Doctrine should come as a complete package, not using symfony externals.&lt;/p&gt;</comment>
                    <comment id="11040" author="lsmith" created="Mon, 7 Dec 2009 13:22:02 +0000"  >&lt;p&gt;Why is that &quot;workaround&quot; ugly? The fact of the matter is that not all code that is useful follows the same naming conventions. Having to fork or write wrappers around code with different naming conventions is a maintenance nightmare. Doctrine&apos;s autoloader implementation is a reference implementation but I assume most people use their own (by way of their chosen framework) and that one better be flexible enough to deal with different naming conventions. It seems ZF has these capabilities, so why is it ugly using them?&lt;/p&gt;</comment>
                    <comment id="11046" author="jwage" created="Mon, 7 Dec 2009 17:07:58 +0000"  >&lt;p&gt;I see, so the problem is when you&apos;re not using Doctrine::autoload(). The thing is we seem to have problems no matter how we integrate sfYaml. Originally we had it setup as Doctrine_Parser_Yaml_SfYaml so it was just like a normal Doctrine class, but then it got out of date and we don&apos;t get the latest bug fixes. I changed it to be in lib/vendor/sfYaml and required it manually in the Doctrine code that used it. This causes problems if the project has already loaded sfYaml by other means. For example in a Symfony project sfYaml exists sometimes or if the user happens to use the sfYaml component in his project. So, it needs to be handled by the autoloader for sure I think.&lt;/p&gt;</comment>
                    <comment id="11208" author="ponchorage" created="Wed, 16 Dec 2009 23:22:20 +0000"  >&lt;p&gt;Edit: Looks like having this:&lt;/p&gt;

&lt;p&gt;$manager-&amp;gt;setAttribute(&lt;br/&gt;
            Doctrine::ATTR_MODEL_LOADING,&lt;br/&gt;
            Doctrine::MODEL_LOADING_CONSERVATIVE&lt;br/&gt;
        );&lt;/p&gt;

&lt;p&gt;in an Application Resource plug-in along with the CLI call stops the tables from getting created.&lt;/p&gt;

&lt;p&gt;Autoloading the sfYaml stuff works for me now, but I&apos;m having what appears to be a related problem. The Doctrine cli task &quot;build-all-reload&quot; is supposed to both recreate the database and generate the model files. It is generating the model files fine now. However, the database gets dropped and re-added, but none of the tables get re-added. The output says, &quot;Created tables successfully&quot; but after checking the DB they are not there. I&apos;m using an application resource class, not a bootstrap init function, if that matters.&lt;/p&gt;</comment>
                    <comment id="11751" author="verysimple" created="Thu, 18 Feb 2010 11:13:49 +0000"  >&lt;p&gt;Currently using ZF 1.10 and Doctrine 1.2.1. To resolve this issue you need to ask Zend&apos;s Autoloader to register Doctrine&apos;s Autoloader for Doctrine and sfYaml namespaces:&lt;/p&gt;

&lt;p&gt;$loader = Zend_Loader_Autoloader::getInstance();&lt;br/&gt;
$loader-&amp;gt;pushAutoloader(array(&apos;Doctrine_Core&apos;,&apos;autoload&apos;), array(&apos;Doctrine&apos;, &apos;sfYaml&apos;));&lt;/p&gt;
</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-286] Trailing DIRECTORY_SEPARATOR will cause Doctrine_Core::loadModels in PEAR mode to fail</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-286</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;If I&apos;m using the PEAR model loading in Doctrine, and I try to create the tables from the models as follows.&lt;/p&gt;

&lt;p&gt;Doctrine::createTablesFromModels(&apos;/path/to/my/models/&apos;);&lt;/p&gt;

&lt;p&gt;Doctrine doesn&apos;t recognise the models and can&apos;t create any tables as a result.&lt;br/&gt;
However if I remove the trailing slash.&lt;/p&gt;

&lt;p&gt;Doctrine::createTablesFromModels(&apos;/path/to/my/models&apos;);&lt;/p&gt;

&lt;p&gt;It works fine. This wasn&apos;t a problem is 1.2BETA-3. The problem is caused by changeset 6796, and the code that extracts the class name from the path of the filename not taking into account the trailing DIRECTORY_SEPARATOR.&lt;/p&gt;</description>
                <environment>Running Debian Lenny under Xen-64bit 1gig memory.&lt;br/&gt;
&lt;br/&gt;
PHP 5.2.6-1+lenny3 with Suhosin-Patch 0.9.6.2 (cli) (built: Apr 26 2009 20:09:03)&lt;br/&gt;
Copyright (c) 1997-2008 The PHP Group&lt;br/&gt;
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;with Xdebug v2.0.3, Copyright (c) 2002-2007, by Derick Rethans&lt;br/&gt;
&lt;br/&gt;
Apache - not relevant - running from the command line.&lt;br/&gt;
&lt;br/&gt;
mysql  Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (x86_64) using readlin.2&lt;br/&gt;
</environment>
            <key id="10502">DC-286</key>
            <summary>Trailing DIRECTORY_SEPARATOR will cause Doctrine_Core::loadModels in PEAR mode to fail</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="brammers">Pete Hatton</reporter>
                        <labels>
                    </labels>
                <created>Wed, 25 Nov 2009 00:54:39 +0000</created>
                <updated>Mon, 30 Nov 2009 17:55:04 +0000</updated>
                    <resolved>Mon, 30 Nov 2009 17:55:04 +0000</resolved>
                            <version>1.2.0-RC1</version>
                                <fixVersion>1.2.0</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="10859" author="brammers" created="Wed, 25 Nov 2009 00:59:00 +0000"  >&lt;p&gt;Patch for the issue.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10186" name="DC-286-Patch.diff" size="1027" author="brammers" created="Wed, 25 Nov 2009 00:59:00 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-283] Unsetting an invalid property</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-283</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Actually I&apos;m not sure how this issue could implicate on any behavior.&lt;br/&gt;
I was debbuging a project and I found this invalid reference:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;Relation/Parser.php&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function bind($name, $options = array())
{
&lt;span class=&quot;code-comment&quot;&gt;//...
&lt;/span&gt;    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;hasRelation($alias)) {
        unset($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;relations[$alias]); &lt;span class=&quot;code-comment&quot;&gt;// Doesn&apos;t exist, the right property is $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_relations
&lt;/span&gt;        unset($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_pending[$alias]);
    }
&lt;span class=&quot;code-comment&quot;&gt;//...
&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I&apos;ve started using Doctrine recently, so I think it&apos;s better somebody more expert take a look in that.&lt;/p&gt;</description>
                <environment></environment>
            <key id="10498">DC-283</key>
            <summary>Unsetting an invalid property</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="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="tflessak">Thiago Flessak</reporter>
                        <labels>
                    </labels>
                <created>Tue, 24 Nov 2009 11:21:19 +0000</created>
                <updated>Tue, 24 Nov 2009 19:38:55 +0000</updated>
                    <resolved>Tue, 24 Nov 2009 19:38:55 +0000</resolved>
                            <version>1.2.0-RC1</version>
                                <fixVersion>1.0.14</fixVersion>
                <fixVersion>1.1.6</fixVersion>
                <fixVersion>1.2.0</fixVersion>
                                <component>Relations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-282] Memory Leak in Doctrine_Query_Abstract._getDqlCallbackComponents()</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-282</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;The following iteration shows increasing memory usage:&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; $manager = Doctrine_Manager::getInstance();
$manager-&amp;gt;setAttribute(Doctrine::ATTR_USE_DQL_CALLBACKS, true);
$manager-&amp;gt;....connection....

for($i=0; $i&amp;lt;10;$i++) {
  $tx = Doctrine_Query::create()
    -&amp;gt;from(&apos;Some_Entity cot&apos;)
    -&amp;gt;andWhere(&apos;cot.id = ?&apos;, $someid)
     -&amp;gt;fetchOne();
			
  $usage = memory_get_usage();
  echo $i.&apos;: &apos;.$usage.&quot;\n&quot;;
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;This results in an exceed-max-memory-fatal (750 MB) with a more complex application i am running that iterates &amp;gt;20,000 times.&lt;br/&gt;
I found out that there is a memory leak in Doctrine_Query_Abstract._getDqlCallbackComponents():&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;...
$copy-&amp;gt;getSqlQuery($params);
$componentsAfter = $copy-&amp;gt;getQueryComponents();
$copy-&amp;gt;free(); //This is the solution
...&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Sincerly,&lt;br/&gt;
Markus&lt;/p&gt;</description>
                <environment>PHP 5.2.11, Apache 2.2, Ubuntu Linux 9.1</environment>
            <key id="10497">DC-282</key>
            <summary>Memory Leak in Doctrine_Query_Abstract._getDqlCallbackComponents()</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="mthielen">Markus Thielen</reporter>
                        <labels>
                    </labels>
                <created>Tue, 24 Nov 2009 10:54:26 +0000</created>
                <updated>Tue, 24 Nov 2009 19:41:30 +0000</updated>
                    <resolved>Tue, 24 Nov 2009 19:41:30 +0000</resolved>
                            <version>1.1.5</version>
                                <fixVersion>1.2.0</fixVersion>
                                <component>Query</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-281] Generate Models Db changes case in Relationship definition.</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-281</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Sorry - I&apos;ll start again. &lt;/p&gt;

&lt;p&gt;So this is the scenario. generate-models-db or generate-yaml-db will not work for attachment: pascal-case-tables.sql but it does work with attachment: lowercase-underscore-tables.sql&lt;/p&gt;

&lt;p&gt;The reason that this does not work is due to the builder incorrectly changing the case when you run generate-xxx-db on a database that has been generated with pascal case names (pascal-case-tables.sql).&lt;/p&gt;

&lt;p&gt;This could be the reason the exception  &quot;Missing Class Name&quot; is thrown when creating relationships  due to the class that is physically generated according to the table name (for example BookingStatus). does not match the class name being searched for when creating relationships.&lt;/p&gt;

&lt;p&gt;Create databases and run generate-models-db.&lt;/p&gt;</description>
                <environment></environment>
            <key id="10496">DC-281</key>
            <summary>Generate Models Db changes case in Relationship definition.</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="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="rvdavid">RV David</reporter>
                        <labels>
                    </labels>
                <created>Tue, 24 Nov 2009 01:34:11 +0000</created>
                <updated>Tue, 24 Nov 2009 20:46:02 +0000</updated>
                    <resolved>Tue, 24 Nov 2009 20:46:02 +0000</resolved>
                            <version>1.2.0-BETA3</version>
                                <fixVersion>1.2.0</fixVersion>
                                <component>Import/Export</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="10830" author="rvdavid" created="Tue, 24 Nov 2009 01:48:42 +0000"  >&lt;p&gt;changed booking to user - lack of sleep and too much caffeine makes for incoherent reports.&lt;/p&gt;</comment>
                    <comment id="10831" author="rvdavid" created="Tue, 24 Nov 2009 02:57:17 +0000"  >&lt;p&gt;Hopefully this will be more coherent. Sorry for spamming  - I&apos;ve been obsessing in trying to get this to work for the past day or so. &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10182" name="lowercase-underscore-tables.sql" size="5197" author="rvdavid" created="Tue, 24 Nov 2009 02:57:17 +0000" />
                    <attachment id="10181" name="pascal-case-tables.sql" size="5161" author="rvdavid" created="Tue, 24 Nov 2009 02:57:17 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-278] Invalid qubquery generated if using oracle adapter instead of pdo_oci</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-278</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Doctrine generates the following invalid subquery if oracle adapter is used (same query is generated corret if pdo_oci is used):&lt;/p&gt;

&lt;p&gt;SELECT DISTINCT &quot;s2&quot;.&quot;code&quot; &lt;br/&gt;
FROM &quot;spend_category&quot; &quot;s2&quot; &lt;br/&gt;
INNER JOIN &quot;company_spend_category&quot; &quot;c4&quot; ON (&quot;s2&quot;.&quot;code&quot; = &quot;c4&quot;.&quot;spendcategory_code&quot;) &lt;br/&gt;
INNER JOIN &quot;company&quot; &quot;c3&quot; ON &quot;c3&quot;.&quot;code&quot; = &quot;c4&quot;.&quot;company_code&quot; &lt;br/&gt;
WHERE &quot;s2&quot;.&quot;code&quot; = &apos;19000000&apos; &lt;br/&gt;
AND &quot;c3&quot;.&quot;is_deleted&quot; IS NOT NULL &lt;br/&gt;
AND &quot;s2&quot;.&quot;is_deleted&quot; IS NOT NULL &lt;br/&gt;
ORDER BY &quot;c3&quot;.&quot;name&quot; desc&lt;/p&gt;

&lt;p&gt;The problem is that the order by column is not part of the selected columns.&lt;/p&gt;

&lt;p&gt;Sample dql statement to reproduce this error:&lt;/p&gt;

&lt;p&gt;$this-&amp;gt;pageAllPager = new Doctrine_Pager(&lt;br/&gt;
        $q = Doctrine_Query::create()&lt;br/&gt;
                -&amp;gt;select(&apos;c.code, c.name, c.is_activated, c.is_deleted, sc.code&apos;)&lt;br/&gt;
                -&amp;gt;from(&apos;SpendCategory sc&apos;)&lt;br/&gt;
                -&amp;gt;innerJoin(&apos;sc.Companies c&apos;)&lt;br/&gt;
                -&amp;gt;where(&quot;sc.code = &apos;$spendcategory&apos;&quot;)&lt;br/&gt;
                -&amp;gt;addWhere(&apos;c.is_deleted IS NOT NULL&apos;)&lt;br/&gt;
                -&amp;gt;addWhere(&apos;sc.is_deleted IS NOT NULL&apos;)&lt;br/&gt;
                -&amp;gt;orderBy($orderBy)&lt;br/&gt;
                -&amp;gt;setHydrationMode(Doctrine::HYDRATE_ARRAY),&lt;br/&gt;
                $page,&lt;br/&gt;
                $resultsPerPage);&lt;br/&gt;
}&lt;/p&gt;</description>
                <environment>Linux, Oracle 10g</environment>
            <key id="10491">DC-278</key>
            <summary>Invalid qubquery generated if using oracle adapter instead of pdo_oci</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="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="tom808">Thomas Wahle</reporter>
                        <labels>
                    </labels>
                <created>Mon, 23 Nov 2009 18:03:28 +0000</created>
                <updated>Wed, 9 Jun 2010 13:02:31 +0000</updated>
                                                    <fixVersion>1.2.0</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="10827" author="jwage" created="Mon, 23 Nov 2009 23:37:04 +0000"  >&lt;p&gt;I believe this is fixed now in the latest Doctrine 1.2. Can you test and confirm?&lt;/p&gt;</comment>
                    <comment id="10855" author="tom808" created="Tue, 24 Nov 2009 21:51:23 +0000"  >&lt;p&gt;It is not fixed with 1.2 RC1&lt;/p&gt;

&lt;p&gt;Same sql wich work fine with pdo_oci generates an error using the oracle adapter&lt;/p&gt;

&lt;p&gt;&amp;lt;p&amp;gt;&lt;br/&gt;
    &amp;lt;b&amp;gt;Message:&amp;lt;/b&amp;gt; ORA-01791: Kein mit SELECT ausgew&#228;hlter Ausdruck : SELECT s.code AS s_&lt;em&gt;code, c.code AS c&lt;/em&gt;&lt;em&gt;code, c.name AS c&lt;/em&gt;&lt;em&gt;name, c.is_activated AS c&lt;/em&gt;&lt;em&gt;is_activated, c.is_deleted AS c&lt;/em&gt;_is_deleted FROM spend_category s INNER JOIN company_spend_category c2 ON (s.code = c2.spendcategory_code) INNER JOIN company c ON c.code = c2.company_code WHERE s.code IN (SELECT a.code FROM ( SELECT DISTINCT s2.code FROM spend_category s2 INNER JOIN company_spend_category c4 ON (s2.code = c4.spendcategory_code) INNER JOIN company c3 ON c3.code = c4.company_code WHERE s2.code = &apos;37000000&apos; AND c3.is_deleted IS NOT NULL AND s2.is_deleted IS NOT NULL ORDER BY c3.name desc ) a WHERE ROWNUM &amp;lt;= 10) AND (s.code = &apos;37000000&apos; AND c.is_deleted IS NOT NULL AND s.is_deleted IS NOT NULL) ORDER BY c.name desc. &lt;/p&gt;

&lt;p&gt;Failing Query: &quot;SELECT s.code AS s_&lt;em&gt;code, c.code AS c&lt;/em&gt;&lt;em&gt;code, c.name AS c&lt;/em&gt;&lt;em&gt;name, c.is_activated AS c&lt;/em&gt;&lt;em&gt;is_activated, c.is_deleted AS c&lt;/em&gt;_is_deleted FROM spend_category s INNER JOIN company_spend_category c2 ON (s.code = c2.spendcategory_code) INNER JOIN company c ON c.code = c2.company_code WHERE s.code IN (SELECT a.code FROM ( SELECT DISTINCT s2.code FROM spend_category s2 INNER JOIN company_spend_category c4 ON (s2.code = c4.spendcategory_code) INNER JOIN company c3 ON c3.code = c4.company_code WHERE s2.code = &apos;37000000&apos; AND c3.is_deleted IS NOT NULL AND s2.is_deleted IS NOT NULL ORDER BY c3.name desc ) a WHERE ROWNUM &amp;lt;= 10) AND (s.code = &apos;37000000&apos; AND c.is_deleted IS NOT NULL AND s.is_deleted IS NOT NULL) ORDER BY c.name desc&quot;&amp;lt;/p&amp;gt;&lt;/p&gt;</comment>
                    <comment id="10856" author="jwage" created="Tue, 24 Nov 2009 21:53:02 +0000"  >&lt;p&gt;I can&apos;t reproduce the issue in a test case. Can you help me with that? When I test what you&apos;re describing I get the results that are expected.&lt;/p&gt;</comment>
                    <comment id="10862" author="tom808" created="Wed, 25 Nov 2009 09:39:55 +0000"  >&lt;p&gt;Hi Jon,&lt;/p&gt;

&lt;p&gt;if i undestand the last comment correctly this issue will be fixed in 1.2 RC2.&lt;/p&gt;

&lt;p&gt;I have reviewed lots of existing test cases but did not find an example where pdo_oci or oracle adapter is used.&lt;/p&gt;

&lt;p&gt;Can you please forward the test case you have created for &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-278&quot; title=&quot;Invalid qubquery generated if using oracle adapter instead of pdo_oci&quot;&gt;DC-278&lt;/a&gt; to me? I will  use this as a template for any further issues and hopefuly reduce your efforts.&lt;/p&gt;

&lt;p&gt;Kind regards&lt;br/&gt;
Tom&lt;/p&gt;

&lt;p&gt;&amp;gt; Jonathan H. Wage updated &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-278&quot; title=&quot;Invalid qubquery generated if using oracle adapter instead of pdo_oci&quot;&gt;DC-278&lt;/a&gt;:&lt;br/&gt;
&amp;gt; --------------------------------&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt;    Fix Version/s: 1.2.0-RC2&lt;br/&gt;
&amp;gt;                       (was: 1.2.0-RC1)&lt;/p&gt;

</comment>
                    <comment id="11160" author="tom808" created="Thu, 10 Dec 2009 14:50:55 +0000"  >&lt;p&gt;I do believe that I have found the reason and it is still an issue with Doctrine 1.2.1 &lt;/p&gt;

&lt;p&gt;Doctrine generate the following subquery which is processed in Doctrine_Query:: getLimitSubquery(). &lt;/p&gt;

&lt;p&gt;SELECT b.id FROM &lt;br/&gt;
	(&lt;br/&gt;
		SELECT a.*, ROWNUM AS doctrine_rownum FROM	&lt;br/&gt;
		(&lt;br/&gt;
			SELECT DISTINCT i.id, i.lft &lt;br/&gt;
			FROM item i &lt;br/&gt;
			INNER JOIN oum o ON i.oum_id = o.id AND (o.is_deleted IS NOT NULL) &lt;br/&gt;
			INNER JOIN item_type i2 ON i.type_id = i2.id AND (i2.is_deleted IS NOT NULL)&lt;br/&gt;
			INNER JOIN item_translation i3 ON i.id = i3.id &lt;br/&gt;
			LEFT JOIN attachment a ON i.id = a.item_id AND (a.is_deleted = 0) &lt;br/&gt;
			WHERE i.bundling_id = ? &lt;br/&gt;
			ORDER BY i.lft &lt;br/&gt;
		) a  &lt;br/&gt;
	) b &lt;br/&gt;
WHERE doctrine_rownum BETWEEN 3 AND 4&lt;/p&gt;


&lt;p&gt;This function replaces the table alias names. It looks like that the first occurance of &quot;a&quot; is detected and the inner alias for table attachment &quot;a&quot; is replaced by &quot;a2&quot; - that&apos;s fine. But also the outer table alias &quot;a&quot; is replaced by &quot;a2&quot; The result will be&lt;/p&gt;

&lt;p&gt;SELECT b.id FROM &lt;br/&gt;
	(&lt;br/&gt;
		SELECT a.*, ROWNUM AS doctrine_rownum FROM	&lt;br/&gt;
		(&lt;br/&gt;
			&lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt;&lt;br/&gt;
			LEFT JOIN attachment a2 ON i.id = a2.item_id AND (a2.is_deleted = 0) &lt;br/&gt;
			WHERE i.bundling_id = ? &lt;br/&gt;
			ORDER BY i.lft &lt;br/&gt;
		) a2 &#61663; !!!!!!  &lt;br/&gt;
	) b &lt;/p&gt;

&lt;p&gt;&#8222;a&quot; is selected but the alias has been changed to &#8222;a2&quot; and this will cause an sql error.&lt;/p&gt;

&lt;p&gt;It looks like that this bug will only raise if a table is used in the subquery which starts with an &quot;a&quot;&lt;/p&gt;</comment>
                    <comment id="11176" author="tom808" created="Fri, 11 Dec 2009 16:47:18 +0000"  >&lt;p&gt;As a workaround i have change &quot;a&quot; to &quot;x&quot; in the Doctrine_Connection_Oracle::_createLimitSubquery()&lt;/p&gt;

&lt;p&gt;As far as no table in our projekt starts with character &quot;x&quot; this works fine for me.&lt;/p&gt;

&lt;p&gt;By the way: Shouldn&apos;t it be $this-&amp;gt;quoteIdentifier(&apos;a&apos;) . &apos;.&lt;b&gt;&apos; instead of just a.&lt;/b&gt; ??&lt;/p&gt;

&lt;p&gt;original code:&lt;br/&gt;
                    $query = &apos;SELECT b.&apos;.$column.&apos; FROM ( &apos;.&lt;br/&gt;
                                 &apos;SELECT a.*, ROWNUM AS doctrine_rownum FROM ( &apos;&lt;br/&gt;
                                   . $query . &apos; ) &apos; . $this-&amp;gt;quoteIdentifier(&apos;a&apos;) . &apos; &apos;.&lt;br/&gt;
                              &apos; ) &apos; . $this-&amp;gt;quoteIdentifier(&apos;b&apos;) . &apos; &apos;.&lt;br/&gt;
                              &apos;WHERE doctrine_rownum BETWEEN &apos; . $min .  &apos; AND &apos; . $max;&lt;/p&gt;

&lt;p&gt;modified code:&lt;br/&gt;
                    $query = &apos;SELECT b.&apos;.$column.&apos; FROM ( &apos;.&lt;br/&gt;
                                 &apos;SELECT x.*, ROWNUM AS doctrine_rownum FROM ( &apos;&lt;br/&gt;
                                   . $query . &apos; ) &apos; . $this-&amp;gt;quoteIdentifier(&apos;x&apos;) . &apos; &apos;.&lt;br/&gt;
                              &apos; ) &apos; . $this-&amp;gt;quoteIdentifier(&apos;b&apos;) . &apos; &apos;.&lt;br/&gt;
                              &apos;WHERE doctrine_rownum BETWEEN &apos; . $min .  &apos; AND &apos; . $max;&lt;/p&gt;</comment>
                    <comment id="13195" author="jwage" created="Tue, 8 Jun 2010 15:01:45 +0000"  >&lt;p&gt;Can you provide the change that fixes the problem for you as a diff so we can test it?&lt;/p&gt;</comment>
                    <comment id="13244" author="tom808" created="Wed, 9 Jun 2010 03:37:49 +0000"  >&lt;p&gt;Hi Jon,&lt;/p&gt;

&lt;p&gt;long time with no hear from you. Hope you are well!&lt;/p&gt;

&lt;p&gt;I am sorry, we did not fix this bug really. As writte above we have just implemented a work around by choosing a different character (&quot;x&quot; instead of &quot;a&quot;) for the name of the generated sub query alias. This works fine with our data model (no table starts with &quot;x&quot;) but may cause the same error with other data models.&lt;/p&gt;

&lt;p&gt;At all: There was too much trouble in this project last year. Due to this we made the decision to go ahead with pdo_oci to finish the project in time.&lt;/p&gt;

&lt;p&gt;Kind regards&lt;br/&gt;
Thomas&lt;/p&gt;</comment>
                    <comment id="13254" author="jwage" created="Wed, 9 Jun 2010 13:02:31 +0000"  >&lt;p&gt;I&apos;ll leave this open if someone runs across the same problem, a test case showing the issue would help with pin pointing the problem area in the code.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-275] Mysql Schema Manager does not correctly detect Decimal + bug fix from me</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-275</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Mysql Schema Manager does not correctly detect Decimal. Lost decimal scale!&lt;/p&gt;

&lt;p&gt;bug in file Doctrine/DataDict/Mysql.php&lt;/p&gt;

&lt;p&gt;on line 263&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($field[&apos;length&apos;])) {
            $length = $field[&apos;length&apos;];
            $decimal = &apos;&apos;;
        } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
            $length = strtok(&apos;(), &apos;);
            $decimal = strtok(&apos;(), &apos;) ? strtok(&apos;(), &apos;):&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;    &lt;span class=&quot;code-comment&quot;&gt;// &amp;lt;--- here strtok call 2 times! (line 263)
&lt;/span&gt;        }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;must be like that&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (isset($field[&apos;length&apos;])) {
            $length = $field[&apos;length&apos;];
            $decimal = &apos;&apos;;
        } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
            $length = strtok(&apos;(), &apos;);
            $decimal = strtok(&apos;(), &apos;);
            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ( ! $decimal ) { &lt;span class=&quot;code-comment&quot;&gt;// or &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt; === $decimal
&lt;/span&gt;                $decimal = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
            }
        }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Please fix it &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;</description>
                <environment></environment>
            <key id="10486">DC-275</key>
            <summary>Mysql Schema Manager does not correctly detect Decimal + bug fix from me</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="setor">Sergei Kuznetsov</reporter>
                        <labels>
                    </labels>
                <created>Sat, 21 Nov 2009 12:51:25 +0000</created>
                <updated>Wed, 25 Nov 2009 08:57:17 +0000</updated>
                    <resolved>Tue, 24 Nov 2009 21:15:22 +0000</resolved>
                            <version>1.2.0-BETA3</version>
                                <fixVersion>1.2.0</fixVersion>
                                <component>Import/Export</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="10812" author="setor" created="Sat, 21 Nov 2009 12:54:42 +0000"  >&lt;p&gt;Code formating fix&lt;/p&gt;</comment>
                    <comment id="10850" author="jwage" created="Tue, 24 Nov 2009 21:07:06 +0000"  >&lt;p&gt;Sorry I don&apos;t understand your change at all &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; Can you explain what you&apos;re doing? I am confused by this whole block of code:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;            $length = strtok(&apos;(), &apos;);
            $decimal = strtok(&apos;(), &apos;) ? strtok(&apos;(), &apos;):&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Won&apos;t that always have the same result? Shouldn&apos;t it be..&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;            $length = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
            $decimal = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="10851" author="jwage" created="Tue, 24 Nov 2009 21:13:34 +0000"  >&lt;p&gt;Nevermind after testing that won&apos;t work. Can you explain to me what you&apos;re change is doing?&lt;/p&gt;</comment>
                    <comment id="10852" author="jwage" created="Tue, 24 Nov 2009 21:15:22 +0000"  >&lt;p&gt;Ok I think I understand now. Can you comment and confirm what the change is doing.&lt;/p&gt;</comment>
                    <comment id="10861" author="setor" created="Wed, 25 Nov 2009 08:57:17 +0000"  >&lt;p&gt;Ok, see:&lt;/p&gt;

&lt;p&gt;original code:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$decimal = strtok(&apos;(), &apos;) ? strtok(&apos;(), &apos;):&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;    &lt;span class=&quot;code-comment&quot;&gt;// &amp;lt;--- here strtok call 2 times! (line 263)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;strtok call 2 times and after two call $decimal always === false&lt;/p&gt;

&lt;p&gt;fix:&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;$decimal = strtok(&apos;(), &apos;); 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;now strtok call 1 times and $decimal have valid value!&lt;/p&gt;

&lt;p&gt;and this code check strtok return result&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ( ! $decimal ) { &lt;span class=&quot;code-comment&quot;&gt;// or &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt; === $decimal
&lt;/span&gt;                $decimal = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
            } 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-272] levelColumnName for nested sets is ignored</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-272</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Option &quot;levelColumnName&quot; is used to set the name of the level column but the option is ignored&lt;/p&gt;

&lt;p&gt;The following code needs to be added in __construct() of Doctrine_Tree_NestedSet&lt;/p&gt;

&lt;p&gt;$options&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;levelColumnName&amp;#39;&amp;#93;&lt;/span&gt; = isset($options&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;levelColumnName&amp;#39;&amp;#93;&lt;/span&gt;) ? $options&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;levelColumnName&amp;#39;&amp;#93;&lt;/span&gt; : false; &lt;/p&gt;</description>
                <environment>Linux, Oracle 10g</environment>
            <key id="10477">DC-272</key>
            <summary>levelColumnName for nested sets is ignored</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="tom808">Thomas Wahle</reporter>
                        <labels>
                    </labels>
                <created>Fri, 20 Nov 2009 14:38:29 +0000</created>
                <updated>Tue, 24 Nov 2009 21:18:45 +0000</updated>
                    <resolved>Tue, 24 Nov 2009 21:18:45 +0000</resolved>
                            <version>1.2.0-BETA3</version>
                                <fixVersion>1.2.0</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="10853" author="jwage" created="Tue, 24 Nov 2009 21:18:45 +0000"  >&lt;p&gt;This is invalid. The code is not needed and it works fine without it.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-271] Doctrine_Record link many many</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-271</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;When saving the generated user form of sfGuardDoctrinePlugin 3.0.0 with a related many many object(s), such as groups or permissions, is/are selected, the script dies in Doctrine_Record line 2501 of R6780. Apparently public property access of the relation does not return a Doctrine_Collection object .&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;Doctrine_Record.php&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function link($alias, $ids, $now = &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    {
            &lt;span class=&quot;code-comment&quot;&gt;//... some code
&lt;/span&gt;            foreach ($records as $record) {
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;$alias &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; Doctrine_Record) {
                    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;$alias = $record;
                } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
                    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;$alias-&amp;gt;add($record); &lt;span class=&quot;code-comment&quot;&gt;//fails here
&lt;/span&gt;                }
            }
            &lt;span class=&quot;code-comment&quot;&gt;//... more code
&lt;/span&gt;    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;So I used this workaround as a temporary measure.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;ProjectConfiguration.php&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
  &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function setup()
  {
    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;enablePlugins(
      &apos;sfDoctrinePlugin&apos;, 
      &apos;sfDoctrineGuardPlugin&apos;
    );
    
    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;dispatcher-&amp;gt;connect(&apos;doctrine.filter_model_builder_options&apos;, array($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;, &apos;doctrineFilterModelBuilderOptions&apos;));    
  }
  
  &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function doctrineFilterModelBuilderOptions(sfEvent $event, $options)
  {
  	$options[&apos;baseClassName&apos;] = &apos;myDoctrineRecord&apos;;
  	
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $options;
  }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Notice that I only changed the access from property access to array access.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;myDoctrineRecord.php&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function link($alias, $ids, $now = &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;)
    {
            &lt;span class=&quot;code-comment&quot;&gt;//... some code
&lt;/span&gt;            foreach ($records as $record) {
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;$alias &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; Doctrine_Record) {
                    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;$alias = $record;
                } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
                    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;[$alias]-&amp;gt;add($record); &lt;span class=&quot;code-comment&quot;&gt;//works &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; me
&lt;/span&gt;                }
            }
            &lt;span class=&quot;code-comment&quot;&gt;//... more code
&lt;/span&gt;    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; </description>
                <environment>php 5.3, win xp sp3/fc4</environment>
            <key id="10475">DC-271</key>
            <summary>Doctrine_Record link many many</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="marfillaster">Ken Marfilla</reporter>
                        <labels>
                    </labels>
                <created>Fri, 20 Nov 2009 07:16:57 +0000</created>
                <updated>Tue, 24 Nov 2009 21:30:44 +0000</updated>
                    <resolved>Tue, 24 Nov 2009 21:30:44 +0000</resolved>
                            <version>1.2.0-BETA3</version>
                                <fixVersion>1.2.0</fixVersion>
                                <component>Record</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="10821" author="colin.darie" created="Mon, 23 Nov 2009 16:14:45 +0000"  >&lt;p&gt;I confirm this issue, and the following line solves it for me too (on a symfony 1.4 project)&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;Doctrine_Record.php, line 2503&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt; 
$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;[$alias]-&amp;gt;add($record);
&lt;span class=&quot;code-comment&quot;&gt;//instead of
&lt;/span&gt;$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;$alias-&amp;gt;add($record);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-233] Versionable behavior should specify relation alias</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-233</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;I18n behavior sets a nice name for the relation to the translation table, so why Versionable behavior doesn&apos;t do the same?&lt;/p&gt;

&lt;p&gt;&lt;del&gt;Proposed patch is not only repeats this behavior, but also allows the user to specify custom name for the relation.&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;See also &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-227&quot; title=&quot;Versionable with column aggregation lead to multiple version tables&quot;&gt;&lt;del&gt;DC-227&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="10418">DC-233</key>
            <summary>Versionable behavior should specify relation alias</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="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="esycat">Eugene Janusov</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 Nov 2009 06:30:24 +0000</created>
                <updated>Tue, 24 Nov 2009 20:56:51 +0000</updated>
                    <resolved>Tue, 24 Nov 2009 20:56:51 +0000</resolved>
                            <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>
                                <fixVersion>1.2.0</fixVersion>
                                <component>Behaviors</component>
                <component>Relations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="10644" author="esycat" created="Mon, 16 Nov 2009 06:34:19 +0000"  >&lt;p&gt;Proposed patch attached.&lt;/p&gt;</comment>
                    <comment id="10765" author="esycat" created="Thu, 19 Nov 2009 03:51:17 +0000"  >&lt;p&gt;Jonathan,&lt;/p&gt;

&lt;p&gt;Why don&apos;t you like this change? Regardless of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-227&quot; title=&quot;Versionable with column aggregation lead to multiple version tables&quot;&gt;&lt;del&gt;DC-227&lt;/del&gt;&lt;/a&gt;, the ability to specify relation alias for the versioning table would be useful.&lt;/p&gt;</comment>
                    <comment id="10819" author="esycat" created="Sun, 22 Nov 2009 23:53:00 +0000"  >&lt;p&gt;Attached version 2 of the patch with hardcoded relation alias.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10160" name="DC-233.patch" size="1006" author="esycat" created="Mon, 16 Nov 2009 06:55:13 +0000" />
                    <attachment id="10180" name="DC-233.v2.patch" size="522" author="esycat" created="Sun, 22 Nov 2009 23:53:00 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>