More unreachable code - we've already thrown on !defined $pri
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Relationship / HasMany.pm
index bcf598c..f346997 100644 (file)
@@ -26,11 +26,6 @@ sub has_many {
       "${class} has more"
     ) if $too_many;
 
-    $class->throw_exception(
-      "has_many needs a primary key to infer a join; ".
-      "${class} has none"
-    ) if !defined $pri && (!defined $cond || !length $cond);
-
     my ($f_key,$guess);
     if (defined $cond && length $cond) {
       $f_key = $cond;