These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Fetching associations, HQL and <any>
PostPosted: Mon Feb 09, 2009 11:05 am 
Newbie

Joined: Mon Feb 09, 2009 10:54 am
Posts: 1
Hi,

I've got a slight N+1 issue with an object that is retrieved using HQL. The object in question (FinancialTransaction) has got an <any> mapping (see below) Is it possible to eager initialize objects a that are mapped using the 'any' property?

E.g:

If I had a mapping such as this one could I eager load these obejcts as part of an HQL query using 'left join fetch' or similar?:

<any name="payable" meta-type="string" id-type="Int32" cascade="none" access="field">
<meta-value value="MP" class="MainPolicy"/>
<meta-value value="PI" class="Policy"/>
<meta-value value="AP" class="AdditionalPremiumPolicyInfo"/>
<meta-value value="PF" class="PolicyProviderFee"/>
<column name="PayableType"/>
<column name="PayableId"/>
</any>


If not are there any workarounds I could try?

The HQL query I am using is a basic select

Many thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.