openjpa-users mailing list archives

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

  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:
Sent from the OpenJPA Users mailing list archive at

View raw message