[Catalyst] Pagenav?
Matt S Trout
dbix-class at trout.me.uk
Mon Feb 12 10:38:06 GMT 2007
On 10 Feb 2007, at 02:57, Nilson Santos Figueiredo Junior wrote:
> On 2/9/07, Jonathan Rockway <jon at jrock.us> wrote:
>> $rs = $c->model('DBIC')->search->whatever;
>
> I'd advise you against calling whatever() and limiting yourself to the
> first search() call if you're planning on using DBIC's built-in pager
> for this resultset. As of 0.07005, multiple search()es over the same
> resultset can break paging in weird ways (usually, it ends up
> generating wrong LIMIT offsets).
So long as you call ->page($page) last that's not remotely true.
There -is- a bug doing ->search on an rs that's already paged, which
you submitted me a test case for, which I intend to have fixed in the
next release.
But please don't imagine the bug's any worse than it actually is (and
if it -is- that bad then your test case needs updating :)
--
Matt S Trout, Technical Director, Shadowcat Systems Ltd.
Offering custom development, consultancy and support contracts for
Catalyst,
DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for
details.
+ Help us build a better perl ORM: http://dbix-
class.shadowcatsystems.co.uk/ +
More information about the Catalyst
mailing list