Mybits invokes the stored procedure and function return cursor, the ParameterType value must be java.util.Map, because it will put the returned cursor inside

Source: Internet
Author: User
<resultmap id= "Cursormap" type= "Com.vcare.model.Photo" > <result column= "ad_pic_id" property= "PhotoID" jdb Ctype= "INTEGER"/> <result column= "SRC" property= "url" jdbctype= "VARCHAR"/> </resultMap>
<select id= "Findallphoto" parametertype= "Java.util.Map" statementtype= "callable" > {#{result,mode=out,jdbctyp E=cursor,resultmap=cursormap} = Call Fn_query_app_ad_pic (#{agencyid,mode=in,jdbctype=integer})} </select>
<!--<select id = "Findallphoto" parametertype= "Java.util.Map" statementtype= "callable" > {call p_q Uery_app_ad_pic (#{agencyid,mode=in,jdbctype=integer}, #{result,mode=out,jdbctype=cursor,resul Tmap=cursormap})} </select>-->

Mybits invokes the stored procedure and function return cursor, the ParameterType value must be java.util.Map, because it places the returned cursor inside, taking the returned cursor value from the incoming Map: map.get ("result"), To get the cursor record returned.
Note: result is only a name and does not need to correspond to a return parameter name in a stored procedure or function. It is only a variable name that receives data.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.