AW: objectFromDataRow with refresh

From: Peter Schröder (Peter.Schroede..reenet-ag.de)
Date: Thu Dec 14 2006 - 05:56:17 EST

  • Next message: Peter Schröder: "modeling queries and inconsistent newlines"

    hi,

    first of all, thank you for the fast and helpfull komments in this mailing-list.

    i have another question concerning context.objectFromDataRow():

    as you said, it populates the new data through the datacontext if you use refresh=true. is there a possibility to advise cayenne to store the "fresh" data into the database? i need this, because i get the datarow from a tmp-table with the same structure as the master table.
    my workaround is, that i "clean" the object and put all data in it back from the datarow and commit afterwards... i think there must be a smarter solution to this.

    kind regards
    peter

    -----Ursprüngliche Nachricht-----
    Von: Andrus Adamchik [mailto:andru..bjectstyle.org]
    Gesendet: Montag, 11. Dezember 2006 18:12
    An: cayenne-use..ncubator.apache.org
    Betreff: Re: objectFromDataRow with refresh

    Hi,

    It refreshes any previously cached version of the object with the
    data stored in the passed data row.

    Andrus

    On Dec 11, 2006, at 5:31 PM, Peter Schröder wrote:

    > hi,
    >
    > i am wondering what the refresh param of context.objectFromDataRow
    > does exactly?
    >
    > does it refresh the data of the object in the context, which i can
    > commit with context.commitChanges,
    > or does it fetch refreshed data for the object from the database?
    >
    > kind regards
    > peter
    >



    This archive was generated by hypermail 2.0.0 : Thu Dec 14 2006 - 05:56:52 EST