Saving an empty clob inserts "empty_clob()"
-------------------------------------------

                 Key: JRUBY-2771
                 URL: http://jira.codehaus.org/browse/JRUBY-2771
             Project: JRuby
          Issue Type: Bug
          Components: ActiveRecord-JDBC
    Affects Versions: JRuby 1.1.2
         Environment: ruby 1.8.6 (2008-05-28 rev 6586) [i386-jruby1.1.2], 
activerecord-jdbc-adapter (0.8.2), (Rails 2.0.2), ojdbc14.jar, Oracle Database 
10g Enterprise Edition Release 10.2.0.3.0 - 64bit
            Reporter: Brian Tatnall


Create a table with a clob.

{noformat}
class CreateClobber < ActiveRecord::Migration
  def self.up
    create_table :clobbers do |t|
      t.column :description, :text
    end
  end
end
{noformat}

Run script console and you get some unexpected results.

{noformat}
>> c = Clobber.new
=> #<Clobber id: nil, description: "empty_clob()">
>> c.save
=> true
>> c
=> #<Clobber id: 10060, description: "empty_clob()">
>> c.description
=> "empty_clob()"
{noformat}

Description should be nil (even an empty string would be better) instead of a 
string with value empty_clob().

-- 
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