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=067ebbe15c7a140d70e4b56b9a1deb740f99da8a;hpb=ec3ef4ad2ba72cc751c8c5eccccb705602d87d09;p=catagits%2FCatalyst-Manual.git diff --git a/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod b/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod index 067ebbe..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().