jdbcsqlite3 adapter does not respect default parameter
------------------------------------------------------

                 Key: JRUBY-2700
                 URL: http://jira.codehaus.org/browse/JRUBY-2700
             Project: JRuby
          Issue Type: Bug
          Components: ActiveRecord-JDBC
    Affects Versions: JRuby 1.1.2
         Environment: OS X 10.5.3, JRuby r7022, Rails 2.1.0, 
activerecord-jdbc-adapter 0.8.2, activerecord-jdbc-sqlite3-adapter 0.8.1 
jdbc-sqlite3 3.5.8
            Reporter: Hiro Asari
            Priority: Minor


Assume a Model class created by migration such as this:

class CreateModels < ActiveRecord::Migration
  def self.up
    create_table :models do |t|
      t.column :prop, :string, :default => ''
      
      t.timestamps
    end
  end

  def self.down
    drop_table :models
  end
end


This will yield:

$ jruby script/console 
Loading development environment (Rails 2.1.0)
>> m=Model.new
=> #<Model id: nil, prop: nil, created_at: nil, updated_at: nil>


The same model, with MRI 1.8.6-p111, Rails 2.1.0, sqlite3-ruby 1.2.1, yields:

$ ruby script/console 
Loading development environment (Rails 2.1.0)
>> m=Model.new
=> #<Model id: nil, prop: "", created_at: nil, updated_at: nil>


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