openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <ppod...@apache.org>
Subject Re: How to detect whether there are any dirty objects?
Date Tue, 15 Apr 2008 01:51:10 GMT

Hi,
  You need to downcast standard EntityManager to OpenJPA specific entity
manager which provides many extended utilities including access to dirty
objects in the current transaction.
 
  EntityManager em = ...;
  OpenJPAEntityManager oem = OpenJPAPersistence.cast(em); 
  Collection dirtyObjects = oem.getDirtyObjects();



David Goodenough-3 wrote:
> 
> Is there a way to detect whether there are any modified/dirty objects
> that need to be written to the datastore?  I do not need to know which 
> objects are dirty, just whether there are any.
> 


-- 
View this message in context: http://www.nabble.com/How-to-detect-whether-there-are-any-dirty-objects--tp16641615p16693472.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message