Revision history for Perl extension DBIx::Class::Schema::Loader
+ - remove is_deferrable => 1 from default for belongs_to rels
- better type info for Oracle
- preliminary Informix support
- unregister dropped sources on rescan
For example:
relationship_attrs => {
- all => { cascade_delete => 0 },
- has_many => { cascade_delete => 1 },
+ belongs_to => { is_deferrable => 1 },
},
-will set the C<cascade_delete> option to 0 for all generated relationships,
-except for C<has_many>, which will have cascade_delete as 1.
+use this to make your foreign key constraints DEFERRABLE.
=head2 debug
belongs_to => {
on_delete => 'CASCADE',
on_update => 'CASCADE',
- is_deferrable => 1,
+# is_deferrable => 1,
},
} }
is $rsobj4->result_source->relationship_info('fkid_singular')->{attrs}{on_update}, 'CASCADE',
"on_update => 'CASCADE' on belongs_to by default";
- is $rsobj4->result_source->relationship_info('fkid_singular')->{attrs}{is_deferrable}, 1,
- "is_deferrable => 1 on belongs_to by default";
+ ok ((not exists $rsobj4->result_source->relationship_info('fkid_singular')->{attrs}{is_deferrable}),
+ "is_deferrable => 1 not on belongs_to by default");
ok ((not exists $rsobj4->result_source->relationship_info('fkid_singular')->{attrs}{cascade_delete}),
'belongs_to does not have cascade_delete');