Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Set default session value for NLS_NUMERIC_CHARACTERS (Bugfix for DDC-2013) #197

Merged
merged 1 commit into from

4 participants

@naitsirch

Bugfix DDC-2013 - Default Session Value ".," for "NLS_NUMERIC_CHARACTERS". This is needed because Oracle uses other characters for decimal separation depending on the servers locale.

See http://www.doctrine-project.org/jira/browse/DDC-2013

@leonex-cstoller leonex-cstoller Bugfix DDC-2013 - Default Session Value ".," for "NLS_NUMERIC_CHARACT…
…ERS". This is needed because Oracle uses other characters for decimal separation depending on the servers locale
3a8d714
@guilhermeblanco

I think it should be ",." as most countries utilizes their currency.
Since it's part of OracleSessionInit, you're still able to override the value to use your locale specific currency notation by injecting the parameter to be overwritten.

@naitsirch

Yes, but Doctrine tries to send decimals with dots (e.g. 4.567) to the database and does not look at the systems locale ;-) Another point is that PHP generally handles floats with "."

@beberlei beberlei merged commit 7cb52a3 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 13, 2012
  1. @leonex-cstoller

    Bugfix DDC-2013 - Default Session Value ".," for "NLS_NUMERIC_CHARACT…

    leonex-cstoller authored
    …ERS". This is needed because Oracle uses other characters for decimal separation depending on the servers locale
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php
View
1  lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php
@@ -45,6 +45,7 @@ class OracleSessionInit implements EventSubscriber
'NLS_DATE_FORMAT' => "YYYY-MM-DD HH24:MI:SS",
'NLS_TIMESTAMP_FORMAT' => "YYYY-MM-DD HH24:MI:SS",
'NLS_TIMESTAMP_TZ_FORMAT' => "YYYY-MM-DD HH24:MI:SS TZH:TZM",
+ 'NLS_NUMERIC_CHARACTERS' => ".,",
);
/**
Something went wrong with that request. Please try again.