I have a result map that does a result select based on 2 columns

<result property="companyType"
           column="lookupId=company_type_id,localeId=locale_id"
           select="getCompanyTypeByIdAndLocale"/>

The select works fine when done from the result map when NO parameterClass is 
specified

<select id="getCompanyTypeByIdAndLocale"
           resultMap="select-company-type-result">
  select …
</select>

But then I can’t reuse that select statement from my DAO because it needs 2 
parameters, but if I pass in a map it complains because it was expecting a 
String (because no paramaterClass was specified)

If I specify a parameterClass=’java.util.Map’ I get a error:
--- Check the result mapping for the 'companyType' property. 
--- Cause: java.sql.SQLException: Column 
'lookupId=company_type_id,localeId=locale_id' not found.


I know I could easily have 2 select statements, but hopefully that’s not 
necessary.
Any help would be appreciated.

Reply via email to