RE: Storing a copy of a DataObject in the session

From: Fredrik Liden (flide..ranslate.com)
Date: Tue Mar 15 2005 - 14:27:24 EST

  • Next message: Bryan Lewis: "Re: Storing a copy of a DataObject in the session"

    Are you actually storing live DataObjects in the session? and it's
    keeping it's relationship with the Context?

    Do you have to make sure the status is not new or updated? So not to
    accidentally commit something later on or having some ID generation
    conflict? Or what if several people store the same object in their
    sessions, hmm?

    So by storing a bunch of DataObjects in a session you don't need any
    beans like struts formbeans to maintain state? That sounds pretty good!

    /Fredrik

    -----Original Message-----
    From: Mike Kienenberger [mailto:mkienen..laska.net]
    Sent: Monday, March 14, 2005 10:44 AM
    To: cayenne-use..bjectstyle.org
    Cc: cayenne-use..bjectstyle.org
    Subject: Re: Storing a copy of a DataObject in the session

    Fredrik Liden <flide..ranslate.com> wrote:
    > Is there a way to clone a DataObject to be an independent read-only
    > object and store it in the session. That way I don't have to refetch
    the
    > DataObject everytime I want to print one of the values. I'm guessing
    > it's not good to store the DataObject in the session because of
    locking
    > etc.

    I store DataObjects in the session without problem. There are no
    locking
    issues that I am aware of.

    -Mike



    This archive was generated by hypermail 2.0.0 : Tue Mar 15 2005 - 14:26:36 EST