ActiveRecord#columns-Problem with Oracle 11
-------------------------------------------

                 Key: JRUBY-3675
                 URL: http://jira.codehaus.org/browse/JRUBY-3675
             Project: JRuby
          Issue Type: Bug
          Components: ActiveRecord-JDBC
    Affects Versions: ActiveRecord-JDBC-0.9.1
         Environment: java version "1.6.0_0"
IcedTea6 1.3.1 (6b12-0ubuntu6.4) Runtime Environment (build 1.6.0_0-b12)
rails (2.3.2)
activerecord (2.3.2)
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production 
            Reporter: Oliver Schwantje
             Fix For: JRuby 1.1.5


We get an exception, when starting instanciating an ActiveRecord-Object.

require 'test_helper'  

class OracleSimpleTest < Test::Unit::TestCase

  def setup
    ActiveRecord::Base.connection.execute "CREATE TABLE DEFAULT_NUMBER (VALUE 
NUMBER, DATUM DATE)"
    ActiveRecord::Base.connection.execute "INSERT INTO DEFAULT_NUMBER 
(VALUE,DATUM) VALUES (0.076,'11.05.09')"
  end

  def teardown
    ActiveRecord::Base.connection.execute "DROP TABLE DEFAULT_NUMBER"
  end

  def test_default_number_precision
    klass = Class.new(ActiveRecord::Base)
    klass.set_table_name "default_number"
    obj = klass.find(:first)
    assert_equal 0.076, obj.value
    assert_not_nil obj.datum, "no date"
  end
end if defined?(JRUBY_VERSION)

The Stacktrace

1) Error:
test_default_number_precision(OracleSimpleTest):
NoMethodError: undefined method `new_date' for JdbcSpec::Oracle::Column:Module
/home/oliver/Dokumente/entwicklung/jruby-1.1.5/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9.1/lib/jdbc_adapter/jdbc_oracle.rb:69:in
 `guess_date_or_time'
/home/oliver/Dokumente/entwicklung/jruby-1.1.5/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9.1/lib/jdbc_adapter/jdbc_oracle.rb:59:in
 `string_to_time'
/home/oliver/Dokumente/entwicklung/jruby-1.1.5/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9.1/lib/jdbc_adapter/jdbc_oracle.rb:43:in
 `type_cast'
/home/oliver/Dokumente/entwicklung/jruby-1.1.5/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/attribute_methods.rb:273:in
 `read_attribute'
/home/oliver/Dokumente/entwicklung/jruby-1.1.5/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/attribute_methods.rb:214:in
 `datum'
/home/oliver/workspaceNetBeans/tools_rezension/test/unit/oracle_simple_test.rb:39:in
 `test_default_number_precision'
/home/oliver/Dokumente/entwicklung/jruby-1.1.5/lib/ruby/1.8/test/unit/testcase.rb:78:in
 `run'
/home/oliver/Dokumente/entwicklung/jruby-1.1.5/lib/ruby/1.8/test/unit/testsuite.rb:34:in
 `run'
/home/oliver/Dokumente/entwicklung/jruby-1.1.5/lib/ruby/1.8/test/unit/testsuite.rb:33:in
 `each'
/home/oliver/Dokumente/entwicklung/jruby-1.1.5/lib/ruby/1.8/test/unit/testsuite.rb:33:in
 `run'
/home/oliver/Dokumente/entwicklung/jruby-1.1.5/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in
 `run_suite'

best regards
Oliver


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

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to