Reblessing question: change primary key name?

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

From: Dmitri Bichko
Subject: Reblessing question: change primary key name?
Date: 23:33 on 09 Jan 2005
Hello,

I'm sure this has been talked about before, but I can't seem to be able
to find the conversation.

I'm trying to rebless an retrieved C:DBI object into a subclass of its
original class that adds some (non-Essential) columns, removes some
columns (no problems with those two) and changes the name of the primary
key (that one's a problem).

I don't want to change the value of the primary key (a big no-no from
what I understand), just the name.  Most importantly the reblessing
procedure should not hit the database at all (until the object goes to
lazily fetch the new column group defined in the subclass).

Is there a way to rename the column name, its accessor and mutator?  I
don't care if the old value is still there, as long as it doesn't try to
fetch the old column on the next database trip.

Another approach I am thinking of is to ->construct() the new object I
want from scratch, but this requires overloading the constructors and
I'd much rather do the reblessing from a 'select' trigger (seems like
it'd be faster, too).

Any suggestions?

Sorry if this has been talked about to death, I can't seem to find
anything relevant in the archives.

Dmitri

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