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

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

<item>
            <title>[DC-852] CLONE -Fix returned type value : SQL integers to PHP integers when getting a value from the database.</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-852</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Hi Jon,&lt;/p&gt;

&lt;p&gt;I have a request for you to improve Doctrine. When declaring a column as an integer, it seems that Doctrine returns a string when getting the value of that column. For example, if I have a &quot;status&quot; column, which can take 0, 1 or 2 as its value, Doctrine will return these values as string, which is not really logical and returning the good PHP type is the goal of an ORM. I&apos;m fond of the triple equal symbol to test a value and I did not understand why this did not work at start :&lt;/p&gt;

&lt;p&gt;// in my myModel class&lt;br/&gt;
class myModel extends Doctrine_Record&lt;br/&gt;
{&lt;br/&gt;
  const STATUS_VALIDATED = 1;&lt;/p&gt;

&lt;p&gt;  public function isValidated()&lt;/p&gt;
  {
    return self::STATUS_VALIDATED === $this-&amp;gt;getStatus();
  }
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;That&apos;s why getStatus() gives me a string instead of an integer, whereas the column is declared as an integer in my schema. I&apos;m forced to cast myself the returned value of getStatus() in my model.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11863">DC-852</key>
            <summary>CLONE -Fix returned type value : SQL integers to PHP integers when getting a value from the database.</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="enrico">Enrico Stahn</reporter>
                        <labels>
                    </labels>
                <created>Wed, 1 Sep 2010 08:19:12 +0000</created>
                <updated>Thu, 2 Sep 2010 08:11:23 +0000</updated>
                                    <version>1.2.3</version>
                                <fixVersion>1.2.4</fixVersion>
                                <component>Attributes</component>
                <component>Data Fixtures</component>
                <component>Native SQL</component>
                <component>Query</component>
                <component>Record</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14214" author="enrico" created="Wed, 1 Sep 2010 11:38:05 +0000"  >&lt;p&gt;Proposal for a solution: &lt;a href=&quot;http://github.com/estahn/doctrine1/compare/master...DC-852&quot; class=&quot;external-link&quot;&gt;http://github.com/estahn/doctrine1/compare/master...DC-852&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="14225" author="jwage" created="Wed, 1 Sep 2010 14:46:04 +0000"  >&lt;p&gt;So if you enable this attribute you live with the fact that casting a string to an integer that is longer than php max integer will give weird results?&lt;/p&gt;</comment>
                    <comment id="14235" author="enrico" created="Thu, 2 Sep 2010 08:11:23 +0000"  >&lt;p&gt;i&apos;m far from happy with this solution. if an integer that is greater than php max int gets casted it will be casted into a value of type double. if you enable that attribute only values that could successfully casted into an integer will be casted otherwise an exception will be thrown.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>