[JIRA] Commented: (ACTIVERECORD_JDBC-17) Wrong Oracle numeric typecast

  • From: "d_floyd (JIRA)" <jira-no-reply@kenai.com>
  • To: issues@activerecord-jdbc.kenai.com
  • Subject: [JIRA] Commented: (ACTIVERECORD_JDBC-17) Wrong Oracle numeric typecast
  • Date: Mon, 29 Mar 2010 21:46:16 +0000 (GMT+00:00)


    [ 
http://kenai.com/jira/browse/ACTIVERECORD_JDBC-17?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=49660#action_49660
 ] 

d_floyd commented on ACTIVERECORD_JDBC-17:
------------------------------------------

I have the same issue using 9.2.  A fairly good entry on how the Number field 
type works in oracle. Essentriall Number(9,0) is the same as Number(9) .. 
oracle wil round if decimal places are provided.
 
http://it.toolbox.com/blogs/oracle-guide/learn-oracle-datatypes-for-sql-and-plsql-numbers-10673

> Wrong Oracle numeric typecast
> -----------------------------
>
>                 Key: ACTIVERECORD_JDBC-17
>                 URL: http://kenai.com/jira/browse/ACTIVERECORD_JDBC-17
>             Project: activerecord-jdbc
>          Issue Type: Bug
>          Components: Oracle
>    Affects Versions: 0.9.1
>         Environment: JRE 1.5.0_14
> Oracle 10g
> JRuby 1.2.0 / 1.3.0 RC1
> Rails 2.3.2
> ActiveRecord JDBC 0.9.1
>            Reporter: abukovsky
>            Priority: Critical
>
> When running Rails on JRuby against the Oracle database using the JDBC 
> adapter, none of the URL/path generated functions seems to work 
> (model_path, edit_model_path, form_for etc.) The Rails throws a confusing 
> error with given and expected attribute being the same. 
> It's been discovered that the ID column in the model is represented as 
> BigDecimal instead of more logical integer. Following the workaround 
> proposed by Guillaume Desrat in the Ruby Forums, the ID was forced to map 
> to integer and all the issues in Rails disappeared immediately.
> http://www.ruby-forum.com/topic/180358
> Note that there still could be a related issue in Rails itself. The linked 
> post indicates that Rails 2.2.2 worked (although generating invalid ID in 
> the URL). Rails 2.3.2 is breaking completely. The issue has been reported 
> in Rails issue tracker as well (ticket 2643).
> https://rails.lighthouseapp.com/projects/8994/tickets/2643-pathurl-helpers-broken-for-bigdecimal-id
> I'm reporting this issue as critical because it ultimately makes 
> JRuby/Rails/Oracle stack inoperational.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://kenai.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[JIRA] Commented: (ACTIVERECORD_JDBC-17) Wrong Oracle numeric typecast

d_floyd (JIRA) 03/29/2010
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close