ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven Boden <list...@pandora.be>
Subject Re: Result Map Extends/
Date Thu, 23 Feb 2006 18:43:47 GMT
For question
1) Currently not: you need to have at least 1 result as in <!ELEMENT 
resultMap (result+, discriminator?)>. Short term solution would be just 
to copy your ResultMap

2) Also not supported yet. JIRA IBATIS-216 is open for this: 
http://issues.apache.org/jira/browse/IBATIS-216

Regards,
Sven

Justin Musgrove wrote:

>I am new to Ibatis and it rocks (ok, enough sucking up :)
> 
>Two questions:
> 
>1.  I am trying to maintain one resultmap with all the properties.  If I
>extend to additional resultMap to add groupby property I get the error
>below.
>
>	Cause: org.xml.sax.SAXParseException: The content of element
>type "resultMap" is incomplete, it must match
>"(result+,discriminator?)".
>	 
>	  <resultMap id="address"
>class="com.x.ods.domain.entity.address.Address" groupBy="entAddId">
>	    <result column="ENT_ADD_ID" property="entAddId"
>jdbcType="DECIMAL"/>
>	   </resultMap>
>	 
>	   <resultMap extends="address" id="addressGroupBy"
>class="com.x.ods.domain.entity.address.Address" groupBy="entAddId"/>
>
> 
>I get the following error stating that a <result> is required.  Is there
>a work around for this?
>
>	 
>
>2.  If a column exists in a resultMap that doesn't exist in a <select>
>the following error occurs.  Is there a property that allows the column
>to be ignored if it doesn't exist in the select?
>com.ibatis.common.jdbc.exception.NestedSQLException: 
>
>--- The error occurred in com/x/ods/dao/ibatis/sqlmaps/Entity.xml. 
>
>--- The error occurred while applying a result map. 
>
>--- Check the ODS.entityComposite. 
>
>--- Check the result mapping for the 'srcSystem' property. 
>
>--- Cause: java.sql.SQLException: Invalid column name
>
> 
>Any help is appreciated.  Thanks.
> 
>Justin
>
>  
>


Mime
View raw message