openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste BRIAUD -- Novlog <j-b.bri...@novlog.com>
Subject Re: Fetch Plan ands collections mapped
Date Wed, 21 Jul 2010 16:36:30 GMT
3. Yes, it is possible to activate fetchplan dynamically, for only one request if you want.
2. No idea, I simply forbid lazy, why would you leave a lazy attribute ? It will cause an
extra request that has a cost ...
1. I'm not sure in your exact context because we annotate at attribute level rather than accessor
level but in our case, you would put the corresponding attribute name in the fetch plan.


On 21 juil. 2010, at 17:30, killbulle wrote:

> 
> Hi,
> we have three little questions about fetchplans(we love it)
> 
> How can we configure our fetching to get element of a Map ?
> 
> addField(CustomerImpl.class, <???>);
> Map belong to Customer with this mapping
> 
> 	@OneToMany(targetEntity = CustomerProfileValueImpl.class,
> 			   cascade = { CascadeType.ALL }, fetch = FetchType.EAGER)
> 	@MapKey(name = "localizedAttributeKey")
> 	@ElementDependent
> 	@ElementJoinColumn(name = CUSTOMER_UID)
> 	@ElementForeignKey(name = "tcustomerprofilevalue_ibfk_2")
> 	public Map<String, AttributeValue> getProfileValueMap() {
> 		return profileValueMap;
> 	}
> 
> 2)Is it possible that fetchplan leave field in lazy mode and not return null
> value to the fields unselected ?
> 
> 3)
> 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
> 
> Regards 
> Marc
> 


Mime
View raw message