add add_additional_parents method
Matt S Trout [Fri, 21 Aug 2009 19:12:47 +0000 (20:12 +0100)]
lib/DBIx/Class/ResultSource/MultipleTableInheritance.pm

index 6ff01e3..f05b19b 100644 (file)
@@ -41,6 +41,15 @@ method new ($class: @args) {
   return $new;
 }
 
+method add_additional_parents (@classes) {
+  foreach my $class (@classes) {
+    Class::C3::Componentised->ensure_class_loaded($class);
+    $self->add_additional_parent(
+      $class->result_source_instance
+    );
+  }
+}
+
 method add_additional_parent ($source) {
   my ($our_pk, $their_pk) = map {
     join('|',sort $_->primary_columns)