]> Dogcows Code - chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate/blobdiff - lib/DBIx/Class/ResultSet/RecursiveUpdate.pm
fixed usage with moosified resultsets (RT#64773)
[chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate] / lib / DBIx / Class / ResultSet / RecursiveUpdate.pm
index c0db8b415ebac682e0a1bad8fe19b18722fb0604..94b1c07dde938807d001607ae6dfecd1e2e0c091 100644 (file)
@@ -107,7 +107,7 @@ sub recursive_update {
         $object = $self->find( $updates, { key => 'primary' } );
     }
 
-    $object = $self->new( {} )
+    $object = $self->new_result( {} )
         unless defined $object;
 
     # warn Dumper( $updates ); use Data::Dumper;
@@ -463,7 +463,7 @@ sub is_m2m {
     if ( $rclass->can('_m2m_metadata') ) {
         return $rclass->_m2m_metadata->{$relation};
     }
-    my $object = $self->new( {} );
+    my $object = $self->new_result( {} );
     if (    $object->can($relation)
         and !$self->result_source->has_relationship($relation)
         and $object->can( 'set_' . $relation ) )
@@ -484,7 +484,7 @@ sub get_m2m_source {
             ->related_source(
             $rclass->_m2m_metadata->{$relation}{foreign_relation} );
     }
-    my $object = $self->new( {} );
+    my $object = $self->new_result( {} );
     my $r = $object->$relation;
     return $r->result_source;
 }
This page took 0.018224 seconds and 4 git commands to generate.