openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <>
Subject Re: Best practice: Using fetch groups or a "simple" DTO?
Date Tue, 26 Jul 2011 15:33:26 GMT
  How are you verifying whether a field data has been loaded in an entity
instance or not?
Please note that if you simply do
within an active persistence context, then as a side-effect, the getter 
will fetch the field value from the database (you can see extra SQL being
issued if you turn on SQL tracing). This is a case of classic Schrodinger's
Observer Effect as related to JPA :)

   So to verify correctly, close the persistence context before accessing
the fields. 

   Also, instead of 

Pinaki Poddar
Chair, Apache OpenJPA Project
View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message