<sheepish-look-on-face />
Never mind. I *really* hate it when you realize that you're your own
worst enemy!
Jerry
On Tue, 21 Dec 2004 08:19:10 -0600, Jerry Jalenak
<[EMAIL PROTECTED]> wrote:
> In the iBatis Developer Guide, page 43, there is a usage example that
> does not show the sqlMap.queryForObject needing a return value. I
> have also tried your suggestion this morning, and end up with my 'ui'
> object set to null - not filled in the way I would expect it to be....
>
> Jerry
>
>
> On Tue, 21 Dec 2004 13:42:44 +0100, Mikael Berglund
> <[EMAIL PROTECTED]> wrote:
> > Jerry Jalenak wrote:
> >
> > > public void getUserByName(UserInfo ui)
> > > throws SQLException
> > > {
> > > SqlMapClient sqlMap = getSqlMapClient();
> > > sqlMap.queryForObject("getUserInfo", ui.getUserName(), ui);
> > > }
> > >
> > > </snip>
> > >
> > > The statement gets executed correctly, but the 'ui' object is not
> > > getting filled with the result set. Can any one point out what it is
> > > I'm doing wrong?
> >
> > Hello,
> >
> > you have to assign the object returned by queryForObject()
> > to your variable.
> >
> > ui = (UserInfo) sqlMap.queryForObject("getUserInfo",
> > ui.getUserName(), ui);
> >
> > Regards,
> > Mikael
> >
> >
>