X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FTranslator%2FParser%2FDBIx%2FClass.pm;h=b570d60bdea8363fc1a5ce684ec40d5453911079;hb=db79c254cc39865c4fb5a58b2ee63f62f9f0866f;hp=2ee47d5ae37a817dc48c41f387f44172c37811ef;hpb=f9288897671df67f6d59204e833600fa1c9b20ef;p=dbsrgits%2FDBIx-Class.git 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"; }