Re: before_create trigger problems

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

From: Drew Taylor
Subject: Re: before_create trigger problems
Date: 16:21 on 21 Dec 2004
On Tue, 21 Dec 2004 09:09:14 +0000, Tony Bowden <tony-cdbitalk@xxxxx.xxx> wrote:
> On Mon, Dec 20, 2004 at 05:39:11PM -0800, Emile Aben wrote:
> > MonitorData=HASH(0x6c3498) destroyed without saving
> > changes to end_date at
> > /usr/local/perl-5.6.0/lib/site_perl/5.6.0/Class/Trigger.pm
> > line 51
> >
> > Is there anything that prevents updates/deletes from
> > within a trigger?
> 
> No, but you have to use the low level data access in a before_create
> trigger, as the normal accessors expect to be working on an object
> that's already in existence.

And if you do use the low level accessors, be sure to use "normalized"
case for the column names. See my post earlier this week about this
issue. In my case, I just needed to use all lowercase names within the
_attribute_*() methods even though my column names were mixed case.

Drew
        -- 
        ----------------------------------------------------------------
 Drew Taylor                 *  Web development & consulting
 Email: drew@xxxxxxxxxx.xxx  *  Site implementation & hosting
 Web  : www.drewtaylor.com   *  perl/mod_perl/DBI/mysql/postgres
 ----------------------------------------------------------------

(message missing)

before_create trigger problems
Emile Aben 01:39 on 21 Dec 2004

Re: before_create trigger problems
Tony Bowden 09:09 on 21 Dec 2004

Re: before_create trigger problems
Drew Taylor 16:21 on 21 Dec 2004

Re: before_create trigger problems
Emile Aben 17:13 on 21 Dec 2004

Re: before_create trigger problems
Emile Aben 18:35 on 21 Dec 2004

Re: before_create trigger problems
Charles Bailey 19:01 on 21 Dec 2004

Re: before_create trigger problems
Emile Aben 19:28 on 21 Dec 2004

Re: before_create trigger problems
Charles Bailey 15:56 on 22 Dec 2004

Re: before_create trigger problems
Emile Aben 17:24 on 22 Dec 2004

Generated at 12:15 on 16 Jan 2005 by mariachi v0.52