The idea is that Toplink JPA supports that feature. OpenJPA - no.
Maybe this can be done as some configurable behaviour ?
They do, but really, all that they are doing is hiding the open EM. In
other words, the objects are not actually really detached yet.
What type of application are you
Another way to achieve this is to use different fetch plans for
different use cases, which will result in the right stuff being
detached in each context.
You would still need to manually tune what gets detached, of course.
And i'm kinda unwilling to inject EntityManager into those top-level
Hi,
Lazy loading is not available for detached entities -- by definition,
they are no longer associated with the database.
You can, however, control whether OpenJPA returns null or throws an
exception when an unloaded field is accessed.
If you want to be able to lazily access a field after a
Hi,
i am also working in a highly detached environment because of auto-
detachment when giving data to a different layer (questionable
approach i know, but i dont need to inject persistenceManagers
everywhere then). So i also have this lazy loading problem. I
circumvent this kind of issue
Hi Evgeny,
The JPA spec is clear on the concept of a detached instance: the
instance can be used without access to the underlying database or the
persistence context whence it came. The instance can be serialized
and used in a different tier entirely. The instance can be used in a