Re: [CDBI] Cascading Update
[prev]
[thread]
[next]
[Date index for 2006/02/06]
Thanks for your reply James - I'm talking about the NewsCategory.id and
so yes I'm talking about modifying a primary key. There must be some way
to do this?
yoorobot wrote:
> Jay Hargreaves wrote:
>
>> 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.
>>
>
> I'm confused, NewsCategories has many News? And so, you are trying to
> update News.NewsCategory_id ? or NewsCategory.id? In the latter case,
> it /sounds/ like you're trying to muck with a primary key which is bound
> to "not work" and in the former case, you could write an after update
> trigger to handle updating the news category ids in News with a
> different NewsCategory.id (assuming that the intent is to change the
> category the news item belongs to). Sorry if I've read your question
> wrong.
>
> - James
>
>
>
--
bingo, bango, bosh...
_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi
|
(message missing)
|