openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MiƂosz Tylenda <>
Subject Re: Partial populate of POJO
Date Thu, 23 Oct 2008 07:46:46 GMT

> Okay, I figured out the problem.  The FetchGroup doesn't actually let me
> dictate between fetching or not fetching a specific property.  Rather, it
> only lets me mark fields as lazily vs. eagerly loaded.  So, when I was
> calling the getter it was making a separate call to the database to populate
> my variable at that time.  I get it.  Unfortunately, I will want to call
> these getters later, even on fields which I don't want to fetch.  I do not
> want it going back to the database to fetch that information for me.  Is
> there any way I can do that aside from using reflection to access the
> property directly? 

Not sure if this possible in you particular situation, but what if you detach your object
before calling getters? I mean

EntityManager.clear() or OpenJPAEntityManager.detach(pc)


View raw message