[CDBI] Missing TEMP data

Bill Moseley moseley at hank.org
Fri Jan 13 17:27:44 GMT 2006


On Fri, Jan 13, 2006 at 12:01:14PM -0500, Perrin Harkins wrote:
> 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.

I'll just kill the live objects index.  Good enough for you, good
enough for me.  I don't think I have any cases where I ever need to be
sure the objects are the same.

Still, wish I could make it happen.  It happens when no objects have
been updated -- and I would have thought that doing a retrieve on an
row and then having that same row selected in my count() that would
trigger the problem.

Something unsettling about fixing a problem before being able to
make it happen.


> >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.

The advantage of the way I'm doing it is that I can generate paged
views of the records and it's easy to sort by the count column in the
select.  Plus, it's one trip to the database for the entire table I
need to display.

-- 
Bill Moseley
moseley at hank.org





More information about the ClassDBI mailing list