Missed a reference to {result_source}
Ash Berlin [Tue, 21 Nov 2006 20:58:19 +0000 (20:58 +0000)]
lib/DBIx/Class/Row.pm

index 11c3dd1..6cee23f 100644 (file)
@@ -67,9 +67,9 @@ L<DBIx::Class::ResultSet/create>).
 sub insert {
   my ($self) = @_;
   return $self if $self->in_storage;
-  $self->{result_source} ||= $self->result_source_instance
+  my $source = $self->result_source;
+  $source ||=  $self->result_source($self->result_source_instance)
     if $self->can('result_source_instance');
-  my $source = $self->{result_source};
   $self->throw_exception("No result_source set on this object; can't insert")
     unless $source;
   #use Data::Dumper; warn Dumper($self);