ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher DeGuise" <christopher.degu...@be-pragmatic.com>
Subject Possible bug in QueryForDictionary
Date Sat, 23 Dec 2006 04:38:50 GMT
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

Mime
View raw message