All,

I'm trying to be lazy (!) and use a <resultMap> with class="Hashtable" to
return some legacy information from our data store. It works great until I
add a <result> with a "select" attribute. If I add the select, iBATIS throws
an exception during load.

For example:

    <resultMap
      id="ResultMapEndOfDayReportLegacyLine"
      class="Hashtable">
      <result
        column="EndOfDayReportAmountTotal"
        property="AmountTotal"
        type="decimal" /> <!-- This works a treat, shows up as "AmountTotal"
in the Hashtable -->
      <result
        column="EndOfDayReportPaymentId"
        property="Payment"
        select="Payment.GetPaymentByPaymentId" /> <!-- Adding this generates
error -->
    </resultMap>

I can just create a quick dummy class to hold the data for now, but has
anyone else seen this error? Is it a bug or am I doing something
intrinsically wrong?

Thanks. The stack trace is below.

V/R,
Nicholas Piasecki

{"Object reference not set to an instance of an object."}
   at
IBatisNet.DataMapper.MappedStatements.PropertyStrategy.SelectStrategy..ctor(
ResultProperty mapping, IPropertyStrategy selectArrayStrategy,
IPropertyStrategy selectGenericListStrategy, IPropertyStrategy
selectListStrategy, IPropertyStrategy selectObjectStrategy)
   at
IBatisNet.DataMapper.MappedStatements.PropertyStrategy.PropertyStrategyFacto
ry.Get(ResultProperty mapping)
   at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Initialize()
   at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument
document, DataSource dataSource, Boolean useConfigFileWatcher, Boolean
isCallFromDao)


Reply via email to