You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Michael Schall <mi...@gmail.com> on 2006/01/12 00:10:12 UTC

Custom typeHandler dbType

I have created several type handlers.  Inside the the sqlMap.config
file I have told ibatis what types and dbTypes are handled by the
handler.

    <typeHandler
      type="ATG.Money, ATG.Money"
      dbType="Currency"
      callback="ATG.Database.TypeHandlers.MoneyTypeHandlerCallback,
ATG.Database"/>

However when passing or getting either of these types to procedures, I
must still tell the resultMap and the parameterMap that the dbType is
currency.

	<parameterMaps>
		<parameterMap id="proc_Update">
			<parameter property="Id"/>
			<parameter property="Amount" dbType="currency"/>
			<parameter property="EnteredDate"/>
			<parameter property="EnteredBy"/>
		</parameterMap>
	</parameterMaps>

Am I missing something?  Should this be needed?

Thanks
Mike