Update DBIx::Class::Manual::Example.pod to reflect previous changes in examples/Schem...
Bruno Vecchi [Fri, 11 Sep 2009 23:25:12 +0000 (23:25 +0000)]
lib/DBIx/Class/Manual/Example.pod

index 71b0e29..5d8980f 100644 (file)
@@ -155,10 +155,10 @@ insertdb.pl
 
   my @cds;
   foreach my $lp (keys %albums) {
-    my $artist = $schema->resultset('Artist')->search({
+    my $artist = $schema->resultset('Artist')->find({
       name => $albums{$lp}
     });
-    push @cds, [$lp, $artist->first];
+    push @cds, [$lp, $artist->id];
   }
 
   $schema->populate('Cd', [
@@ -179,10 +179,10 @@ insertdb.pl
 
   my @tracks;
   foreach my $track (keys %tracks) {
-    my $cdname = $schema->resultset('Cd')->search({
+    my $cdname = $schema->resultset('Cd')->find({
       title => $tracks{$track},
     });
-    push @tracks, [$cdname->first, $track];
+    push @tracks, [$cdname->id, $track];
   }
 
   $schema->populate('Track',[