ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reuben Firmin" <Reuben.Fir...@Copart.Com>
Subject RE: sproc call / long / empty value
Date Mon, 14 Aug 2006 18:53:11 GMT
I didn't write the sproc. Don't ask me :D 
It is acceptable in AS400-land - I guess the question boils down to: what is the least terrible
hack on the DAO/Ibatis side of things?

-----Original Message-----
From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com]On Behalf Of Larry Meadors
Sent: Monday, August 14, 2006 11:51 AM
To: user-java@ibatis.apache.org
Subject: Re: sproc call / long / empty value

I am confused..what is an "empty" number?


On 8/14/06, Reuben Firmin < Reuben.Firmin@copart.com  <mailto:Reuben.Firmin@copart.com>
> wrote: 

How do I pass an empty value into a java.lang.Long field for a sproc? Null is not acceptable
on the sproc side of things, and Ibatis won't take "".
My sproc definition is:
<statement ... parameterMap="testParams" ...>
    {call TEST3SQL(?, ?, ?, ?)}
and the params are:
<parameterMap id="testParams" class ="map">
            <parameter property="userNumber" jdbcType="INTEGER" javaType="java.lang.Integer"
            <parameter property="lotNumber" jdbcType="BIGINT"  javaType="java.lang.Long"
If I call the sproc directly in the IBM query tool, I can do:
call TEST3SQL(4, "", ?, ?)
Should I just tell Ibatis that it is a string field, and pass "", or is there a better way?

View raw message