Accessing accessing foreign key without triggering lazy HasA class loading?

[prev] [thread] [next] [Date index for 2005/03/11]

From: gcomnz
Subject: Accessing accessing foreign key without triggering lazy HasA class loading?
Date: 18:28 on 11 Mar 2005
Hi, all,

I'm trying to figure out whether I can access the ID value for a
foreign key without triggering the loading of the foreign class?

For instance:

__PACKAGE__->table('task');
__PACKAGE__->columns(All => qw/task_id on_success on_fail/);
__PACKAGE__->has_a(on_success => 'IL::Task');
__PACKAGE__->has_a(on_fail => 'IL::Task');

I want to have the option to read the actual ID value of on_success or
on_fail without triggering another database read. Am I missing
something really obvious?

Thanks!

Marcus

Accessing accessing foreign key without triggering lazy HasA class loading?
gcomnz 18:28 on 11 Mar 2005

Generated at 08:39 on 15 Mar 2005 by mariachi v0.52