aspose file tools*
The moose likes Object Relational Mapping and the fly likes How does IBatis/MyBatis maps jdbcType=CURSOR to javaType=java.sql.ResultSet. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "How does IBatis/MyBatis maps jdbcType=CURSOR to javaType=java.sql.ResultSet." Watch "How does IBatis/MyBatis maps jdbcType=CURSOR to javaType=java.sql.ResultSet." New topic
Author

How does IBatis/MyBatis maps jdbcType=CURSOR to javaType=java.sql.ResultSet.

Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 519
    
    2

Hello All,

I have just started using MyBatis in our project and there are some existing xml mappers and codebase to start with. In those, I noticed that




and in the code



My question is, "resultSet" which is declared as OUT for mode, jdbcType=CURSOR and javaType=java.sql.ResultSet, on what basis we are typecasting the resultset to Collection. java.util.Collection does not extend java.sql.ResultSet. So how is this being done. Also, why it is Collection only, why not a List.

Thanks


Regards
KumarRaja

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How does IBatis/MyBatis maps jdbcType=CURSOR to javaType=java.sql.ResultSet.