I have a model based on the Sequel and Oracle adapter:
class Operation < Sequel::Model(DB[:operations]) end
If I try to create a record using the Oracle.nextval sequence as the primary key:
Operation.create( :id=>:nextval.qualify(:Soperations), :payee_id=>12345, :type=>"operation", :origin=>"user-12345", :parameters=>{}.to_s )
I have an error: Sequel::Error: id is a restricted primary key
. What is the correct way to create a record in this case or "match" an Oracle sequence to an id
column? Or maybe I need to use unrestrict_primary_key
?
source share