Re: Cayenne 2.0: obtaining a shared DataContext

From: Aristedes Maniatis (ar..aniatis.org)
Date: Sat Oct 27 2007 - 19:35:07 EDT

  • Next message: Tore Halset: "Re: Persistent+ObjAttribute -> value"

    On 28/10/2007, at 6:25 AM, Marc A. Donis wrote:

    > but that didn't seem to do the trick. I get an exception
    > indicating that I am not allowed to create a reference between
    > objects in two different DataContexts. Clearly, this is true...
    > unless one of the DataContexts is a shared DataContext (at least,
    > that's how it works in EOF).
    > What is the right way to obtain a shared DataContext? Or am I
    > going about this all wrong?

    There is no special 'shared context' like in EOF. You will have to
    copy the objects you want to the working context first using
    DataContext.localObject(). I agree it would be a neat feature, but
    not currently available.

    Ari Maniatis

    -------------------------->
    Aristedes Maniatis
    phone +61 2 9660 9700
    PGP fingerprint 08 57 20 4B 80 69 59 E2 A9 BF 2D 48 C2 20 0C C8



    This archive was generated by hypermail 2.0.0 : Sat Oct 27 2007 - 19:35:50 EDT