RE: Reblessing question: change primary key name?

[prev] [thread] [next] [Date index for 2005/01/10]

From: Dmitri Bichko
Subject: RE: Reblessing question: change primary key name?
Date: 00:57 on 10 Jan 2005
D'oh!

Must've been messing up something different before: manually setting the
new key, clearing __Changed and removing the old key from Essential in
the subclass does exactly what I want.

Thanks anyway,
Dmitri

-----Original Message-----
From: Perrin Harkins [mailto:perrin@xxxx.xxx]=20
Sent: Sunday, January 09, 2005 7:05 PM
To: Dmitri Bichko
Cc: cdbi-talk@xxxxxx.xxxxx.xxx
Subject: Re: Reblessing question: change primary key name?


Dmitri Bichko wrote:
> Is there a way to rename the column name, its accessor and mutator?

This stuff happens at compile time.  It seems like re-blessing would do=20
what you want though.  What's going wrong?

> Another approach I am thinking of is to ->construct() the new object I

> want from scratch, but this requires overloading the constructors and=20
> I'd much rather do the reblessing from a 'select' trigger (seems like=20
> it'd be faster, too).

I'm not sure why it would involve overloading.  You can just grab the=20
data from one object and construct() another of a different class from
it.

Also, have you looked at Class::DBI::Relationship::IsA?

- Perrin


--=20
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.9 - Release Date: 1/6/2005

Reblessing question: change primary key name?
Dmitri Bichko 23:33 on 09 Jan 2005

Re: Reblessing question: change primary key name?
Perrin Harkins 00:05 on 10 Jan 2005

RE: Reblessing question: change primary key name?
Dmitri Bichko 00:34 on 10 Jan 2005

Re: Reblessing question: change primary key name?
Perrin Harkins 03:29 on 10 Jan 2005

RE: Reblessing question: change primary key name?
Dmitri Bichko 00:57 on 10 Jan 2005

Re: Reblessing question: change primary key name?
merlyn (Randal L. Schwartz) 01:07 on 10 Jan 2005

RE: Reblessing question: change primary key name?
Dmitri Bichko 03:30 on 10 Jan 2005

Generated at 12:48 on 22 Feb 2005 by mariachi v0.52