ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Warren Bell" <war...@clarksnutrition.com>
Subject RE: Populating 2 lists within a class
Date Thu, 03 Mar 2005 00:04:06 GMT
Sybase using an ODBC driver

-----Original Message-----
From: Clinton Begin [mailto:clinton.begin@gmail.com]
Sent: Wednesday, March 02, 2005 3:35 PM
To: ibatis-user-java@incubator.apache.org
Subject: Re: Populating 2 lists within a class


Uh oh.  Would you by chance be using Microsoft Access or perhaps MS SQL
Server?

Cheers,
Clinton


On Wed, 2 Mar 2005 15:02:50 -0800, Warren Bell
<warren@clarksnutrition.com> wrote:
> I have a class that has two Lists as properties. I can populate one or the
> other List, but I can not seem to get both of them populated. I have
> switched the order of the List mappings and it always has a problem with
the
> last one listed. The two lists are itemMovement and itemPromoPrices1 in
the
> result map "get-Item-Result1". I am getting a java.sql.SQLException: No
data
> found Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:. Any
> help will be appreciated.
>
>   <resultMap id="get-Item-Result1" class="item">
>     <result property="upc" column="INV_ScanCode"/>
>         <result property="desc" column="INV_Name"/>
>     <result property="brand" column="BRD_Name"/>
>     <result property="size" column="INV_Size"/>
>     <result property="unit" column="PI1_Description"/>
>     <result property="department" column="DPT_Name"/>
>     <result property="category" column="PI4_Description"/>
>     <result property="vendorSKU" column="ORD_SupplierStockNumber"/>
>     <result property="cost" column="INV_LastCost"/>
>     <result property="price" column="SIB_BasePrice"/>
>     <result property="itemMovement" column="INV_ScanCode"
> select="getItemMovement1"/>
>     <result property="itemPromoPrices1" column="INV_ScanCode"
> select="getItemPromoPrice1"/>
>   </resultMap>
>
>   <resultMap id="get-Item-Promo-Price-Result1" class="promoPrice1">
>     <result property="upc" column="INV_ScanCode"/>
>     <result property="description" column="PCD_WRKName"/>
>     <result property="salePrice" column="PCD_Price_pl1"/>
>     <result property="promoStartDate" column="PCD_PSWStartDate"/>
>     <result property="promoEndDate" column="PCD_PSWEndDate"/>
>     <result property="priorityLevel" column="PCD_PriorityLevel"/>
>     <result property="discountKey" column="PCD_DIS_FK_pl1"
> nullValue="-999"/>
>   </resultMap>
>
>   <resultMap id="get-Item-Movement-Result1" class="movement">
>     <result property="upc" column="Scancode"/>
>     <result property="movementDate" column="ISG_StartTime"/>
>     <result property="quantity" column="SIT_Quantity"/>
>   </resultMap>
>
>   <select id="getItem1" parameterClass="java.lang.String"
> resultMap="get-Item-Result1">
>     SELECT INV_ScanCode, INV_Name, BRD_Name, INV_Size, PI1_Description,
> DPT_Name, PI4_Description, ORD_SupplierStockNumber, INV_LastCost,
> SIB_BasePrice FROM v_InventoryMaster WHERE INV_ScanCode = #value#
>   </select>
>
>   <select id="getItemPromoPrice1" parameterClass="java.lang.String"
> resultMap="get-Item-Promo-Price-Result1">
>     SELECT INV_ScanCode, PCD_WRKName, PCD_Price_pl1, PCD_PSWStartDate,
> PCD_PSWEndDate, PCD_PriorityLevel, PCD_DIS_FK_pl1 FROM v_InventoryMaster,
> PriceChangeData WHERE INV_PK = PCD_INV_FK AND INV_CPK = PCD_INV_CFK AND
> INV_ScanCode = #value#
>   </select>
>
>   <select id="getItemMovement1" parameterClass="java.lang.String"
> resultMap="get-Item-Movement-Result1">
>     SELECT Scancode, ISG_StartTime, SIT_Quantity FROM v_SummaryItems WHERE
> Scancode = #value#
>   </select>
>
> Thanks,
>
> Warren Bell
> Systems Administrator
> Clark's Nutritional Centers
> 4225 Market St.
> Riverside, CA 92501
> 951-321-1960 ext. 142
> 909-645-8864 mobile
>
>



Mime
View raw message