update of many to many

From: Tore Halset (halse..vv.ntnu.no)
Date: Fri Aug 22 2003 - 11:22:36 EDT

  • Next message: Holger Hoffstätte: "Re: update of many to many"

    Hello

    I have the following relation:
    User<<-->>Countrycode

    The following works ok
    myUser.addToCountrycodes(aCountrycode);
    myUser.setUserFullName("New Fullname");
    ctx.commitChanges();

    Both the userFullName and the relation are updated ok in the database.

    *But*, if I only change the relation like this:
    myUser.addToCountrycodes(aCountrycode);
    ctx.commitChanges();

    The relation are not updated. No errormessage. Nothing are saved to the
    database.

    If I then change the userFullName and do a new commit, both the fullname
    and the relation are updated in the database.

    The same problem happens when I am using removeFrom instead of addTo;
    Something else has to be changed before the change are saved to the
    database.

    Looks like a bug to me. Or am I doing something wrong? This is with
    cayenne-1.0rc1 and PostgreSQL.

    Regards,
     - Tore.



    This archive was generated by hypermail 2.0.0 : Fri Aug 22 2003 - 11:13:17 EDT