openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <>
Subject RE: subclass lazy fetching
Date Sun, 14 Nov 2010 23:31:47 GMT

Hi Stephen,
  FetchPlan.removeField(A.class, "fieldA") acts to remove the fieldA *if* it
were previously added to the plan. It does not nothing if fieldA were not
added explicitly to the plan. In that sense, FetchPlan.removeField() does
*not* mean "exclude fieldA from being fetched". I think this is weak
semantically and usage-wise. 

  Given that, to support your use case is somewhat tricky. A poor suggestion
is to define a named fetch group X (on the base class that declared the
'eager' field ) such that X does not include the eager field and use it as
  EntityManager em = ...;
  FetchPlan plan = OpenJPAPersistence.cast(em).getFetchPlan(); 
  // do something such as query of find with em 

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message