We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
You have several options to do this. You database might support it directly, and cascade delete records references by a foreign key.
You can also do it "manually" with Sequel hooks.
For instance, let's say you can to remove all albums for an artist when you remove the artist, you can do so like this :
class Artists < Sequel::Model one_to_many :albums def before_destroy Albums.filter(:domain_id => id).destroy end end
Thus, before removing an artist, all it's albums will be removed.
You can learn more about models hooks in the Sequel Hooks