Updating binary links

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Feb 16 03:38:13 CST 2007


On 16/2/07 10:16 AM, "Danny Lewkin" <daniel.lewkin at cognosis.be> wrote:

Hi Danny,

> I have to 2 tables, tbl_usertypes and tbl_users. Between them there
> is a binary link, lnkusertype (so without objectpointers of foreign
> key).

And they are M:M, yes?

> I already have records in the tables, linked to eachother.

> If I want to change the usertype of a user, it's clear to me that I
> have to change the link between that user in the tbl_user and the
> usertype in tbl_usertype.

yes

> But I can't seem to find any other way to do this, other than first
> unlink the existing link user-usertype, en linking it again.
> Or is there another "update link" method in API or an "update link"
> SQL function, that I hav missed?

No, because I do not see HOW this can be written.

If you compare to MM link-table you also need do

    DELETE
    INSERT 

Hmm, you know, may be we can do something as


    REPLACE link_name (r1,r2) ON (r1', r2')

This can work...

Can you add such request to Mantis?


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list