doc tweaks, failing test from jcs
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Manual / SchemaIntro.pod
index 834c1b3..1e6707e 100644 (file)
@@ -27,8 +27,8 @@ Or load classes by namespace:
   # load My::Schema::Album, My::Schema::Artist and My::OtherSchema::LinerNotes
   __PACKAGE__->load_classes(
     {
-      'My::Schema' => qw/ Album Artist /,
-      'My::OtherSchema' => qw/ LinerNotes /
+      'My::Schema' => [qw/ Album Artist /],
+      'My::OtherSchema' => [qw/ LinerNotes /]
     }
   );
 
@@ -70,6 +70,8 @@ If you have a multi-column primary key, just pass a list instead:
 
   __PACKAGE__->set_primary_key( qw/ albumid artistid / );
 
+=begin hide
+
 You can define relationships for any of your classes. L<DBIx::Class> will
 automatically fill in the correct namespace, so if you want to say
 "a My::Schema::Album object belongs to a My::Schema::Artist object" you do not
@@ -77,6 +79,8 @@ need to include the namespace when declaring the relationship:
 
   __PACKAGE__->belongs_to('artist' => 'Artist');
 
+=end hide
+
 That's all you need in terms of setup.
 
 =head2 Usage
@@ -106,7 +110,7 @@ This will run a C<SELECT> with C<albumid = 14> in the C<WHERE> clause,
 and return an instance of C<My::Schema::Album> that represents this
 row. Once you have that row, you can access and update columns:
 
-  $album->name('Physical Graffiti');
+  $album->title('Physical Graffiti');
   my $title = $album->title; # holds 'Physical Graffiti'
 
 If you prefer, you can use the C<set_column> and C<get_column>
@@ -147,11 +151,11 @@ Likewise, you can remove it from the database like this:
 
   $new_album->delete;
 
-You can also remove records without or retrieving first.  This
-operation takes the same kind of arguments as a search.
+You can also remove records without retrieving them first, by calling
+delete directly on a ResultSet object.
 
   # Delete all of Falco's albums
-  $schema->resultset('Album')->delete({ artist => 'Falco' });
+  $schema->resultset('Album')->search({ artist => 'Falco' })->delete;
 
 =head2 Finding your objects