I use this in my Cayenne 1.1 project.
dataContext.invalidateObjects(dataContext.getObjectStore().getObjects());
In my 1.1 junit tests, I go even farther:
getDataContext().rollbackChanges();
getDataContext().invalidateObjects(getDataContext().getObjectStore().getObjects());
getDataContext().getObjectStore().getDataRowCache().clear();
-Mike
On 7/26/06, Gentry, Michael (Contractor) <[EMAIL PROTECTED]> wrote:
Man, 1.1.3 is like ... so last week. :-)
Would DC's unregisterObjects() or invalidateObjects() do what you want?
(I think those were available in 1.1.3.)
/dev/mrg
-----Original Message-----
From: Tobias SCHOESSLER [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 26, 2006 7:39 AM
To: [email protected]
Subject: Clear DataContext Cache
Hello,
In cayenne 1.1.3 is it possible to clear the object cache of a
DataContext
manually?
I do not want to recreate the DataContext as it is being used in several
controllers that would otherwise need to be refreshed.
thanks.