Giter VIP home page Giter VIP logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
There is a workaround for this problem: set the resultMap at the top-level 
select in addition to setting it at the parameter level.  For example:

    <select statementType="CALLABLE" id="getUserByLdapAlias"
        resultMap="DetailedObjUserVo"
        parameterType="MyBatisBean" resultType="object">
        call PKG_USER_DATA_SERVICE_MYBATIS.get_user_by_ldap_alias (
        #{ldapAlias}
        ,#{retvalUsers,mode=OUT,jdbcType=CURSOR,javaType=java.sql.ResultSet,resultMap=DetailedObjUserVo}
        )
    </select>

I don't know if this is the way it should work -- the resultMap of the output 
parameter being identified as nested based on whether the resultMap at the top 
level select is nested -- but it seems to be the way it works as of v3.0.1.  
This might become a problem if there are multiple output parameters and not all 
of them are nested -- not sure.

Original comment by [email protected] on 9 Jun 2010 at 11:37

from mybatis.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
The reason that it is failing is that MappedStatement.Builder sets the 
hasNestedResultMaps value for a statement by iterating over its result maps 
like this:

    for (ResultMap resultMap : resultMaps) {
        mappedStatement.hasNestedResultMaps = mappedStatement.hasNestedResultMaps || resultMap.hasNestedResultMaps();
    }

But for these statements resultMaps is an empty collection, as it is the output 
parameter that has a resultmap, not the statement.

Original comment by [email protected] on 27 Dec 2010 at 2:51

from mybatis.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
Fixed in SVN

Original comment by [email protected] on 31 Dec 2010 at 4:13

  • Changed state: Fixed
  • Added labels: Component-SqlMaps, Target-Release3.0.4

from mybatis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.