[JIRA] Commented: (ACTIVERECORD_JDBC-22) undefined method `new_date' for JdbcSpec::Oracle::Column:Module
- From: "fmchale (JIRA)" <jira-no-reply@kenai.com>
- To: issues@activerecord-jdbc.kenai.com
- Subject: [JIRA] Commented: (ACTIVERECORD_JDBC-22) undefined method `new_date' for JdbcSpec::Oracle::Column:Module
- Date: Fri, 12 Mar 2010 05:51:37 +0000 (GMT+00:00)
[
http://kenai.com/jira/browse/ACTIVERECORD_JDBC-22?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48881#action_48881
]
fmchale commented on ACTIVERECORD_JDBC-22:
------------------------------------------
Any word on this one? Its basically a show stopper unless I use the code in
the above comment.
> undefined method `new_date' for JdbcSpec::Oracle::Column:Module
> ---------------------------------------------------------------
>
> Key: ACTIVERECORD_JDBC-22
> URL: http://kenai.com/jira/browse/ACTIVERECORD_JDBC-22
> Project: activerecord-jdbc
> Issue Type: Bug
> Components: Oracle
> Affects Versions: 0.9.1
> Environment: jruby 1.3.1 (ruby 1.8.6p287) (2009-06-15 2fd6c3d)
> (Java HotSpot(TM) Client VM 1.5.0_19) [i386-java]
> Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
> Reporter: jenshimmelreich
> Original Estimate: 2 hours
> Remaining Estimate: 2 hours
>
> new_date is invisible in JdbcSpec::Oracle::Column:Module:
> def self.guess_date_or_time(value)
> (value.hour == 0 && value.min == 0 && value.sec == 0) ?
> new_date(value.year, value.month, value.day) : value
> end
> We got the following stacktrace:
> NoMethodError: undefined method `new_date' for
> JdbcSpec::Oracle::Column:Module
> /Users/jens/Development/jruby/jruby-1.3.1/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9.1/lib/jdbc_adapter/jdbc_oracle.rb:59:in
> `string_to_time'
>
> /Users/jens/Development/jruby/jruby-1.3.1/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9.1/lib/jdbc_adapter/jdbc_oracle.rb:43:in
> `type_cast'
> test/unit/oracle_Konnector_test.rb:21:in `test_default_number_precision'
> /Applications/RubyMine
> 1.1.app/rb/testing/patch/test/unit/ui/testrunnermediator.rb:36:in
> `run_suite'
> /Applications/RubyMine
> 1.1.app/rb/testing/patch/test/unit/ui/teamcity/testrunner.rb:69:in
> `start_mediator'
> /Applications/RubyMine
> 1.1.app/rb/testing/patch/test/unit/ui/teamcity/testrunner.rb:57:in `start'
> The Test was:
> require 'test_helper'
> class TestKlass < ActiveRecord::Base
> set_table_name "default_number"
> end
> class OracleKonnektorTest < Test::Unit::TestCase
> def setup
> ActiveRecord::Base.connection.execute "CREATE TABLE DEFAULT_NUMBER
> (VALUE INTEGER, DATUM DATE)"
> ActiveRecord::Base.connection.execute "INSERT INTO DEFAULT_NUMBER
> (VALUE,DATUM) VALUES (1,'13.05.2009')"
> end
> def teardown
> ActiveRecord::Base.connection.execute "DROP TABLE DEFAULT_NUMBER"
> end
> def test_default_number_precision
> obj = TestKlass.find :first
> assert_equal 1, obj.value
> assert_not_nil obj.datum
> end
> end
> A solution will be to inline the intendet method from
> ActiveRecord::ConnectionAdapters::Column
--
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-22) undefined method `new_date' for JdbcSpec::Oracle::Column:Module |
fmchale (JIRA) | 03/12/2010 |





