You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Bhaarat Sharma <bh...@gmail.com> on 2009/10/29 05:45:46 UTC

how to access Oracle sql Mappings from code

I wont bother you guys by yet another oracle sql mapping question...

my question is simple. We are converting our iBatis mappings from sql server
compliant to oracle compliant.  We only use stored procedures...So since we
are moving to Oracle..every result set returned from a procedure will now
come back as a cursor.

In our code, previously we were doing:

List resultList =
getSqlMapClientTemplate().queryForList("mapping.mappingName", paramMap);

above particular call would put 13 different lists inside resultList.
 Meaning that the procedure returned 13 result sets.

Now with Oracle we will have:
getSqlMapClientTemplate().queryForObject("mapping. mappingName", paramMap);

Now paramMap (HashMap) will contain 13 entries. meaning 13 cursors.

I just want to know whether this is the best and most efficient way to do
this?

We want least bit of change to our code. So I'd appreciate any suggestions.

Thanks