in reply to Re: Using DBIx::Class To Delete Row With Foreign Keys
in thread Using DBIx::Class To Delete Row With Foreign Keys
Yes! There is one table, Roster, that does:
package Test::Schema::Result::Roster; . . . __PACKAGE__->add_columns( "id", { data_type => "integer", is_auto_increment => 1, is_nullable => 0}, "member_id", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, ); . . . __PACKAGE__->belongs_to( "member", "Test::Schema::Result::Member", { id => "member_id" }, { is_deferrable => 0, join_type => "LEFT", on_delete => "NO ACTION", on_update => "NO ACTION", }, ); ------------sql------ CREATE TABLE roster ( id INTEGER PRIMARY KEY, member_id INTEGER REFERENCES member(id) );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Using DBIx::Class To Delete Row With Foreign Keys
by poj (Abbot) on Jan 24, 2019 at 17:31 UTC | |
by varanasi (Scribe) on Jan 24, 2019 at 17:48 UTC |