X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FManual%2FCookbook.pod;h=014ff381b591edad8a1e896786e2665b3a97ce3e;hb=4d1e63f4234e8a70a5a1f618ad7d8f3facd09142;hp=47e85f9c50588fc392322504f6fb4b20b09782a3;hpb=cab771879758e25c8ade74fc2f8fbc81d8163848;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Manual/Cookbook.pod b/lib/DBIx/Class/Manual/Cookbook.pod index 47e85f9..014ff38 100644 --- a/lib/DBIx/Class/Manual/Cookbook.pod +++ b/lib/DBIx/Class/Manual/Cookbook.pod @@ -326,10 +326,10 @@ You can write subqueries relatively easily in DBIC. }); my $rs = $schema->resultset('CD')->search({ - artist_id => { 'IN' => $inside_rs->get_column('id')->as_query }, + artist_id => { -in => $inside_rs->get_column('id')->as_query }, }); -The usual operators ( =, !=, IN, NOT IN, etc.) are supported. +The usual operators ( '=', '!=', -in, -not_in, etc.) are supported. B: You have to explicitly use '=' when doing an equality comparison. The following will B work: @@ -1078,7 +1078,7 @@ If you want to get a filtered result set, you can just add add to $attr as follo __PACKAGE__->has_many('pages' => 'Page', 'book', { where => { scrap => 0 } } ); -=head2 Many-to-many relationships +=head2 Many-to-many relationship bridges This is straightforward using L: @@ -1918,10 +1918,10 @@ L: $self->squared( $value * $value ); } - $self->next::method(@_); + $self->$orig(@_); } -Note that the hard work is done by the call to C, which +Note that the hard work is done by the call to C<< $self->$orig >>, which redispatches your call to store_column in the superclass(es). Generally, if this is a calculation your database can easily do, try