X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FTutorial%2F03_MoreCatalystBasics.pod;h=061bd38e3facc833951ded4734e0058c5fb5a0a5;hb=7040a6cd5a2b1aa0eb7ba504c1ac7b57021b1946;hp=f8751f11926c174bc8d0c5d82eaee55cdbdf94df;hpb=1edbdee6a1bad3524a3d97c6daaae02b5109c1d2;p=catagits%2FCatalyst-Manual.git diff --git a/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod b/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod index f8751f1..061bd38 100644 --- a/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod +++ b/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod @@ -345,7 +345,7 @@ method" that you don't want to be an action at all, then just define the method without any attribute -- you can call it in your code, but the Catalyst dispatcher will ignore it.) -There are five types of "special" build-in C<:Private> actions: +There are five types of "special" built-in C<:Private> actions: C, C, C, C, and C. =over 4 @@ -680,7 +680,7 @@ applications rely on DBIx::Class, as will this tutorial. Although DBIx::Class has included support for a C mode to automatically read the database structure every time the -application starts, it's use is no longer recommended. While it can +application starts, its use is no longer recommended. While it can make for "flashy" demos, the use of the C mode we use below can be implemented just as quickly and provides many advantages (such as the ability to add your own methods to the overall DBIC @@ -821,7 +821,7 @@ when you launch the application). B Older versions of L use the deprecated DBIx::Class C technique instead of the newer -C. For new applications, please try to use +C. For new applications, please try to use C since it more easily supports a very useful DBIC technique called "ResultSet Classes." If you need to convert an existing application from "load_classes" to "load_namespaces," you can @@ -1287,14 +1287,15 @@ L for the details. Although recent versions of SQLite and L automatically handle the C and C relationships, -C relationships currently need to be manually inserted. -To add a C relationship, first edit +C relationship bridges (not technically a relationship) +currently need to be manually inserted. +To add a C relationship bridge, first edit C and add the following text below the C<# You can replace this text...> comment: # many_to_many(): # args: - # 1) Name of relationship, DBIC will create accessor with this name + # 1) Name of relationship bridge, DBIC will create accessor with this name # 2) Name of has_many() relationship this many_to_many() is shortcut for # 3) Name of belongs_to() relationship in model class of has_many() above # You must already have the has_many() defined to use a many_to_many(). @@ -1305,26 +1306,26 @@ file. As with any Perl package, we need to end the last line with a statement that evaluates to C. This is customarily done with C<1;> on a line by itself. -The C relationship is optional, but it makes it +The C relationship bridge is optional, but it makes it easier to map a book to its collection of authors. Without -it, we would have to "walk" though the C table as in +it, we would have to "walk" through the C table as in C<$book-Ebook_author-Efirst-Eauthor-Elast_name> (we will see examples on how to use DBIx::Class objects in your code soon, but note that because C<$book-Ebook_author> can return multiple authors, we have to use C to display a single author). C allows us to use the shorter C<$book-Eauthor-Efirst-Elast_name>. Note that you cannot -define a C relationship without also having the +define a C relationship bridge without also having the C relationship in place. Then edit C and add the reverse -C relationship for C as follows (again, be careful +C relationship bridge for C as follows (again, be careful to put in above the C<1;> but below the C<# DO NOT MODIFY THIS OR ANYTHING ABOVE!> comment): # many_to_many(): # args: - # 1) Name of relationship, DBIC will create accessor with this name + # 1) Name of relationship bridge, DBIC will create accessor with this name # 2) Name of has_many() relationship this many_to_many() is shortcut for # 3) Name of belongs_to() relationship in model class of has_many() above # You must already have the has_many() defined to use a many_to_many(). @@ -1597,5 +1598,6 @@ Please report any errors, issues or suggestions to the author. The most recent version of the Catalyst Tutorial can be found at L. -Copyright 2006-2008, Kennedy Clark, under Creative Commons License +Copyright 2006-2010, Kennedy Clark, under the +Creative Commons Attribution Share-Alike License Version 3.0 (L).