objectForPk refetch

From: Kevin Menard (kmenar..ervprise.com)
Date: Mon Aug 20 2007 - 13:43:18 EDT

  • Next message: Jens Mayer: "lookup-failure"

    I have the need to move objects and all of their relationships from one
    object context to another. I found it simplest to just make sure the
    object is in a committed state and then refetch it from the other
    context. Given that changes may happen at any time, but the
    aforementioned invariant is always maintained, it's best to just
    refetch. I had been using DataObjectUtils.objectForPk() to load up the
    object in the second context, but can't seem to trigger the refetch, as
    a cache lookup is performed.

     

    I got around the problem by performing and ObjectIdQuery manually, while
    changing the cache policy. Is this the best way to go about it?

     

    I was hoping that RefreshQuery would be my answer, but it doesn't seem
    to cause a refetch of simple properties.

     

    Thanks,

    Kevin



    This archive was generated by hypermail 2.0.0 : Mon Aug 20 2007 - 13:43:54 EDT