[jifty-devel] unlimit not clearing group by

Matthew Lenz matthew at nocturnal.org
Mon Jul 30 10:12:38 EDT 2007


On Mon, 2007-07-30 at 07:24 -0500, Matthew Lenz wrote:
> On Mon, 2007-07-30 at 01:44 -0400, Jesse Vincent wrote:
> > On Jul 30, 2007, at 1:15 AM, Matthew Lenz wrote:
> > 
> > > using jifty/dbi trunk and running through a collection with a couple
> > > different limits.  I'm using unlimit between the two different  
> > > loops to
> > > setup different limits.  order by may or may not be getting cleared  
> > > but
> > > I always have an order by set on my queries regardless but group by is
> > > definitely not being cleared (using warn $coll- 
> > > >build_select_query).   I
> > > thought I remember a recent conversation about unlimit along with some
> > > commits shortly there after.  Maybe a regression?  Lemme know what  
> > > I can
> > > do to help resolve it.
> > >
> > Was it this?
> > 
> > http://lists.bestpractical.com/pipermail/jifty-devel/2007-July/ 
> > 001590.html
> > 
> > Wanna shoot me a failing test?
> 
> as in the make test from jifty dbi?  I'm not getting any failures but
> its also skipping like 500 subtests.  Maybe its just an issue with the
> mysql handle (although that seems unlikely)

I enabled the mysql env variables on the test.  looking at the test code
which uses group_by it doesn't really seem to check that the group by
was removed anyway.  Although I'm probably wrong on that.

I don't think this is going to work anyway.  it seems unintuitive that
if you have a 1-to-many relationship (Parent-to-Kids) and do the
following:

-- begin --
my $parent->MyApp::Model::Parent-new();
$parent->load($parent_id);
$kids = $parent->kids

.. perform some limits on $kids ..
.. loop through some kids ..

$kids->unlimit
--end--

that the unlimit should remove the where parent = ### from the $kids
collection.  This seems to break the ORM imo.  I guess the solution is
just going to be creating multiple collections rather than reusing them?
unlimit isn't removing the group by but is removing the parent id
restriction from kids.  regardless, either one is going to break the way
I'm trying to do this stuff.  I can certainly understand the added
complexity jifty::dbi would have trying to keep track of what should be
considered a "clearable" limit.

> > Thanks,
> > jesse
> > 
> > > -Matt
> > >
> > > _______________________________________________
> > > jifty-devel mailing list
> > > jifty-devel at lists.jifty.org
> > > http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
> > >
> > 
> > _______________________________________________
> > jifty-devel mailing list
> > jifty-devel at lists.jifty.org
> > http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
> 
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel



More information about the jifty-devel mailing list