Leandro:<br>&gt; you don't need to use Data::Page directly <br><br>yes, you are quite right, I took out the<br>explicit call to Data::Page; I set rows =&gt; 2,<br>and my query gets 2 thumbs. Cool.<br><br>&gt;you are setting $c-&gt;stash-&gt;{photos} to an <br>&gt;array reference when you do <br>&gt;$c-&gt;stash-&gt;{photos} = [$c-&gt;model( ... ]; <br>&gt;and then you are later trying to make a <br>&gt;method call -&gt;pager() on that array reference, <br>&gt;not an object. <br><br>With the square brackets, I get an array ref, <br>and in my template, I do stuff like:<br>[% FOREACH photo IN photos -%]<br>[% photo.gallery.name %]<br>[% END -%]<br><br>When I take the square brackets out of the<br>query, my template doesn't display anything<br>anymore. <br><br>&gt;See the "Paged Results" section of the <br>&gt;DBIx::Class::Manual::Cookbook POD on<br>&gt;CPAN.<br><br>which of course I'd been trying to beat <br>into my forehead. Cookbook says:<br>"you can return a Data::Page
 object for the resultset <br>(suitable for use in e.g. a template) <br>using the pager method:<br><br>return $rs-&gt;pager();"<br><br>So I'm trying to call the pager method from the<br>resultset. But translating from the cookbook<br>example (which is non-Catalyst centric) to <br>Cat code, falls the shadow.<br><br>Chisel:<br>&gt;$c-&gt;stash-&gt;{pager} =&gt; $c-&gt;stash-&gt;{photos}-&gt;pager();<br>&gt;shouldn't this be an assignment rather than a fat-comma?<br><br>Good eyeballs! Yes. <br><br>&gt;I think you need to lose the square brackets, <br>&gt;and you will probably find you then have a <br>&gt;DBIx::Class::ResultSet, which does have the <br>&gt;pager() method. <br><br>When I do, I get this error:<br>Caught exception in Catapult::Controller::Photo::Gallery-&gt;display "DBIx::Class::ResultSet::pager(): Can't create pager for non-paged rs<br><br>Going back to the DBIx::Class Cookbook example, <br>which is pretty simple (no joins or anything), do I <br>have the joins
 and the row settings in the right place? <br>I tried a few combos, and the one that at least doesn't <br>throw cat down the stairs is the one I have been using:<br><br>&nbsp;&nbsp;&nbsp; $c-&gt;stash-&gt;{photos} = [$c-&gt;model('CatapultDB::Photos')-&gt;search(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'gallery.id' =&gt; $selected_gallery<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; },<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; join&nbsp;&nbsp;&nbsp;&nbsp; =&gt; [qw/ gallery /],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; prefetch =&gt; [qw/ gallery /],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rows =&gt; 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; )];<br><br>Much less hair now,<br><br>/dennis<br><br><br>