M
To: user-java@ibatis.apache.org
Subject: Re: Re: Question about queryForList and Oracle ref cursors
queryForList only works for things that return result sets. Oracle ref
cursors are a "sort of" result set, but the ref cursor is a parameter to
a callable statement, rather than being returned f
user-java@ibatis.apache.org
Subject: Re: Re: Question about queryForList and Oracle ref cursors
Jason,
This is what you will have to do,
1. Map an object to the columns being returned from the cursor in your
sq-map-config file. i.e you should have an entry like this
2. You would h
ssing
> parameters to the SP force me to use the update() method?
>
>
>
> jason
>
>
> --
>
> *From:* Ryan Shelley [mailto:[EMAIL PROTECTED]
> *Sent:* Monday, March 10, 2008 2:38 PM
> *To:* user-java@ibatis.apache.org
gt; parameters to the SP force me to use the update() method?
>
>
>
> jason
>
>
> --
>
> *From:* Ryan Shelley [mailto:[EMAIL PROTECTED]
> *Sent:* Monday, March 10, 2008 2:38 PM
> *To:* user-java@ibatis.apache.org
&g
to the SP force me to use the update() method?
jason
From: Ryan Shelley [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2008 2:38 PM
To: user-java@ibatis.apache.org
Subject: Re: Re: Question about queryForList and Oracle ref
nce or
the ibatis document pdf's
Regards
Sundar
From: Jesse Reimann [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2008 2:51 PM
To: user-java@ibatis.apache.org
Subject: Re: Re: Question about queryForList and Oracle ref cursors
Ryan I guess you didn
Ryan I guess you didn't read my original post. I tried both the Hashmap
method of queryForList and the way you suggested. The only way I can
actually get a populated List back is using the HashMap. If I do it this
way :
return
getSqlMapClientTemplate().queryForList("TEST_TESTPROC.GET_CDDRPT");
For reference:
http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+call+a+stored+procedure
Under: What SqlMapClient Method Should I Use?
...
If your procedure returns a result set (not a result set in an OUT
parameter, but a result set from the procedure itself), then use *
que
In the one you had, you were creating an empty HashMap, executing the
queryForList method passing in the empty HashMap, and then converting the
still empty HashMap to a list and returning that to your method.
queryForList doesn't take an object parameter to store the results in, it
takes an object
Ryan that's exactly what I did that wouldn't work. It returns to me a
List that has 10 elements all which are NULL.
Jesse
Try:
*public* List selectCDDRpt()
{
return getSqlMapClientTemplate().queryForList("TEST_TESTPROC.GET_CDDRPT");
}
You're returning a list of rows, no extra work is required. Use the Hashmap
if you need to pass values INTO the stored procedure.
-Ryan
On Mon, Mar 10, 2008 at 1:43 PM, Jesse Rei
11 matches
Mail list logo