Re: [CDBI] Cascading Update

[prev] [thread] [next] [Date index for 2006/02/06]

From: Jay Hargreaves
Subject: Re: [CDBI] Cascading Update
Date: 22:49 on 06 Feb 2006
Thanks Kingsley - I see your point but given that the site is already 
live and it's gonna be a pain to start adding extra "ID" fields 
everywhere (it's not just the News and NewsCategories tables that are 
linked in this way) is there an easier workaround? Surely there must be 
some way to do this? I don't really see the point in having a "primary 
key" and and "ID" field just for this purpose...

If not I'll presumably still want the "ID" field to be unique - is there 
some way to specify this in the Class::DBI table definition or is it 
down to the underlying database to take care of this?

Kingsley Kerce wrote:
> Jay Hargreaves writes:
>  > I've created an admin script to allow users to create/modify/delete News 
>  > and NewsCategories entries. But I am having trouble when updating the 
>  > NewsCategories entry with a new ID. If I just change the ID in the 
>  > object and do an update nothing happens - perhaps I have missed 
>  > something as this seems the obvious way to do this.
> 
> Hi Jay -- Separate your notion of ID and primary key, and allow users
> to modify a non-primary-key field named "ID".  Better yet, name the
> field something other than "ID".
> 
> Generally, it's best to keep primary keys behind the scenes, away from
> users.
> 
> Kings
> 
> 

        -- 
        bingo, bango, bosh...

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

(message missing)

[CDBI] Cascading Update
Jay Hargreaves 21:38 on 06 Feb 2006

Re: [CDBI] Cascading Update
yoorobot 22:14 on 06 Feb 2006

Re: [CDBI] Cascading Update
Jay Hargreaves 22:54 on 06 Feb 2006

Re: [CDBI] Cascading Update
yoorobot 23:05 on 06 Feb 2006

Re: [CDBI] Cascading Update
Jay Hargreaves 23:26 on 06 Feb 2006

Re: [CDBI] Cascading Update
.--- .- -- . ... 14:59 on 07 Feb 2006

Re: [CDBI] Cascading Update
Kingsley Kerce 22:20 on 06 Feb 2006

Re: [CDBI] Cascading Update
Jay Hargreaves 22:49 on 06 Feb 2006

Re: [CDBI] Cascading Update
Jay Hargreaves 15:02 on 07 Feb 2006

Generated at 23:19 on 12 Feb 2006 by mariachi v0.52