ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alden S" <alden...@hotmail.com>
Subject Re: Result Map Extends/
Date Mon, 27 Feb 2006 20:37:36 GMT
<html><div style='background-color:'><P>Hello,</P>
<P>I just tested it and i do&nbsp;not get an error, but I DO GET&nbsp; NULL
values for all the properties in the LazyDynaBean.</P>
<P>&nbsp;</P>
<DIV><FONT style="FONT-SIZE: 11px; FONT-FAMILY: tahoma,sans-serif">
<HR color=#a0c6e5 SIZE=1>
From: <I>Ben Munat &lt;bent@munat.com&gt;</I><BR>Reply-To: <I>user-java@ibatis.apache.org</I><BR>To:
<I>user-java@ibatis.apache.org</I><BR>Subject: <I>Re: Result Map Extends/</I><BR>Date:
<I>Mon, 27 Feb 2006 08:43:49 -0800</I><BR>&gt;I don't think Alden was
asking for a dependency... I think he was <BR>&gt;just trying to use LazyDynaBean
as the resultClass in his sqlMap and <BR>&gt;it's not working. I would imagine that
has something to do with a <BR>&gt;clash between the reflection used by LazyDynaBean
and the relection <BR>&gt;used by SqlMap.<BR>&gt;<BR>&gt;Alden,
what error are you getting?<BR>&gt;<BR>&gt;b<BR>&gt;<BR>&gt;Sven
Boden wrote:<BR>&gt;&gt;<BR>&gt;&gt;It don't think it will be
included. The idea is to have an absolute <BR>&gt;&gt;minimal amount of dependencies
on other software.<BR>&gt;&gt;<BR>&gt;&gt;Regards,<BR>&gt;&gt;Sven<BR>&gt;&gt;<BR>&gt;&gt;Alden
S 
wrote:<BR>&gt;&gt;<BR>&gt;&gt;&gt;Hi,<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt;I
want to use org.apache.commons.beanutils.LazyDynaBean for the <BR>&gt;&gt;&gt;resultClass
but Ibatis does not allow me to.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt;&lt;select
id="getBatParReport2" parameterClass="java.lang.String" <BR>&gt;&gt;&gt;resultClass="org.apache.commons.beanutils.LazyDynaBean"&gt;<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt;I
know i can use HashMap and then do<BR>&gt;&gt;&gt; org.apache.commons.beanutils.BeanUtils.copyProperties(bean,
<BR>&gt;&gt;&gt;map);<BR>&gt;&gt;&gt;which would be acceptable
for queryForObject(..........)<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt;but
if you do queryForList or queryForMap, then you have to write <BR>&gt;&gt;&gt;code
to iterate over the map or coolection and do <BR>&gt;&gt;&gt;org.apache.commons.beanutils.BeanUtils.copyProperties(bean,
map);<BR>&gt;&gt;&gt;which is a nuisance and redundant 
to copy the data from one object <BR>&gt;&gt;&gt;to another.<BR>&gt;&gt;&gt;I
use LazyBean or DynaBean bc i use trhem all over as java beans, <BR>&gt;&gt;&gt;also
for when i used the &lt;display:table tag.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt;Does
ibatis provide this, or will it ever or never provide this.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt;Thanks<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt;Alden.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt;<BR>&gt;&gt;<BR></FONT></DIV></div></html>


Mime
View raw message