1-to-many relationships do not update on new query

From: Peter Backx (peter.back..ntec.ugent.be)
Date: Thu Sep 02 2004 - 09:37:30 EDT

  • Next message: Andrus Adamchik: "Re: auto_pk_support"

    I'm currently using Cayenne (1.1B2) with MySQL for a 3 table database
    with a few relationships. The database itself is changed by different
    programs concurrently and when I try to update the view in one program
    it works ok for basic objects, however if objects were added to a
    1-to-many relationship these don't seem to be updated.

    Maybe to make it more clear: I have Object1 that has a 1-to-many
    relationship with Object2. If I get Object1 through a query the first
    time everything works ok and Object1.getObject2s() works fine. However
    if new Object2's are added to that relationship (from another
    thread/program/DataContext) and I perform a new query to get Object1 I
    still get the old list of Object2's. So I don't see the newly added

    I thought that maybe caching was used but executing the following before
    querries does not help:
    also setting the NO_CACHE policy on the queries does not help.

    This looks like it could be a FAQ but I couldn't find anything, so any
    help would be greatly appreciated.


    This archive was generated by hypermail 2.0.0 : Thu Sep 02 2004 - 09:35:42 EDT