Author: gbayon
Date: Tue Mar 18 11:37:10 2008
New Revision: 638496
URL: http://svn.apache.org/viewvc?rev=638496&view=rev
Log:
Check ResultMap extends not work for constructor
Modified:
ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper.SqlClient.Test.2005/Fixtures/ConfigureTest.cs
ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper.SqlClient.Test.2005/Maps/Mapping1.xml
Modified:
ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper.SqlClient.Test.2005/Fixtures/ConfigureTest.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper.SqlClient.Test.2005/Fixtures/ConfigureTest.cs?rev=638496&r1=638495&r2=638496&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper.SqlClient.Test.2005/Fixtures/ConfigureTest.cs
(original)
+++
ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper.SqlClient.Test.2005/Fixtures/ConfigureTest.cs
Tue Mar 18 11:37:10 2008
@@ -1,3 +1,4 @@
+using System;
using System.Xml;
using Apache.Ibatis.Common.Configuration;
using Apache.Ibatis.Common.Data;
@@ -152,7 +153,7 @@
private void CheckResource(IConfigurationStore store)
{
- //Console.WriteLine(store.ToString());
+ Console.WriteLine(store.ToString());
Assert.That(store.Properties.Length, Is.EqualTo(14));
Assert.That(store.GetPropertyConfiguration("useStatementNamespaces").Value,
Is.EqualTo("false"));
@@ -194,7 +195,7 @@
Assert.That(cacheModel.Attributes.ContainsKey(ConfigConstants.ATTRIBUTE_NAMESPACE),
Is.True);
// Result map
- Assert.That(store.ResultMaps.Length, Is.EqualTo(14));
+ Assert.That(store.ResultMaps.Length, Is.EqualTo(16));
IConfiguration resultMap =
store.GetResultMapConfiguration("Account.account-result-constructor");
Assert.IsNotNull(resultMap);
Assert.That(resultMap.Children.Count, Is.EqualTo(4));
Modified:
ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper.SqlClient.Test.2005/Maps/Mapping1.xml
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper.SqlClient.Test.2005/Maps/Mapping1.xml?rev=638496&r1=638495&r2=638496&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper.SqlClient.Test.2005/Maps/Mapping1.xml
(original)
+++
ibatis/trunk/cs/mapper2/Apache.Ibatis.DataMapper.SqlClient.Test.2005/Maps/Mapping1.xml
Tue Mar 18 11:37:10 2008
@@ -26,6 +26,19 @@
<resultMaps>
+ <resultMap id="account-constructor" class="Account" >
+ <constructor>
+ <argument argumentName="identifiant" column="Account_ID"/>
+ <argument argumentName="firstName" column="Account_FirstName"/>
+ <argument argumentName="lastName" column="Account_LastName"/>
+ </constructor>
+ </resultMap>
+ <resultMap id="account-extends-constructor" class="Account"
extends="account-constructor" >
+ <result property="EmailAddress" column="Account_Email" nullValue="[EMAIL
PROTECTED]"/>
+ <result property="BannerOption" column="Account_Banner_Option"
dbType="Varchar" type="bool"/>
+ <result property="CartOption" column="Account_Cart_Option"
typeHandler="HundredsBool"/>
+ </resultMap>
+
<resultMap id="email-result" class="string">
<result property="value" column="Account_Email"/>
</resultMap>
@@ -52,7 +65,6 @@
<result property="FirstName"
column="Account_FirstName"/>
<result property="documents"
resultMapping="Document.document"/>
</resultMap>
-
<resultMap id="account-result" class="Account" >
<result property="id" column="Account_ID"/>