<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Fri May 24 06:03:34 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+DC+AND+resolution+%3D+Unresolved+AND+fixVersion+%3D+%221.2.1%22+ORDER+BY+priority+DESC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://www.doctrine-project.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Doctrine Project</title>
        <link>http://www.doctrine-project.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+DC+AND+resolution+%3D+Unresolved+AND+fixVersion+%3D+%221.2.1%22+ORDER+BY+priority+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="3" total="3"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DC-674] NULL Dates are translated to &apos;0000-00-00&apos; after upgrading to 1.2.2</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-674</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Once the upgrade was done from Doctrine 1.2.1 to 1.2.2 we discovered that date related issues started to appear.&lt;br/&gt;
With dates that are persisted in DB as NULL are translated to &quot;0000-00-00&quot; when retrieved from DB. This has occurred in multiple places and is quite worrying as there is a lot of dates in our project. This means that everywhere in our codebase where we check a datevalue in our Models is NULL we need also to check for the string literal &quot;0000-00-00&quot;.&lt;/p&gt;
</description>
                <environment>Zend Framework, Ubuntu 9.10, MySQL </environment>
            <key id="11343">DC-674</key>
            <summary>NULL Dates are translated to &apos;0000-00-00&apos; after upgrading to 1.2.2</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="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="villeit">Ville It&#228;maa</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 May 2010 07:59:54 +0000</created>
                <updated>Wed, 6 Oct 2010 06:29:40 +0000</updated>
                                    <version>1.2.1</version>
                <version>1.2.2</version>
                                <fixVersion>1.2.1</fixVersion>
                <fixVersion>1.2.2</fixVersion>
                                <component>Behaviors</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="12895" author="jwage" created="Mon, 10 May 2010 12:19:21 +0000"  >&lt;p&gt;Are you able to reproduce this in a test case?&lt;/p&gt;</comment>
                    <comment id="12909" author="villeit" created="Tue, 11 May 2010 04:54:06 +0000"  >&lt;p&gt;We reverted to Doctrine 1.2.1 after realising the bug to confirm it was Doctrine 1.2.2 that was the cause for the problem. And as a result the records with NULL dates in the DB became NULL in the Models.&lt;br/&gt;
But when using Doctrine 1.2.2, the NULL dates became &apos;0000-00-00&apos; in the Models.&lt;br/&gt;
I don&apos;t have any other way to reproduce this error.&lt;/p&gt;</comment>
                    <comment id="12912" author="jwage" created="Tue, 11 May 2010 08:06:09 +0000"  >&lt;p&gt;Were you able to identity which changeset it was? You can read about creating test cases here &lt;a href=&quot;http://www.doctrine-project.org/documentation/manual/1_2/en/unit-testing&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/documentation/manual/1_2/en/unit-testing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So far I am not able to reproduce the error you described.&lt;/p&gt;</comment>
                    <comment id="13212" author="jwage" created="Tue, 8 Jun 2010 16:54:48 +0000"  >&lt;p&gt;I&apos;d like to fix this. Did you ever figure out which changeset introduced the issue? I&apos;ve been trying to figure it out myself.&lt;/p&gt;</comment>
                    <comment id="14535" author="hroland" created="Wed, 6 Oct 2010 06:29:30 +0000"  >&lt;p&gt;With 1.2.3 this works for me fine with both TIMESTAMP and DATE fields.&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;YAML

        date_of_birth:
            type: date

BASE MODEL

        $this-&amp;gt;hasColumn(&apos;date_of_birth&apos;, &apos;date&apos;, null, array(
             &apos;type&apos; =&amp;gt; &apos;date&apos;,

             // try these two
             // &apos;notnull&apos; =&amp;gt; false,
             // &apos;default&apos; =&amp;gt; null
         ));
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;YAML

        exported_at:
            type: timestamp(25)
            notnull: false
            default: null

            # in this model I have everything to make sure it accepts and defaults to NULL

BASE MODEL

        $this-&amp;gt;hasColumn(&apos;exported_at&apos;, &apos;timestamp&apos;, 25, array(
             &apos;type&apos; =&amp;gt; &apos;timestamp&apos;,
             &apos;notnull&apos; =&amp;gt; false,
             &apos;length&apos; =&amp;gt; &apos;25&apos;,
             ));
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You may try adding these to your YAML and (base) models&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;
YAML

    fieldname:
         . . .
        notnull: false
        default: null

