Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with mapping result when calling procedures and using inline params #27

Closed
GoogleCodeExporter opened this issue Mar 16, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

There is a found problem with result mapping when calling procedure and
using inline params.

This mapping works fine:

<parameterMap type="LRU" id="map1">
    <parameter property="id" mode="IN" jdbcType="NUMERIC"
javaType="java.lang.Long"/>
    <parameter property="result" mode="OUT" jdbcType="CURSOR" 
resultMap="com.company.CarMapper.car"/>
</parameterMap>

<select id="selectCar1" statementType="CALLABLE" parameterMap="map1">
    { call PACK1.GET_CAR(?,?) }
</select>



This work too, but not return correct object!
Instead mapped object I get: oracle.jdbc.driver.OracleResultSetImpl
Do I something wrong or is it a bug?

<select id="selectCar2" statementType="CALLABLE">
    { call PACK1.GET_CAR(
        #{id, mode=IN, jdbcType=NUMERIC, javaType=java.lang.Long},
        #{result, mode=OUT,jdbcType=CURSOR, resultMap=com.company.CarMapper.car})
}
</select>


I use java iBatis 3.0.

Original issue reported on code.google.com by piskunow...@gmail.com on 2 Jun 2010 at 7:37

@GoogleCodeExporter
Copy link
Author

Did you ask your question on the mailing list?
mybatis-user@googlegroups.com

Original comment by christia...@ircm.qc.ca on 13 Aug 2010 at 3:35

@GoogleCodeExporter
Copy link
Author

This seems related to issue 29.

Original comment by christia...@ircm.qc.ca on 24 Sep 2010 at 12:41

@GoogleCodeExporter
Copy link
Author

[deleted comment]

1 similar comment
@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

That is right. When using cursor you should set your javatype to ResultSet. 

Have a look at this test:
http://mybatis.googlecode.com/svn/trunk/src/test/java/org/apache/ibatis/submitte
d/refcursor/

Original comment by eduardo.macarron on 11 Feb 2012 at 7:06

  • Changed state: Invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant