[CDBI] Deep recursion from before_create trigger

[prev] [thread] [next] [Date index for 2005/09/09]

From: Phil Mitchell
Subject: [CDBI] Deep recursion from before_create trigger
Date: 23:26 on 09 Sep 2005
I want to do data normalization in before_create trigger. So I access
columns such as $self->title() and normalize the value (if it exists).
The infinite loop arises when that column has not in fact been set --
I'm guessing bc CDBI then wants to fetch it from the DB, but it
doesn't exist yet ... although I don't really understand that.

Anyhow, it is fixed by using $self->{title} instead, but this seems
ugly and leaves me nervous. I'd like to understand what's going on and
whether it's a bad idea to do this kind of work in the trigger...
--=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
2People Blog: http://2-people.blogspot.com/
2People site: http://www.2people.org

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

[CDBI] Deep recursion from before_create trigger
Phil Mitchell 23:26 on 09 Sep 2005

Generated at 23:46 on 13 Sep 2005 by mariachi v0.52