BASE MODEL

        $this-&amp;gt;hasColumn(&apos;fieldname&apos;, . . .
             . . .
             &apos;notnull&apos; =&amp;gt; false, // &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;
             // &apos;default&apos; =&amp;gt; null, // &amp;lt;&amp;lt;&amp;lt; maybe, probably not needed
             ));

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I hope it helps.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-553] issue when changing the connection inside Doctrine_Query::preQuery() on a model using a behavior</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-553</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;We were following:&lt;br/&gt;
&lt;a href=&quot;http://www.doctrine-project.org/documentation/cookbook/1_1/en/master-and-slave-connections&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/documentation/cookbook/1_1/en/master-and-slave-connections&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;class MyQuery extends Doctrine_Query&lt;br/&gt;
{&lt;br/&gt;
    // Since php doesn&apos;t support late static binding in 5.2 we need to override&lt;br/&gt;
    // this method to instantiate a new MyQuery instead of Doctrine_Query&lt;br/&gt;
    public static function create($conn = null)&lt;/p&gt;
    {
        return new MyQuery($conn);
    }

&lt;p&gt;    public function preQuery()&lt;br/&gt;
    {&lt;br/&gt;
        // If this is a select query then set connection to one of the slaves&lt;br/&gt;
        if ($this-&amp;gt;getType() == Doctrine_Query::SELECT) &lt;/p&gt;
{
            $this-&amp;gt;_conn = Doctrine_Manager::getInstance()-&amp;gt;getConnection(&apos;slave_&apos; . rand(1, 4));
        // All other queries are writes so they need to go to the master
        }
&lt;p&gt; else &lt;/p&gt;
{
            $this-&amp;gt;_conn = Doctrine_Manager::getInstance()-&amp;gt;getConnection(&apos;master&apos;);
        }
&lt;p&gt;    }&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;However we are actually forcing all queries after the first access to the master to be run against the master (including selects). Note the example should probably be changed to use setConnection(). However even when using setConnection() it seems like changing the connection can cause issues when running a select on a model with a behavior (in our case we were using i18n). Therefore we believe there is some issue that is caused through the event system, because otherwise queries work just fine even when changing the connection as per the above described code.&lt;/p&gt;

&lt;p&gt;We managed to fix things, by not setting the connection explicitly and instead simply using setCurrentConnection(&apos;master&apos;), so the bug does not affect us anymore. However this seems to indicate some issues deep inside the event-behavior-template code.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11006">DC-553</key>
            <summary>issue when changing the connection inside Doctrine_Query::preQuery() on a model using a behavior</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="lsmith">Lukas Kahwe</reporter>
                        <labels>
                    </labels>
                <created>Mon, 8 Mar 2010 11:18:28 +0000</created>
                <updated>Mon, 19 Jul 2010 07:45:41 +0000</updated>
                                                    <fixVersion>1.2.1</fixVersion>
                                <component>Behaviors</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="12056" author="seldaek" created="Mon, 8 Mar 2010 11:26:13 +0000"  >&lt;p&gt;In case the above post is confusing, note that doing $this-&amp;gt;_conn = masterconn worked fine for the INSERT, it just broke when doing a subsequent SELECT  of a translateable (I18n behavior) model and its Translation table with the following exception:&lt;/p&gt;

&lt;p&gt;Exception (Exception): Unknown relation alias Translation (#0)&amp;lt;/h1&amp;gt;thrown in file /Library/WebServer/Documents/liip/infocube/ext/db-doctrine/lib/Doctrine/Relation/Parser.php at line 237&lt;br/&gt;
backtrace:&lt;br/&gt;
#1 Doctrine_Relation_Parser-&amp;gt;getRelation called in file /Library/WebServer/Documents/liip/infocube/ext/db-doctrine/lib/Doctrine/Relation/Parser.php at line 235&lt;/p&gt;</comment>
                    <comment id="12230" author="jwage" created="Mon, 15 Mar 2010 16:12:31 +0000"  >&lt;p&gt;It is hard to understand the issue, can you provide a test case?&lt;/p&gt;</comment>
                    <comment id="12241" author="lsmith" created="Mon, 15 Mar 2010 16:27:01 +0000"  >&lt;p&gt;We already spend well over 2 hours together on project time to find a work around as noted above and I must admit now our motivation is not so big to dig deeper, especially since we didn&apos;t find the cause in this time and have the feeling its pretty impossible to fix without huge risks.&lt;/p&gt;

&lt;p&gt;Essentially I think all you need to do to reproduce the issue is use the cookbook code &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/star_yellow.gif&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; and issue some write query and afterwards do a select on a model that has the translatable behavior. It then gave us the above Exception.&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/star_yellow.gif&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; Our code worked slightly different since we did not use a random slave, instead we always used a local slave by default, but the first write and any queries thereafter would get send to the master. The code is public and the diff&apos;s show what we had to change to get things working. Note that the slave &quot;localhost&quot; connection was the default connection:&lt;br/&gt;
&lt;a href=&quot;http://fisheye.liip.ch/browse/PUB/okapi2/ext/db-doctrine/trunk/inc/DQ.php?r1=13118&amp;amp;r2=&quot; class=&quot;external-link&quot;&gt;http://fisheye.liip.ch/browse/PUB/okapi2/ext/db-doctrine/trunk/inc/DQ.php?r1=13118&amp;amp;r2=&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://fisheye.liip.ch/browse/PUB/okapi2/ext/db-doctrine/trunk/inc/DR.php?r1=13118&amp;amp;r2=&quot; class=&quot;external-link&quot;&gt;http://fisheye.liip.ch/browse/PUB/okapi2/ext/db-doctrine/trunk/inc/DR.php?r1=13118&amp;amp;r2=&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="13348" author="lsmith" created="Thu, 17 Jun 2010 05:38:01 +0000"  >&lt;p&gt;we thought we had the issue fixed but ran into another issue today. we then noticed that the issue goes away if we just copy the $tables property from the old connection to the new connection. there is a getTables() method, but there is only a addTable() method, would be nice to have a addTables() method that is faster. or maybe a switchFrom() method that accepts the old connection and does whatever it needs to.&lt;/p&gt;

&lt;p&gt;And again it would be nice to update the cookbook entry.&lt;br/&gt;
Here are our updated Doctrine_Query and Doctrine_Record classes:&lt;br/&gt;
&lt;a href=&quot;http://fisheye.liip.ch/browse/PUB/okapi2/ext/db-doctrine/trunk/inc/DQ.php&quot; class=&quot;external-link&quot;&gt;http://fisheye.liip.ch/browse/PUB/okapi2/ext/db-doctrine/trunk/inc/DQ.php&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://fisheye.liip.ch/browse/PUB/okapi2/ext/db-doctrine/trunk/inc/DR.php&quot; class=&quot;external-link&quot;&gt;http://fisheye.liip.ch/browse/PUB/okapi2/ext/db-doctrine/trunk/inc/DR.php&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="13598" author="seldaek" created="Mon, 19 Jul 2010 07:45:41 +0000"  >&lt;p&gt;We just had another funny debugging session related to this. It turns out that the Table objects have a relation to the connection, and if you query a new model that wasn&apos;t initialized yet using -&amp;gt;from(), it works because it just gets the current connection passed. However, if you query a new model within a JOIN, then it apparently takes the connection from the related model you&apos;re joining from. In our case, the related model was already initialized but had an instance of the old (slave) connection, and so the new model was initialized using the wrong connection, and then the DQL parser exploded trying to resolve relations.&lt;/p&gt;

&lt;p&gt;Long story short, adding $table-&amp;gt;setConnection($conn); to all tables while switching to the master connection resolved it. The code is updated and you can still view it at the above URLs, or straight in the SVN repo at &lt;a href=&quot;http://svn.liip.ch/repos/public/okapi2/ext/db-doctrine/trunk/inc/DQ.php&quot; class=&quot;external-link&quot;&gt;http://svn.liip.ch/repos/public/okapi2/ext/db-doctrine/trunk/inc/DQ.php&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-769] Variable type different for return value from Doctrine_Record-&gt;toArray() depending on whether the object is from a select, or a save.</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-769</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;With a object that is created via a save(),  and the record&apos;s primary key is a INT fed by a SEQUENCE, the type of the variable is an INT.&lt;/p&gt;

&lt;p&gt;With an object that is hydrated from the database via a SELECT, the record&apos;s primary key INT will come back in &apos;toArray()&apos; as a STRING.&lt;/p&gt;

&lt;p&gt;That means that checking for type has to know what context it came from, user, INSERT, or SELECT. Not fun.&lt;/p&gt;

&lt;p&gt;This also screws up converting arrays to JSON, &apos;cause the STRINGS get quotation marks and the INTS do not.&lt;/p&gt;

&lt;p&gt;As a general rule, everything FROM the database seems to be strings. Yes, I know, everything &apos;on the wire&apos; or &apos;through a socket&apos; comes out as text. And it&apos;s a lot faster to leave it that way.&lt;/p&gt;

&lt;p&gt;But having the type be different depending on the database operation? Not sure I like that.&lt;/p&gt;</description>
                <environment>Ubuntu9.10, PHP 5.2.6, Symfony 1.4.1, Postgres8.4</environment>
            <key id="11557">DC-769</key>
            <summary>Variable type different for return value from Doctrine_Record-&gt;toArray() depending on whether the object is from a select, or a save.</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="gearond">Dennis Gearon</reporter>
                        <labels>
                    </labels>
                <created>Sun, 27 Jun 2010 00:55:48 +0000</created>
                <updated>Tue, 24 Aug 2010 12:55:48 +0000</updated>
                                    <version>1.2.1</version>
                                <fixVersion>1.2.1</fixVersion>
                <fixVersion>1.2.2</fixVersion>
                <fixVersion>1.2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14050" author="jwage" created="Tue, 24 Aug 2010 12:02:06 +0000"  >&lt;p&gt;Can you provide a test case so that we can see if we can come up with a patch?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>