X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FManual%2FSchemaIntro.pod;h=1e6707ee4fe2913682defa086722a89f66b97ec0;hb=f109ee4aa6c7f7cc4eaf6cd15b6d67c2ebcf8702;hp=834c1b3d6711b618c82af682ca9ba8360679da21;hpb=c31f8021237e67033e70a9d3839acac512b8c251;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Manual/SchemaIntro.pod b/lib/DBIx/Class/Manual/SchemaIntro.pod index 834c1b3..1e6707e 100644 --- a/lib/DBIx/Class/Manual/SchemaIntro.pod +++ b/lib/DBIx/Class/Manual/SchemaIntro.pod @@ -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 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