Re: Ignorance prevention

[prev] [thread] [next] [Date index for 2004/09/16]

From: Perrin Harkins
Subject: Re: Ignorance prevention
Date: 14:12 on 16 Sep 2004
On Thu, 2004-09-16 at 07:59, William McKee wrote:
> I've had two cases now where I've changed the primary key with unhappy
> consequences

Yes, this is completely unsupported in Class::DBI.  You would have to do
that in direct SQL instead.

> Obviously, I'd like to save myself from doing this a third time by
> adding an exception or at least a warning message to my logs when such a
> change occurs.
> 
> From the docs, it appears that this kind of warning may be desirable
> (see Caveats-- "I should really protect against this."). Is this code
> going to be difficult to add? I'm willing to take a stab at it if Tony
> or someone familiar with the codebase could give me any warnings or
> advice.

Sounds like a good idea to me.  Go for it.  You probably just need to
change the method generation code to provide different mutators for
primary key columns that croak with a message.

- Perrin

(message missing)

Ignorance prevention
William McKee 11:59 on 16 Sep 2004

Re: Ignorance prevention
Perrin Harkins 14:12 on 16 Sep 2004

Generated at 11:35 on 01 Dec 2004 by mariachi v0.52