ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Heath, Douglas T" <douglas.t.he...@ttu.edu>
Subject Long/int not working
Date Thu, 10 Feb 2005 16:44:51 GMT
Hi -

This is what my xml looks like for this function:
 <select id="PAF_ACTION_CT_MAINSearch"
resultMap="PAF_ACTION_CT_MAINResult">
            select 
                ACTION_CT_ID, 
                ACTION_CD, 
                USERID, 
                TIMESTAMP
            from [PAF_ACTION_CT_MAIN]
            <dynamic prepend="where">
            <isParameterPresent>
                <isNotEqual property="ACTION_CT_ID" compareValue="-9999"
prepend="and">
                    ACTION_CT_ID = #ACTION_CT_ID#
                </isNotEqual>
                <isNotEmpty property="ACTION_CD" prepend="and">
                    ACTION_CD = #ACTION_CD#
                </isNotEmpty>
                <isNotEmpty property="USERID" prepend="and">
                    USERID = #USERID#
                </isNotEmpty>
                <isNotEqual property="TIMESTAMP" compareValue="1/1/0001
12:00:00 AM" prepend="and">
                    TIMESTAMP = #TIMESTAMP#
                </isNotEqual>
            </isParameterPresent>
            </dynamic>
        </select>

For some reason, even if I set ACTION_CT_ID to 1 or 500 or any value, it
doesn't append the ACTION_CT_ID=#ACTION_CT_ID# into my query, so it ends
up just selecting everything from the table. In my code, ACTION_CT_ID is
a long. 

Does anyone know what I'm doing wrong?

Thanks,
Terry 

-----Original Message-----
From: Pablo Lopez [mailto:plopez@tecisa74.com] 
Sent: Thursday, February 10, 2005 10:11 AM
To: ibatis-user-cs@incubator.apache.org
Subject: Re: selectKey

Ron Grabowski wrote:
> Was that included in the latest alpha release? Do I still have to 
> includ the "as value" clause? Will this work:
> 
> <selectKey property="PageID" type="post" resultClass="int">  SELECT 
> @@IDENTITY </selectKey>

It didn't work for me without the cast (under .NET).

See you,

Pablo.



Mime
View raw message