ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xianwinwin <xianwin...@gmail.com>
Subject howto pass a Long argument to a query (isNotNull)
Date Fri, 18 Jan 2008 17:30:02 GMT

hi there,

I'm trying to pass an argument to a query type java.lang.Long; for this I
have:

   <select id="secuser.select_user_group" parameterClass="java.lang.Long"
resultMap="SecUser_group">
		
            // query here

		<isNotNull prepend="AND" property="userId">
			SU.userId=#userId#
    	        </isNotNull>	    	
   </select>

the invocation comes from 

	public List selectUserGroup(Long userId) 
	{
		List list = this.queryForList("secuser.select_user_group", userId); 			
		return list;				
	}

problem is that I get the following error message:

.
.
.
--- Cause: com.ibatis.common.beans.ProbeException: There is no READABLE
property named 'userId' in class 'java.lang.Long'
Caused by: com.ibatis.common.beans.ProbeException: There is no READABLE
property named 'userId' in class 'java.lang.Long'
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:   



I take it that there is no association between the (Long userId) and the 

		<isNotNull prepend="AND" property="userId">
			SU.userId=#userId#
    	        </isNotNull>	

since I don't wish to pass an object (secuser) I wonder if it is possible to
do it only with Long userID?

thank you
-- 
View this message in context: http://www.nabble.com/howto-pass-a-Long-argument-to-a-query-%28isNotNull%29-tp14954009p14954009.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message