updating Many to Many rel. using Multiple HTML select

From: Gritsenko Dmitry (dim..kreative.com)
Date: Thu Nov 11 2004 - 06:04:55 EST

  • Next message: Andrus Adamchik: "Re: Reenginering MsSqlServer Database"

    Dear list,

    I have 3 tables with Many to Many rel.: user <-> user_groups <-> group
    which are flattened on Object layer.

    In Edit User form I have a multiple HTML select for updating groups list for the user being edited.
    in my action script I first delete all the groups for this user and then I add all the users which I read from HTML multiple select.

    As a result in DB I get duplicate records in user_groups resulting in duplicate groups for one userd.

    What am I doing wrong? What is the correct way to update Many to Many flattened relationship?

    Thank you.

    Dmitry.



    This archive was generated by hypermail 2.0.0 : Thu Nov 11 2004 - 06:07:29 EST