Hrmmm, I thought we had this functionality. I wrote a test case and got the same error you did. I looked through the code and I couldn't find anything that would parse that.
I saw that IBatisNet.DataMapper.Test.Domain.LineItem had a Order property but we don't have tests to populate a property on the Order object. I think the problem originates from line 262 of ResultProperty.cs: _propertyInfo = ReflectionInfo.GetInstance(resultClass).GetSetter(_propertyName); In your case, _propertyName is equal to "Message.To". I suggest creating an issue in JIRA: http://issues.apache.org/jira/browse/IBATISNET Does the IBatieNet DataMapper documentation say we support this? There's always a chance that I've overlooked something and that it is possible :) --- Joe Chandler <[EMAIL PROTECTED]> wrote: > I am trying to use an embedded object in a result map, but I get the > following error: > > IBatisNet.Common.Exceptions.ConfigurationException: > - The error occurred while loading SqlMap . > - initialize result property :Message.To > - The error occurred in <sqlMap > url="C:\Projects\Common\Core\DataConfig\Maps\Oracle\Email.xml" />. > - Check the Email.EmailResult. ---> > IBatisNet.Common.Exceptions.ConfigurationException: Could not > configure > ResultMap. ResultMap named "EmailResult" not found, failed. > Cause: There is no Set property named 'Message.To' in > class 'EmailMessage' > at > IBatisNet.DataMapper.Configuration.ResultMapping.ResultMap.Initialize(Co > nfigurationScope configScope) > > > > > Does the .NET version of 1.2 DataMapper support what the docs say > regarding this? > This is from the dev guide for iBatis.... > The solution is to use a join and nested property > mappings instead of a separate select statement. Here's an > example using the same situation as above (Products and > Categories): > Developer Guide iBATIS SQL Maps 2 > http://www.ibatis.com by Clinton Begin > 26 > <resultMap id="get-product-result" > class="com.ibatis.example.Product"> > <result property="id" column="PRD_ID"/> > <result property="description" > column="PRD_DESCRIPTION"/> > <result property="category.id" > column="CAT_ID" /> > <result property="category.description" > column="CAT_DESCRIPTION" /> > </resultMap> > > > > This is my result map definition: > <resultMaps> > <resultMap id="EmailResult" class="EmailMessage"> > <result property="Id" column="ID"/> > <result property="Message.To" column="TO"/> > </resultMap> > </resultMaps> > > > This is my EmailMessage Object: > > public class EmailMessage : BaseDomainEntity, IMessage { > > > > private System.Web.Mail.MailMessage _message = > new > System.Web.Mail.MailMessageMailMessage(); > > > public System.Web.Mail.MailMessage Message { > get { return _message; } > set { _message = value; } > } > > } >