another reflector bug on many to many
groditi [Fri, 26 Oct 2007 01:16:06 +0000 (01:16 +0000)]
lib/Reaction/InterfaceModel/Collection/DBIC/Role/Base.pm
lib/Reaction/InterfaceModel/Reflector/DBIC.pm

index a970277..efddcba 100644 (file)
@@ -40,7 +40,7 @@ role Base, which {
   implements _build_collection_store => as {
     my $self = shift;
     my $im_class = $self->_im_class;
-    [ $self->_source_resultset->search(undef, {result_class => $im_class})->all ];
+    [ $self->_source_resultset->search({}, {result_class => $im_class})->all ];
   };
 
   implements clone => as {
index dbfb351..7e81b10 100644 (file)
@@ -698,8 +698,7 @@ class DBIC, which {
 
       #proper collections will remove the result_class uglyness.
       $attr_opts{default} = sub {
-        my $rs = shift->$dm_name->result_source->related_source($link_table)
-          ->related_source($mm_name)->resultset;
+        my $rs = shift->$dm_name->related_resultset($link_table)->related_resultset($mm_name);
         return $attr_opts{isa}->new(_source_resultset => $rs);
       };
     } else {