From: Peter Rabbitson Date: Fri, 23 Oct 2009 08:52:49 +0000 (+0000) Subject: { is_foreign_key_constraint => 0, on_delete => undef } is a valid construct - no... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=db79c254cc39865c4fb5a58b2ee63f62f9f0866f;p=dbsrgits%2FDBIx-Class-Historic.git { is_foreign_key_constraint => 0, on_delete => undef } is a valid construct - no need to carp --- diff --git a/lib/SQL/Translator/Parser/DBIx/Class.pm b/lib/SQL/Translator/Parser/DBIx/Class.pm index 2ee47d5..b570d60 100644 --- a/lib/SQL/Translator/Parser/DBIx/Class.pm +++ b/lib/SQL/Translator/Parser/DBIx/Class.pm @@ -184,7 +184,7 @@ sub parse { if ($fk_constraint) { $cascade->{$c} = $rel_info->{attrs}{"on_$c"}; } - else { + elsif ( $rel_info->{attrs}{"on_$c"} ) { carp "SQLT attribute 'on_$c' was supplied for relationship '$moniker/$rel', which does not appear to be a foreign constraint. " . "If you are sure that SQLT must generate a constraint for this relationship, add 'is_foreign_key_constraint => 1' to the attributes.\n"; }