getting rid of warns about undefined value for accessor
[dbsrgits/DBIx-Class.git] / lib / SQL / Translator / Parser / DBIx / Class.pm
index d4499aa..ef7c51f 100644 (file)
@@ -149,7 +149,8 @@ sub parse {
                 $fk_constraint = $rel_info->{attrs}{is_foreign_key_constraint};
             }
             # it can not be multi
-            elsif ( $rel_info->{attrs}{accessor} eq 'multi' ) {
+            elsif ( $rel_info->{attrs}{accessor}
+                    && $rel_info->{attrs}{accessor} eq 'multi' ) {
                 $fk_constraint = 0;
             }
             # if indeed single, check if all self.columns are our primary keys.