[Dbix-class] Problem using slice() with join and order_by

Matt S Trout dbix-class at trout.me.uk
Wed Jan 11 21:28:06 CET 2006


On Wed, Jan 11, 2006 at 10:30:04AM +0000, Will Hawes wrote:
> >prove -Ilib t/<testname>.t
> >
> >or
> >
> >prove -Ilib t/some*glob/*for*tests*
> >
> >should do the trick. t/helperrels/16joins.t is probably the right test to
> >be running; t/run/16joins.tl is the actual test code.
> >
> >If that isn't enough to get you started, could you hop onto IRC or is that
> >not a communication form you use? (there's bound to be at least a couple
> >people who've already contributed to the tests on even if I'm not)
> >
> 
> Thanks, those tips helped a great deal. prove++ :)
> 
> I've attached a patch to 16joins.tl to add an extra test. This checks 
> that a slice() of all objects returns the same number of objects as 
> all() when a join is specified, which should be enough to detect the 
> problem.

Thanks very much, I've applied it to the branch (boo, you forgot to change
the tests => bit at the top :)

> I'm not able to reproduce the bug with the latest branch, so maybe it's 
> fixed already.

That would make sense; I nuked a whole class of bugs of that type in the
process of testing chained resultets ($rs->search(...)->search(...)->...)

-- 
     Matt S Trout       Offering custom development, consultancy and support
  Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

 + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Dbix-class mailing list