Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 72306 invoked from network); 10 Aug 2006 05:49:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Aug 2006 05:49:41 -0000 Received: (qmail 94641 invoked by uid 500); 10 Aug 2006 05:49:39 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 94626 invoked by uid 500); 10 Aug 2006 05:49:39 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 94615 invoked by uid 99); 10 Aug 2006 05:49:39 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Aug 2006 22:49:39 -0700 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [202.43.219.101] (HELO web8413.mail.in.yahoo.com) (202.43.219.101) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 09 Aug 2006 22:49:37 -0700 Received: (qmail 49261 invoked by uid 60001); 10 Aug 2006 05:49:14 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=s9M1D/ExHS88nPF6BcedYd+8WNHG6aSd7LPe5GiBAFn7DTt/Ye6XaNh1evXzaYxjrzFgITWRxsZUZIK3DdS4iqn3FZIwCfRxgj85WSIWG9YDQBY8nbOr0XZon8pG38BU97uiaT7q6YA2/8Wn5NGBjhN1Sxk3xEFFIe4IMojURwY= ; Message-ID: <20060810054914.49259.qmail@web8413.mail.in.yahoo.com> Received: from [210.211.198.76] by web8413.mail.in.yahoo.com via HTTP; Thu, 10 Aug 2006 06:49:14 BST Date: Thu, 10 Aug 2006 06:49:14 +0100 (BST) From: puneet arya Subject: Re: Stored procedure return value? To: user-java@ibatis.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-2124020612-1155188954=:48984" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --0-2124020612-1155188954=:48984 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit hi, see firstly u have 5 input parameters and 1 output parameter so so number of '?' should be 6 not 5 and u have to call ur stored procedure as {call FLUB_PROTO.flub_wall_tst.submit_flub_wall (?, ?, ?, ?, ?, ?)} Robert Campbell wrote: I'm trying to call a stored procedure. I pass it an object, it returns an object of the same type. Except it doesn't work. {call FLUB_PROTO.flub_wall_tst.submit_flub_wall (?, ?, ?, ?, ?)} Now this doesn't work.. I would expect the call to return a ResultSet which gets mapped by the resultMap into a new flubWall object. This doesn't happen. So I tried this: Added as first parameter listed in the parameterMap: Changed to: {? = call FLUB_PROTO.flub_wall_tst.submit_flub_wall (?, ?, ?, ?, ?)} This also doesn't work, I get this error as I expected: There is no READABLE property named 'output1' in class 'com.blah.flubWall' So how to do it? I saw examples where an object is mapped to a Map, then the Map is passed to the paramterMap, but that doesn't seem right.. it's like rewriting what iBatis should be doing... --------------------------------- Here�s a new way to find what you're looking for - Yahoo! Answers --0-2124020612-1155188954=:48984 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit hi,
   see firstly u have 5 input parameters and 1 output parameter so so number of '?' should be 6 not 5

and u have to call ur stored procedure as
{call FLUB_PROTO.flub_wall_tst.submit_flub_wall (?, ?, ?, ?, ?, ?)}

Robert Campbell <rrc7cz@gmail.com> wrote:
I'm trying to call a stored procedure. I pass it an object, it returns an object of the same type. Except it doesn't work.

    <parameterMap id="addParam" class="flubWall">
         <parameter property="flubId" jdbcType="NUMBER" javaType=" java.lang.Integer" mode="IN"/>
        <parameter property="flubName" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN" />
        <parameter property="id" jdbcType="NUMBER" javaType=" java.lang.Integer" mode="IN"/>
        <parameter property="wallId" jdbcType="NUMBER" javaType="java.lang.Integer" mode="IN"/>
        <parameter property="wallName" jdbcType="VARCHAR" javaType=" java.lang.String" mode="IN" />
    </parameterMap>


    <resultMap id="flubWallResult" class="flubWall">
        <result property="flubId" column="FLUB_ID"/>
        <result property="flubName" column="FLUB_NAME"/>
        <result property="id" column="FLUB_WALL_ID" />
        <result property="wallId" column="WALL_ID" />
        <result property="wallName" column="WALL_NAME"/>
    </resultMap>
   
   
    <procedure id="submitFlubWall"
        parameterMap="addParam"
        resultMap="flubWallResult">
        {call FLUB_PROTO.flub_wall_tst.submit_flub_wall (?, ?, ?, ?, ?)}
    </procedure> 


Now this doesn't work.. I would expect the call to return a ResultSet which gets mapped by the resultMap into a new flubWall object. This doesn't happen. So I tried this:

Added as first parameter listed in the parameterMap:
        <parameter property="output1" jdbcType="ORACLECURSOR" mode="OUT" />

Changed to:
        {? = call FLUB_PROTO.flub_wall_tst.submit_flub_wall (?, ?, ?, ?, ?)} 

This also doesn't work, I get this error as I expected:
       There is no READABLE property named 'output1' in class 'com.blah.flubWall'


So how to do it? I saw examples where an object is mapped to a Map, then the Map is passed to the paramterMap, but that doesn't seem right.. it's like rewriting what iBatis should be doing...




Here�s a new way to find what you're looking for - Yahoo! Answers --0-2124020612-1155188954=:48984--