Hello,

I am attempting to use the QueryForDictionary (applies to
QueryForDictionary<> as well) method and having an issue I would like to
have validated by someone else. I am using the latest stable version of
DataMapper for .NET 1.5.1 but have also validated this against a snapshot
from svn (12/22/2006).

The basic issue is that if a result in a result map is using a "select" the
result is not populated. You can call the same statement using QueryForList
and the result is populated.

  <resultMap id="Address" class="Address">
     <result property="Id" column="ID" />
     <result property="Person" column="Person_ID" select="Person.SelectByID"
/>
     <!--
       other results with columns direct to properties continue
       ......
     -->
   </resultMap>

The above example if called with QueryForList returns a populated Person
property. If called with QueryForDictionary the "Person" result will be
null. This is independent of the key used in the dictionary when calling the
QueryForDictionary method.

Thanks,
Chris

Reply via email to