From: Jess Robinson Date: Mon, 6 Oct 2008 18:16:07 +0000 (+0000) Subject: cosmincx's patch to show relationship attr filtering in cookbook X-Git-Tag: v0.08240~336 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7c0825ab81039b5d7f4242523603f60e0fd78575;p=dbsrgits%2FDBIx-Class.git cosmincx's patch to show relationship attr filtering in cookbook --- diff --git a/lib/DBIx/Class/Manual/Cookbook.pod b/lib/DBIx/Class/Manual/Cookbook.pod index 941aab3..293363d 100644 --- a/lib/DBIx/Class/Manual/Cookbook.pod +++ b/lib/DBIx/Class/Manual/Cookbook.pod @@ -905,6 +905,12 @@ as follows: __PACKAGE__->has_many('pages' => 'Page', 'book', { order_by => \'page_number DESC'} ); +=head2 Filtering a relationship result set + +If you want to get a filtered result set, you can just add add to $attr as follows: + + __PACKAGE__->has_many('pages' => 'Page', 'book', { where => { scrap => 0 } } ); + =head2 Many-to-many relationships This is straightforward using L: