RE: Reblessing question: change primary key name?
[prev]
[thread]
[next]
[Date index for 2005/01/10]
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
|
|
RE: Reblessing question: change primary key name?
Dmitri Bichko 00:57 on 10 Jan 2005
|