Module: Sequel::Plugins::HybridTableInheritance::InstanceMethods

Defined in:
lib/sequel/plugins/hybrid_table_inheritance.rb

Instance Method Summary collapse

Instance Method Details

#deleteObject

Delete the row from all backing tables, starting from the most recent table and going through all superclasses.

Raises:

  • (Sequel::Error)


339
340
341
342
343
344
345
# File 'lib/sequel/plugins/hybrid_table_inheritance.rb', line 339

def delete
  raise Sequel::Error, "can't delete frozen object" if frozen?
  model.cti_models.reverse.each do |m|
    cti_this(m).delete
  end
  self
end