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=d1f98ee5db43dc7378c1f1c82cf8bf917cab0e13;hp=888fbc4e4c6b1ca090d15cf4e179c89383bc1e5d;hpb=8fd01b0e95b516f859c024b7f4abef57b137bb23;p=catagits%2FCatalyst-Manual.git diff --git a/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod b/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod index 888fbc4..061bd38 100644 --- a/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod +++ b/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod @@ -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,7 +1306,7 @@ 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" through the C table as in C<$book-Ebook_author-Efirst-Eauthor-Elast_name> (we @@ -1314,17 +1315,17 @@ 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-2010, Kennedy Clark, under Creative Commons License +Copyright 2006-2010, Kennedy Clark, under the +Creative Commons Attribution Share-Alike License Version 3.0 (L).