[jifty-devel] Queries using GROUP BY and aggregate functions

Jesse Vincent jesse at bestpractical.com
Sat Jul 7 14:22:39 EDT 2007

On Jul 7, 2007, at 11:07 AM, Andrew Sterling Hanenkamp wrote:

> On 7/6/07, Jesse Vincent <jesse at bestpractical.com> wrote:
>> Does this help?
> In the sense that it tells me I'm sane in doing this, yes. In the
> sense that it fixes my problem, no.
> The basic issue remains:
> FATAL - Can't call method "check_read_rights" on an undefined value at
> /Library/Perl/5.8.6/Jifty/Collection.pm line 71.
> It croaks as soon as I call ->next. I should mention that this query
> will regularly be operating on an empty result and the table is
> currently empty (after the application is installed it would be an
> empty result because their just aren't any matching rows). I suppose
> that it could be barfing because there aren't any records to load just
> now.

I suspect that this is because what we're returning _isn't_ an id in  
the id column, it's a count. if you're trying to instantiate record  
objects, you're in trouble.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.bestpractical.com/pipermail/jifty-devel/attachments/20070707/0a6a26df/PGP.pgp

More information about the jifty-devel mailing list