Example as follows:
require 'rubygems'
require 'sequel'
Sequel::Model.unrestrict_primary_key
DB = Sequel.sqlite
class Foobar < Sequel::Model
set_schema do
integer :some_id
integer :some_id2
primary_key [:some_id, :some_id2]
end
end
Foobar.create_table unless Foobar.table_exists?
Foobar.new(:some_id => 1, :some_id2 => 2).save
Using sequel version 2.4.0 the script would terminate normally. After
upgrading to 2.5.0 it throws the following exception:
/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2/lib/sqlite3/errors.rb:62:in
`check': SQLite3::SQLException no such column: id (Sequel::DatabaseError)
It does the same if using pgsql instead of sqlite. When using a primary
key like this, does it need to be defined in a different way?
Thanks for all the help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---