Qiang has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, I have a has_many relationship between CD and Categories. when using prefetch with has_many, each paged data doesn't return the correct number of rows. by default it should return a page with 10 results however it may return 6. :

$schema->resultset('CD')->search( .. { prefetch => [ 'Categories', 'Author' ], page => $page } );

Because of this, I tried to do away without prefetch by using join. but i am getting 'Prefetch not supported with accessor 'multi' error.

$schema->resultset('CD')->search( .. { prefetch => [ 'Author' ], join => ['Categories'], +select => ['categories.category_id' ], +as => ['categories.category_id' ], page => $page, distinct => 1, } );