Yes I also noticed this and wrote a test for it. I am not a DBIC developer but I will take a shot at patching this in the near future (unless one of the devs do it first).
On Fri, Jun 20, 2008 at 4:17 AM, Sam Kaufman <[EMAIL PROTECTED]> wrote:
> Ran into this inconsistency, we're using MySQL but I imagine it's probably
> the same for any db.
>
> # say $parents is a resultset of 100 'parents'
> # with each one having 20 'children'
>
> my $rs = $parents->search({},
> {rows => 20}
> );
> # ^ Fine, gives you 20 parents
>
> my $rs = $parents->search({},
> { rows => 20, prefetch => 'children' }
> );
> # ^ not fine, will give you one 'parent' because the 'rows' attribute gets
> # piped in as 'LIMIT 20'
>
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]
>
98rows_prefetch.t
Description: Troff document
_______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]
