Re: Low-level data access
[prev]
[thread]
[next]
[Date index for 2004/12/03]
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
>