Re: Low-level data access

[prev] [thread] [next] [Date index for 2004/12/03]

From: Stathy G Touloumis
Subject: Re: Low-level data access
Date: 17:02 on 03 Dec 2004
Ok, I believe I found the answer and it's no (low-level accessors do not 
do lazy loading).  Perhaps that is not the intended behaviour but it's 
what is happening.  This is roughly what the code is doing.

my $iter = Foo::Class->search( foo=> q() );
my $rec = $iter->first;

use Data::Dumper;
$log->info( Dumper( $rec ) );

# $VAR1 = bless( {
#	'etl_extract_id' => 128,
# }, 'Foo::Class' );
#
# Primary => etl_extract_id

my @test = $rec->_attrs( q(etl_status) );
# @test empty, despite value in database ...

Why is it empty in object?  My assumption is because the low-level 
accessors bypass the lazy loading functionality but I would think that 
they should not bypass them.  I have gotten around this by declaring the 
specific columns 'Essential' which are accessed in the low-level 
accessors but still can be problematic in the future.

Perrin Harkins wrote:

> On Fri, 2004-12-03 at 10:36 -0600, Stathy G Touloumis wrote:
> 
>>When using the low-level accessors lazy loading doesn't seem to occur.
> 
> 
> Code sample, please?
> 
> - Perrin
> 

Low-level data access
Stathy G Touloumis 16:36 on 03 Dec 2004

Re: Low-level data access
Perrin Harkins 16:34 on 03 Dec 2004

Re: Low-level data access
Stathy G Touloumis 17:02 on 03 Dec 2004

Re: Low-level data access
Perrin Harkins 17:05 on 03 Dec 2004

Re: Low-level data access
Tony Bowden 19:59 on 03 Dec 2004

Generated at 15:37 on 08 Dec 2004 by mariachi v0.52