ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tamilselvan Radha Krishnan" <Tamilselvan.RadhaKrish...@igate.com>
Subject RE: Need help on nested N + 1 query
Date Tue, 28 Nov 2006 18:30:41 GMT
Thanks Chris. I could see the  suggestions for my query.

Regards 

Tamil 
|Technical Lead| iGATE Global Solutions Limited|Office: 52250000 Extn
2271| tamilselvan.radhakrishnan@igate.com
<mailto:tamilselvan.radhakrishnan@igate.com> | 106-109, MAC Commerce
park, Anna Salai, Guindy, Chennai 600032 India | Website: www.igate.com

________________________________

From: Christopher.Mathrusse@sybase.com
[mailto:Christopher.Mathrusse@sybase.com] 
Sent: Tuesday, November 28, 2006 11:44 PM
To: user-java@ibatis.apache.org
Subject: RE: Need help on nested N + 1 query

 

How about searching the archives?

http://www.mail-archive.com/user-java@ibatis.apache.org/

 

________________________________

From: "Tamilselvan Radha Krishnan" <Tamilselvan.RadhaKrishnan@igate.com>
[mailto:"Tamilselvan Radha Krishnan"
<Tamilselvan.RadhaKrishnan@igate.com>] 
Sent: Tuesday, November 28, 2006 10:12 AM
To: <user-java@ibatis.apache.org>
Subject: RE: Need help on nested N + 1 query

Hi Jeff,

Sorry I guess my mail box should have bounced as I didn't receive
response for the help I requested. Can you please let me know where can
I see those suggestions if I have not received my email. Thanks.

Regards 

Tamil 
|Technical Lead| iGATE Global Solutions Limited|Office: 52250000 Extn
2271| tamilselvan.radhakrishnan@igate.com
<mailto:tamilselvan.radhakrishnan@igate.com> | 106-109, MAC Commerce
park, Anna Salai, Guindy, Chennai 600032 India | Website: www.igate.com

________________________________

From: Jeff Butler [mailto:jeffgbutler@gmail.com] 
Sent: Tuesday, November 28, 2006 10:56 PM
To: user-java@ibatis.apache.org
Subject: Re: Need help on nested N + 1 query

 

Please stop asking the same question over and over again!

 

If you want some help, reply to some of the suggestions that were
offered the first time you asked this question.

 

Jeff Butler



 

On 11/28/06, Tamilselvan Radha Krishnan
<Tamilselvan.RadhaKrishnan@igate.com> wrote: 

Hi,

I've written a N + 1 query in Ibatis such a way that it will return the
nested results as below :

   Customer - First object

             DealFacility - An array list of objects within Customer

                     Facility - An array list of objects within
DealFacility

                        LoanInfo - An array list of objects within
Facility

    

The Customer object is having a 'strCustomerId' as an attribute.  I need
to use this 'strCustomerId' in the WHERE clause of the query used for
populating 'LoanInfo'  (<select id="getFacilityLoans"  )  i.e, 3 level
below the Customer, in addition to 'Facility' class above.

I've placed my Login.xml query below.  

<resultMap id="customersResults"
class="com.ge.cf.myaccounts.domain.Customer"> 

        <result property="strCustomerId"
column="CUSTOMER_CODE"/>

        <result property="strCustomerName"
column="CUSTOMER_NAME"/>

        <result property="alDealFacilities"
column="CUSTOMER_CODE"          select="Login.getDealFacilities"/>


   </resultMap>

   

   <select id="getCustomerDetails"  resultMap="customersResults"
parameterClass="com.ge.cf.myaccounts.domain.Customer"> 

        SELECT   CUSTOMER_CODE,CUSTOMER_NAME

                FROM     STG_INTM_CUSTOMER_INFO 

                WHERE    CUSTOMER_CODE=#strCustomerId#


   </select>  

   ..

..

..

<select id="getDealFacilities"  resultMap="dealFacilityResults"
parameterClass="java.lang.String">  (selecting Facilities here) 

<select id="getFacilities"  resultMap="facilityResults"
parameterClass="java.lang.String">   (Selecting facility loans here) 

<select id="getFacilityLoans"  resultMap="facilityLoanResults"
parameterClass="java.lang.String">  (In this query, I need to use the
"strCustomerId" from the first Customer object within the N+1 query. 

Any suggestion would be much helpful.

Regards,

Tamil

 

 

 


_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Information transmitted by this EMAIL is proprietary to iGATE Group of
Companies and is intended for use only by the individual  
or entity to whom it is addressed and may contain information that is
privileged, confidential, or exempt from disclosure under 
applicable law. If you are not the intended recipient of this EMAIL
immediately notify the sender at iGATE or  mailadmin@igate.com 
and delete this EMAIL including any attachments
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

 

 


_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Information transmitted by this EMAIL is proprietary to iGATE Group of
Companies and is intended for use only by the individual 
or entity to whom it is addressed and may contain information that is
privileged, confidential, or exempt from disclosure under 
applicable law. If you!  are not the intended recipient of this EMAIL
immediately notify the sender at iGATE or mailadmin@igate.com 
and delete this EMAIL including any attachments
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

 

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Information transmitted by this EMAIL is proprietary to iGATE Group of Companies and is intended
for use only by the individual 
or entity to whom it is addressed and may contain information that is privileged, confidential,
or exempt from disclosure under 
applicable law. If you are not the intended recipient of this EMAIL immediately notify the
sender at iGATE or mailadmin@igate.com 
and delete this EMAIL including any attachments
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Mime
View raw message