Re: DataObject becomes hollow when passed through a tapestry DirectLink

From: Todd O'Bryan (toddobrya..ac.com)
Date: Thu Mar 31 2005 - 03:20:21 EST

  • Next message: Erik Hatcher: "Re: DataObject becomes hollow when passed through a tapestry DirectLink"

    I also went to using ObjectIds as parameters for DirectLinks. It makes
    the handling code a little more complex, but seems to work without a
    hitch. My guess is that serializing/deserializing an ObjectId is also
    quite a bit less work than a whole DataObject, so Tapestry may be doing
    less work between requests.

    Does dc.refetchObject(ObjectId) also do the right thing, or should I
    fix all of my current calls to use objectForPK so that things don't get
    refetched from the DB if they don't need to be?

    Thanks,
    Todd

    On Mar 30, 2005, at 9:25 PM, Andrus Adamchik wrote:
    >
    > Yep, this is a good solution ... Besides you don't have to refetch (in
    > a sense of doing a DB round trip), just use
    > DataObjectUtils.objectForPK - it will get an object from cache or
    > refetch as needed (so it will do the most efficient thing
    > transparently), and also attach this object to your current
    > DataContext.
    >
    > Andrus
    >



    This archive was generated by hypermail 2.0.0 : Thu Mar 31 2005 - 03:20:26 EST