Re: Cayenne for SIM-like game

From: Mike Kienenberger (mkienen..laska.net)
Date: Wed Dec 29 2004 - 12:21:51 EST

  • Next message: Dave: "Re: Cayenne for SIM-like game"

    Dave <sanxion200..ahoo.com> wrote:
    > I've gone ahead with this design. A main DataContext
    > that loads the DataObjects needed at runtime. I create
    > a new temporary DataContext whenever I need to do an
    > update.
    >
    > This works fine, except when I want to create a new
    > DataObject. I can't create it in my temporary
    > DataContext as it will not allow me to create any
    > relationships to objects in my main context.
    >
    > How should I implement this? I wanted a read-only-main
    > context, and temporary contexts doing all
    > inserts/updates/deletes. Is it possible?

    You just need to use temporaryDataContext.localObjects() on your
    relationship objects to put a copy of each into your temporary data context
    so you can set a relationship to them.

    -Mike



    This archive was generated by hypermail 2.0.0 : Wed Dec 29 2004 - 12:19:46 EST