Contribute !!!

http://issues.apache.org/jira/browse/IBATIS-225


On 4/12/06, TNO <[EMAIL PROTECTED]> wrote:
Vote !!!
http://issues.apache.org/jira/browse/IBATIS-225

Clinton Begin a écrit :

Hmm...unfortunately at this time your two choices are to extend it or duplicate it. 

As you've discovered, the resultMap attribute of the result element is strictly for collections only. 

Cheers,
Clinton

On 3/27/06, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:

I can't seem to find any documentation on this so that is why I am asking the question. I have a ResultMap and I am try to avoid the select to load the associated object. So my SQL joins the two tables and all works well. My problem is that I would like to use the ResultMap already defined in another SqlMap rather than redefining it once again. It appears that a result element has the attribute resultMap. I tried to configure my Sql Map as shown below, but I receive an error when I attempt to do this.

<resultMap id="billToResultMap" class="BillTo" >
        ...
            <result property="paymentTerms" resultMap="PaymentTerms.PaymentTermsResult" "/>
</resultMap>


Produces the following exception:
com.ibatis.sqlmap.client.SqlMapException: Error instantiating collection property for mapping 'paymentTerms'.  Cause: java.lang.ClassCastException



Is there a way to reuse result maps without extending them?

Thanks...

Chris Mathrusse
[EMAIL PROTECTED]
Sybase, Inc
One Sybase Drive
Dublin, CA 94568
(925) 236-5553


No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.3.3/296 - Release Date: 29/03/2006


-- 
Il n'y a pas de mauvais langage, il n'y a que des bons programmeurs

Reply via email to