Re: [CDBI] Missing TEMP data

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

From: Perrin Harkins
Subject: Re: [CDBI] Missing TEMP data
Date: 17:01 on 13 Jan 2006
Bill Moseley wrote:
> Are you saying that the above select returns, _init() is called for a
> row that is already in the live object index and that object is
> returned so _attribute_store is never called (and thus class_count column
> isn't copied to the object)?

Yes.

> Maybe I'm missing something, but if _init() is called why doesn't it
> always update the object?

There was a lengthy discussion about this on the old list.  One reason 
is that you might have changed some values in the object.  Someone had a 
patch for checking this which they posted to the list.  I don't use this 
TEMP approach or the live objects index, so I didn't pursue it.

> By make a class_count method you mean make a method that does the
> execute and sth_to_objects?

I mean make a method that literally returns the count.  Probably I would 
take your current set_sql, remove everything from it but the count, and 
make a wrapper method that calls it and returns that value.  I do this 
frequently in my CDBI classes.

For the actual objects, just fetch them as you were, and leave out the 
count.

- 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