Return-Path: Delivered-To: apmail-incubator-ibatis-user-java-archive@www.apache.org Received: (qmail 29278 invoked from network); 23 May 2005 17:40:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 May 2005 17:40:59 -0000 Received: (qmail 97439 invoked by uid 500); 23 May 2005 17:12:58 -0000 Delivered-To: apmail-incubator-ibatis-user-java-archive@incubator.apache.org Received: (qmail 97368 invoked by uid 500); 23 May 2005 17:12:56 -0000 Mailing-List: contact ibatis-user-java-help@incubator.apache.org; run by ezmlm Precedence: bulk Reply-To: ibatis-user-java@incubator.apache.org List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list ibatis-user-java@incubator.apache.org Received: (qmail 97353 invoked by uid 99); 23 May 2005 17:12:56 -0000 X-ASF-Spam-Status: No, hits=1.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,HTML_30_40,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from web81801.mail.mud.yahoo.com (HELO web81801.mail.mud.yahoo.com) (68.142.207.166) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 23 May 2005 10:12:56 -0700 Received: (qmail 55853 invoked by uid 60001); 23 May 2005 17:12:37 -0000 Message-ID: <20050523171237.55851.qmail@web81801.mail.mud.yahoo.com> Received: from [64.80.249.226] by web81801.mail.mud.yahoo.com via HTTP; Mon, 23 May 2005 10:12:37 PDT Date: Mon, 23 May 2005 10:12:37 -0700 (PDT) From: Karen Koch Subject: Recommended practice / nested ResultMaps To: ibatis-user-java@incubator.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1864221617-1116868357=:55833" X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --0-1864221617-1116868357=:55833 Content-Type: text/plain; charset=us-ascii Given the following nested resultMap configuration with the child resultMap including a complex property that is part of the groupBy, how should the groupBy on that property be specified? I tried using the complex property name, and I tried qualifying the complex property name with the simple key-value sub-property -- neither worked properly. Thanks thanks thanks! Karen --0-1864221617-1116868357=:55833 Content-Type: text/html; charset=us-ascii
Given the following nested resultMap configuration with the child resultMap including a complex property that is part of the groupBy, how should the groupBy on that property be specified?  I tried using the complex property name, and I tried qualifying the complex property name with the simple key-value sub-property -- neither worked properly.
 
<resultMap id="distUsagesResult" class="distUsages" groupBy="distKey, entryDate">
    <result property="distKey" column="DistKey"/>
    <result property="entryDate" column="Date"/>
    <result property="org" column="Org"/>
    <result property="costCtr" column="CostCtr"/>
    <result property="task" column="Task"/>
    <result property="option" column="Option"/>
    <result property="statisticList" resultMap="StatType.statisticResult"/>    
  </resultMap>
 
 
<resultMap id="statisticResult" class="statistic" groupBy="distKey, entryDate, statType"> 
<!-- also tried <resultMap id="statisticResult" class="statistic" groupBy="distKey, entryDate, statType.statTypeKey"> -->
    <result property="distKey" column="StatDistKey"/>
    <result property="entryDate" column="StatEntryDate"/>
    <result property="statType" column="StatTypeKey" select="getStatType"/>
    <result property="numUnits" column="StatNumUnits"/>
  </resultMap>
 
<resultMap id="statTypeResult" class="statType">
    <result property="statTypeKey" column="StatTypeKey"/>
    <result property="statTypeID" column="StatTypeID"/>
    <result property="statTypeDesc" column="StatTypeDesc"/>
    <result property="measUnits" column="MeasUnits"/>
    <result property="numDecPlaces" column="NumDecPlaces"/>
    <result property="org" column="Org"/>
    <result property="account" column="Account"/>
    <result property="costCtr" column="CostCtr"/>
    <result property="task" column="Task"/>
    <result property="option" column="Option"/>
  </resultMap>
 
Thanks thanks thanks!
 
Karen
--0-1864221617-1116868357=:55833--