ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anita m <anita1...@yahoo.com>
Subject how can I map an array property in the resultset ?
Date Fri, 31 Mar 2006 00:21:41 GMT
I have the following classes  
class TestA{ 
TestB[] bObjects;  
Integer id; 
and my sqlmap does this 
1. <resultMap id="alltestAs" class="TestA"
groupBy="id" > 
2. <result name="id" column="TESTA_ID" /> 
3. <result name="bObjects" javaType="TestB[]"
resultMap="bOfA" > 
4. </resultMap> 
6. <resultMap id="bOfA" class="TestB[]" > 
7. <result name="id" column="TESTB_ID" /> 
8. <resultMap> 
I get the following exception 
Could not set TypeHandler. Cause:
java.lang.ClassNotFoundException: TestB[] 
In line 3. I tried setting javaType to TestB etc., but
I get errors, how can I map a result set to an array
of objects ? 

After looking through the archives I think I may have
to implement a custom type handler... but am not sure
when/why and how such a beast can be developed

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

View raw message