Re: Working with Transient Objects

From: Elia Morling (eli..amiljen.se)
Date: Wed Jun 30 2004 - 16:58:12 EDT

  • Next message: Bryan Lewis: "Re: Not using ID in entity (java class)?"

    Greetings,
    This is rather dissapointing. I'm worried about the lack of control for
    individual DataObjects. A DataContext.commit() is very powerful,
    but it would be nice with the addition of
    DataContext.commit(Collection listOfDataObjects). Is anything like
    this in the pipe?

    I think I'll revert to implementing a load() and save() method using
    DataObjects within objects in the meanwhile. It will solve my problem
    with temporary objects and add more control of what is actually being
    stored in the database. I may be wrong and missing an important puzzle
    part, but I think Cayenne is best used for applications with extremely
    fixed relations between Objects in memory coressponding to rows in
    the database.

    Elia

    ----- Original Message -----
    From: "Andrus Adamchik" <andru..bjectstyle.org>
    To: <cayenne-use..bjectstyle.org>
    Sent: Wednesday, June 30, 2004 8:01 PM
    Subject: Re: Working with Transient Objects

    >
    >
    >
    > > Ok, before I run down this route, which will be costly,
    >
    > I argue that it won't. Collection decorators are lazy and can be optimized
    > for your use without changing public object API.
    >
    > The most important aspect of this is that you are not trying to trick
    > Cayenne, instead you just take Cayenne out of the picture when your
    > objects are truly TRANSIENT. This is as clean as it can get.
    >
    > Your solution with forcing TRANSIENT has a problem that an object will
    > still be injected into the ObjectStore, and Cayenne can get really
    > confused at times. This will be prone to lifecycle changes in the future
    > versions of Cayenne, and will probably not work in the current version as
    > well (or rather will require more Cayenne hacks than is obvious right
    > now).
    >
    > Andrus
    >
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Jun 30 2004 - 16:58:17 EDT