[CDBI] essential fields not populating as expected

Bill Moseley moseley at hank.org
Tue May 1 00:43:59 BST 2007


On Mon, Apr 30, 2007 at 04:22:43PM -0700, Jon Burdge wrote:

> The problem is that the second time $a is dumped, the somedata field is not
> loaded.  This looks like the same problem I'm having with sth_to_objects--I
> have some objects already created that reference another table, and then I
> try to load the data for that other table, but the information from the
> statement handle passed to sth_to_objects seems to be getting ignored in
> favor of the stub object already in memory.

Well, I remember the fix, but not the reason:

$Class::DBI::Weaken_Is_Available = 0;

It's not related to Essential, IIRC -- DBI->trace(1) should show that it's
still fetching the "somedata" column in the retrieve.  But, later
calling $a->somedata makes it go back to the database for that column.
But, I don't remember why it's doing that.


-- 
Bill Moseley
moseley at hank.org




More information about the ClassDBI mailing list