prefetch docs: prefetch works on all rel types
authorFitz Elliott <fitz.elliott@gmail.com>
Thu, 21 Apr 2011 17:19:13 +0000 (13:19 -0400)
committerPeter Rabbitson <ribasushi@cpan.org>
Fri, 29 Apr 2011 23:04:26 +0000 (01:04 +0200)
commit307f12659a1a370e5e41a23ef35839e2807f1ca4
tree98b57a0f1fdb9d8e1e5e5a8d18f77ad2bddfafce
parent86a51471ceeeae4998e11ca3971c026f1b829a43
prefetch docs: prefetch works on all rel types

Update the prefetch docs to state that prefetch works with all
relationship types, where previously it had said that it works with
only belongs_to and has_one.

Also update the subsequent example. The old example was confusing
because it specified two has_many relationships on the same level,
something that DBIC emits a warning about.  That example is replaced
with a CD-centric example that demonstrates how many different
relationship types can be used together in a prefetch, but omits the
multiple has_manys.

Add a warning, example, and explanation of the troubles with using
multiple has_many relations in a prefetch.

The old text incorrectly stated that prefetch will override join and
select attributes. Describe current behavior with examples.
lib/DBIx/Class.pm
lib/DBIx/Class/ResultSet.pm