Re: Accessing accessing foreign key without triggering lazy HasA class loading?

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

From: Tony Bowden
Subject: Re: Accessing accessing foreign key without triggering lazy HasA class loading?
Date: 20:05 on 11 Mar 2005
On Fri, Mar 11, 2005 at 11:28:43AM -0700, gcomnz wrote:
> 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?
> 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?

Make the Essential group of the foreign class be solely the primary
column.

The object is created lazily, so it won't need to go to the database
unless it needs info it already has. If there are no other essential
columns, it will already have all the information, and won't need a
database read.

Tony

Re: Accessing accessing foreign key without triggering lazy HasA class loading?
Tony Bowden 20:05 on 11 Mar 2005

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