Re: [CDBI] Missing TEMP data

[prev] [thread] [next] [Date index for 2006/01/13]

From: Perrin Harkins
Subject: Re: [CDBI] Missing TEMP data
Date: 15:36 on 13 Jan 2006
Bill Moseley wrote:
> I have a query that returns a list of "instructors" and a count() of
> the number of classes they are teaching.  The count() is in a TEMP
> column.  I'm using seq_sql for the query:
> 
>     package Person;
> 
>     __PACKAGE__->columns( TEMP => 'class_count' );
>     __PACKAGE__->set_sql('count_classes', <<'' );
>         SELECT      me.id, me.first_name, me.last_name,  COUNT(class.id) AS class_count
>         FROM        %s
>         WHERE       %s
>         GROUP BY    me.id, me.first_name, me.last_name
>         %s

This will clash with the object index because it has no way to know that 
a version with the TEMP column filled in is not the same as one without 
it.  You'll need to either disable the object index, or not use this 
kind of TEMP column cheat, e.g. make a class_count  method instead.

- Perrin

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

(message missing)

[CDBI] Missing TEMP data
Bill Moseley 15:02 on 13 Jan 2006

Re: [CDBI] Missing TEMP data
William Ross 15:23 on 13 Jan 2006

Re: [CDBI] Missing TEMP data
Perrin Harkins 15:36 on 13 Jan 2006

Re: [CDBI] Missing TEMP data
Bill Moseley 16:40 on 13 Jan 2006

Re: [CDBI] Missing TEMP data
Perrin Harkins 17:01 on 13 Jan 2006

Re: [CDBI] Missing TEMP data
Bill Moseley 17:27 on 13 Jan 2006

Re: [CDBI] Missing TEMP data
Perrin Harkins 18:31 on 13 Jan 2006

Re: [CDBI] Missing TEMP data
Bill Moseley 19:05 on 13 Jan 2006

Generated at 09:31 on 23 Jan 2006 by mariachi v0.52