TEMP columns not populated by sth_to_objects in 0.96

[prev] [thread] [next] [Date index for 2004/06/08]

From: David Jack Olrik
Subject: TEMP columns not populated by sth_to_objects in 0.96
Date: 08:54 on 08 Jun 2004
Hi,

I have stumpled upon an incopmpability between 0.95 and 0.96

I have a table which contains parents and childs.
In 0.95 I have a method 'tree' that generates a list of objects and 
their place in the tree of parents and childs.

sub tree
{
     my $self = shift;
     my $sth = $self->sql_tree;
     $sth->execute($self->id);
     return $self->sth_to_objects($sth);
}

In each object I have a TEMP 'branch' and a TEMP 'level' column, these 
columns are populated by sth_to_objects

So what I get by calling 'tree' is an itreator or an array of objects 
with level and branch set accordingly to the sql statement below. (They 
are computed values)

And now my problem: Not all TEMP columns are populated!

Test output of data retrieved by 'tree' under 0.95:
Level   id      pid     branch
0       276641  undef   276641
1       276642  276641  276641:276642
2       297633  276642  276641:276642:297633
2       297639  276642  276641:276642:297639

Test output of data retrieved by 'tree' under 0.96
Level   id      pid     branch
0       276641  undef   276641
undef   276642  276641  undef
2       297633  276642  276641:276642:297633
undef   297639  276642  undef

I have the 'pid' listed as a essential column, and suspect that this is 
what bites me.
As the object is fetched from cache instead of a fresh copy.
So i moved the 'pid' to 'Other', and this is what I got...

Test output of data retrieved by 'tree' under 0.96 with 'pid' listed in 
'Other'
Level   id      pid     branch
0       276641  undef   276641
1       276642  276641  276641:276642
2       297633  276642  276641:276642:297633
undef   297639  276642  undef

The reason why this bites be is because for me to call 'tree' I need 
and object, so I fetch the object with id 297639, and thus it will not 
be fetched by sth_to_objects.

Any idears as how to work around this ??

        -- 
        Best regards,
David Jack Olrik <david@xxxxx.xx>             http://david.olrik.dk
GnuPG fingerprint C290 0A4A 0CCC CBA8 2B37 E18D 01D2 F6EF 2E61 9894
["The first rule of Perl club is  You do not talk about Perl club"]

(message missing)

TEMP columns not populated by sth_to_objects in 0.96
David Jack Olrik 08:54 on 08 Jun 2004

object caching and mod_perl
jason scott gessner 13:28 on 08 Jun 2004

Re: object caching and mod_perl
Tony Bowden 13:46 on 08 Jun 2004

Re: object caching and mod_perl
Perrin Harkins 14:02 on 08 Jun 2004

Re: object caching and mod_perl
jason scott gessner 14:11 on 08 Jun 2004

Re: object caching and mod_perl
Edward J. Sabol 14:52 on 08 Jun 2004

Re: object caching and mod_perl
jason scott gessner 16:31 on 11 Jun 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52