Re: Trigger select does not trigger on TEMP fields
[prev]
[thread]
[next]
[Date index for 2004/09/17]
--On Friday, September 17, 2004 10:35 AM -0400 William McKee
<william@xxxxxxx.xxx> wrote:
> Hi Charles and Tony,
>
> I'm finally getting back to this old thread regarding trigger select not
> firing when a TEMP field is selected. For background, I have a class
> that loads data into temp fields via a trigger select. Due to lazy
> loading, when the class is first retrieved, these fields are not loaded.
> If I try to access one of the temporary fields *before* accessing a
> regular field, it returns an empty value instead of what would be loaded
> if the select trigger had fired.
>
> I tried Charles' patch but it caused my tests to freeze before even
> getting to the point where I try to access a temporary column. I presume
> that moving that trigger call is gumming up the works of CDBI somewhere
> early.
Well, drat. Is it spinning, or deadlocked? Can the debugger tell you
where it hangs up?
> This is still an issue for me so any further suggestions would be
> appreciated. My workaround for now is to load a regular column before
> accessing the temporary column(s). Is there a CDBI method I can call to
> force the select trigger to load?
As long as the trigger has the data it needs to operate, you can say
$obj->call_trigger('select');
to invoke its select triggers directly.
--
Regards,
Charles Bailey < bailey _at_ newman _dot_ upenn _dot_ edu >
Newman Center at the University of Pennsylvania