openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <ppod...@apache.org>
Subject Re: Fetch Plan ands collections mapped
Date Wed, 21 Jul 2010 16:33:27 GMT

> 1)Is it possible that fetchplan leave field in lazy mode and not return
null value to the fields unselected ? 

Donot understand the question properly. But if the question is how the
serialized state of an entity will be (when, say, the entity is accesses and
then detached and serialized to web tier)  w.r.t. its multi-valued
associations, then the answer is the serialized state and behavior is
controlled by the fact whether the remote client has access to OpenJPA
libraries. If yes, then OpenJPA will use a serialization technique that will
allow the user to control the behavior when a multi-valued association is
accessed in remote tier. It can be controlled to disallow access to any
fields that has not been a part of the fetch plan or return a null value.

> In the api there is OPenJPAQuery.getFetchplan there is a getFetplan method
does this fetplan is scoped to the request only ? and more is it possible to
scope fetcplan to only one query

An EntityManager E statrts with a FetchPlan say F0. When E creates a query Q
, Q initially has the the copy of the plan F0. But the plan on Q can be
changed to say F1. It does not affect E's plan. Now E's plan F0 can be
modified to say F0'. The another query Q2 is created. Now Q2 will have a
copy of plan F0'. 

-----
Pinaki 
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/Fetch-Plan-ands-collections-mapped-tp5321552p5321795.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message