<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Wed May 22 22:41:24 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+10040+AND+labels+%3D+separator&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+10040+AND+labels+%3D+separator</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="1" total="1"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DBAL-345] When inserting decimals into Oracle, getting ORA-01722: invalid number</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-345</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;When I insert decimals into database I get the following error message:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;ORA-01722: invalid number&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Oracle wants decimals (e.g. NUMBER(5,2)) separated by comma instead of a dot. I think the reason is that I use the german version of Windows. I tried to modify the following method of \Doctrine\DBAL\Driver\OCI8\OCI8Statement::bindValue() just for testing of course:&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;public&lt;/span&gt; function bindValue($param, $value, $type = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (is_float($value)) {
            $value = str_replace(&apos;.&apos;, &apos;,&apos;, (string) $value); &lt;span class=&quot;code-comment&quot;&gt;// &amp;lt;--
&lt;/span&gt;        }
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;bindParam($param, $value, $type);
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;With this modification I do not get the error anymore.&lt;br/&gt;
It would be great if a solution could be found. The strange thing is, if I query &quot;SELECT * from nls_database_parameters where PARAMETER=&apos;NLS_NUMERIC_CHARACTERS&apos;&quot; I get &quot;.,&quot; which means that a dot is already used as decimal separator. Maybe Oracle preferes the Locale of the OS?!&lt;br/&gt;
Maybe you could provide a setting which defines what separator should be used for decimals.&lt;/p&gt;

&lt;p&gt;I found some Links that might be interesting regarding this issue:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://docs.oracle.com/cd/E19455-01/806-0169/overview-9/index.html&quot; class=&quot;external-link&quot;&gt;http://docs.oracle.com/cd/E19455-01/806-0169/overview-9/index.html&lt;/a&gt; (Oracle Docs - Decimal and Thousands Separators)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://forums.oracle.com/forums/thread.jspa?threadID=35398&quot; class=&quot;external-link&quot;&gt;https://forums.oracle.com/forums/thread.jspa?threadID=35398&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_options072.htm&quot; class=&quot;external-link&quot;&gt;http://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_options072.htm&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://forums.oracle.com/forums/thread.jspa?threadID=899739&quot; class=&quot;external-link&quot;&gt;https://forums.oracle.com/forums/thread.jspa?threadID=899739&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://symfony-blog.driebit.nl/2010/09/doctrine-and-oracle-under-windows/&quot; class=&quot;external-link&quot;&gt;http://symfony-blog.driebit.nl/2010/09/doctrine-and-oracle-under-windows/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment>Windows 7 (German), Oracle XE 11.2.0, Doctrine 2.2.2, Symfony 2.0.15</environment>
            <key id="14013">DBAL-345</key>
            <summary>When inserting decimals into Oracle, getting ORA-01722: invalid number</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="naitsirch">Christian Stoller</reporter>
                        <labels>
                        <label>decimal</label>
                        <label>number</label>
                        <label>oracle</label>
                        <label>separator</label>
                    </labels>
                <created>Tue, 4 Sep 2012 10:06:27 +0000</created>
                <updated>Mon, 17 Sep 2012 10:23:27 +0000</updated>
                    <resolved>Mon, 17 Sep 2012 10:23:27 +0000</resolved>
                            <version>2.2.2</version>
                                <fixVersion>2.3</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="18595" author="naitsirch" created="Tue, 4 Sep 2012 11:45:35 +0000"  >&lt;p&gt;I found out that the database session has the parameter &apos;NLS_NUMERIC_CHARACTERS&apos;, too.&lt;br/&gt;
When I query it by the following SQL query:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-sql&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; parameter,value &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; v$nls_parameters &lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; parameter = &apos;NLS_NUMERIC_CHARACTERS&apos;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I get this result:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;,.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;With doctrine I can get the parameter with this (in Symfony2):&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;
$conn = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;getDoctrine()-&amp;gt;getEntityManager()-&amp;gt;getConnection(); /* @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; $conn \Doctrine\DBAL\Connection */
$query = $conn-&amp;gt;executeQuery(&lt;span class=&quot;code-quote&quot;&gt;&quot;SELECT parameter,value FROM v\$nls_parameters WHERE parameter = &apos;NLS_NUMERIC_CHARACTERS&apos;&quot;&lt;/span&gt;); /* @&lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; $query \Doctrine\DBAL\Driver\OCI8\OCI8Statement */
$result = $query-&amp;gt;fetchAll(\PDO::FETCH_ASSOC);
print_r($result);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In this case I get this output:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Array&lt;br/&gt;
(&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; =&amp;gt; Array&lt;br/&gt;
        (&lt;br/&gt;
            &lt;span class=&quot;error&quot;&gt;&amp;#91;PARAMETER&amp;#93;&lt;/span&gt; =&amp;gt; NLS_NUMERIC_CHARACTERS&lt;br/&gt;
            &lt;span class=&quot;error&quot;&gt;&amp;#91;VALUE&amp;#93;&lt;/span&gt; =&amp;gt; ,.&lt;br/&gt;
        )&lt;/p&gt;

&lt;p&gt;)&lt;/p&gt;&lt;/blockquote&gt;


&lt;p&gt;And with&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-sql&quot;&gt;ALTER SESSION SET NLS_NUMERIC_CHARACTERS = &apos;. &apos;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I can change the parameter.&lt;/p&gt;

&lt;p&gt;When I execute the above query before I do my insert with decimal values, everything works as expected &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;br/&gt;
But it would be nicer if I could do that with a configuration.&lt;/p&gt;</comment>
                    <comment id="18602" author="beberlei" created="Wed, 5 Sep 2012 16:56:55 +0000"  >&lt;p&gt;There is an Oci8SessionInitListener inside Doctrine DBAL. It does not yet contain the numeric character change. Can you open a pull request on Github DBAL to add this?&lt;/p&gt;</comment>
                    <comment id="18639" author="naitsirch" created="Thu, 13 Sep 2012 13:47:35 +0000"  >&lt;p&gt;Hi Benjamin.&lt;br/&gt;
I have opened a pull request on Githup: &lt;a href=&quot;https://github.com/doctrine/dbal/pull/197&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/197&lt;/a&gt;&lt;br/&gt;
I hope everything is correct, because this is my first Pull-Request &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/wink.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="18659" author="beberlei" created="Mon, 17 Sep 2012 10:16:09 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-197&amp;#93;&lt;/span&gt; was closed&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/dbal/pull/197&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/197&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>