Bugs item #23918, was opened at 2009-02-13 14:42
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=23918&group_id=2014
Category: AR-JDBC
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: informix adapter can't handle null value for clob column
Initial Comment:
I have two table that contains clob columns. One doesn't contain null value,
the other does. The one doesn't contain null value will work just fine. The
one contains null value will get the following exception:
>> reports = CnRprtblEvent.find_by_sql("select ei_narr from cn_rprtbl_event")
ActiveRecord::StatementInvalid: ActiveRecord::ActiveRecordError: Can't convert
tonull: select ei_narr from cn_rprtbl_event
from
/opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:188:in
`log'
from
/opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9/lib/active_record/connection_adapters/jdbc_adapter.rb:581:in
`execute'
from
/opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9/lib/jdbc_adapter/jdbc_informix.rb:145:in
`select'
from
/opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9/lib/active_record/connection_adapters/jdbc_adapter.rb:566:in
`jdbc_select_all'
from
/opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in
`select_all_with_query_cache'
from
/opt/local/share/java/jruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:635:in
`find_by_sql'
For the one table that doesn't contain null value for the clob column. It will
work just fine.
Please help and let me know if there is a quick fix that I can do it myself.
Thanks.
----------------------------------------------------------------------
Comment By: Leo Chan (mountainnstream)
Date: 2009-02-13 14:44
Message:
Oh, I forgot to mentioned that I am using release 0.9.
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=23918&group_id=2014
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel