cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Menard" <>
Subject objectForPk refetch
Date Mon, 20 Aug 2007 17:43:18 GMT
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.




  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message