From: Matt S Trout Date: Mon, 13 Mar 2006 13:04:45 +0000 (+0000) Subject: doc tweaks, failing test from jcs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f109ee4aa6c7f7cc4eaf6cd15b6d67c2ebcf8702;p=dbsrgits%2FDBIx-Class-Historic.git doc tweaks, failing test from jcs --- diff --git a/Changes b/Changes index 0b11f96..06935e2 100644 --- a/Changes +++ b/Changes @@ -1,10 +1,11 @@ Revision history for DBIx::Class -0.05990_03 +0.05999_03 - deploy now adds drop statements before creates - - deploy outputs debugging statements if DBIX_CLASS_STORAGE_DBI_DEBUG is set + - deploy outputs debugging statements if DBIX_CLASS_STORAGE_DBI_DEBUG + is set -0.05990_02 2006-03-10 13:31:37 +0.05999_02 2006-03-10 13:31:37 - remove test dep on YAML - additional speed tweaks for C3 - allow scalarefs passed to order_by to go straight through to SQL diff --git a/lib/DBIx/Class/Manual/SchemaIntro.pod b/lib/DBIx/Class/Manual/SchemaIntro.pod index 11936b2..1e6707e 100644 --- a/lib/DBIx/Class/Manual/SchemaIntro.pod +++ b/lib/DBIx/Class/Manual/SchemaIntro.pod @@ -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 diff --git a/t/run/23cache.tl b/t/run/23cache.tl index 45e638c..1f85dcb 100644 --- a/t/run/23cache.tl +++ b/t/run/23cache.tl @@ -13,6 +13,16 @@ my $artist = $rs->first; is( scalar @{ $rs->get_cache }, 0, 'cache is not populated without cache attribute' ); +my @a = $schema->resultset("Artist")->search( + { }, + { + join => [ qw/ cds /], + prefetch => [qw/ cds /], + } +); + +is(scalar @a, 3, 'artist with cds: count parent objects'); + $rs = $schema->resultset("Artist")->search( { 'artistid' => 1 }, {