Re: Warning if primary key is changed (was Re: Ignorance prevention)

[prev] [thread] [next] [Date index for 2004/10/24]

From: Tony Bowden
Subject: Re: Warning if primary key is changed (was Re: Ignorance prevention)
Date: 14:06 on 24 Oct 2004
On Fri, Oct 08, 2004 at 03:56:45PM -0400, William McKee wrote:
> I've attached the updated test script and the updated DBI.pm along with
> doc updates.

Thanks for this, and sorry for the delay in getting round to it ..

> +			if ( defined $class->primary_column and $obj->name eq $class->primary_column->name ) {
> +				$acc_type = "make_ro_accessor";
> +			}

Are you deliberately only checking for single column primary keys? Or
was this an oversight?

I think the best approach here is probably to add an is_primary method to
Class::DBI::Column that can be checked here.

Tony

(message missing)

Ignorance prevention
William McKee 11:59 on 16 Sep 2004

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

Re: Warning if primary key is changed (was Re: Ignorance prevention)
Tony Bowden 14:06 on 24 Oct 2004

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