Subject: | Prefetch does not work for has_many relationship (because INNER JOIN is used) |
Consider the following example:
$schema->resultset('artist')->search({ }, { prefetch => ['CD']});
Now, if there are no CD's of a given artist, this artist would not be
returned. This behavior is inconsistent, since
$schema->resultset('artist')->search({ });
would have returned this artist. Adding a "prefetch" should only affect
the performance, but not the logic of the returned data.
This problem might be resolved by using a LEFT OUTER JOIN instead of an
INNER JOIN.
Thank you for maintaining the DBIx::Class --- this is a great module!
Best,
Hansres