You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by gb...@apache.org on 2007/09/16 14:04:02 UTC
svn commit: r576082 - in /ibatis/trunk/cs/mapper: IBatisNet.DataMapper.Test/
IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/
IBatisNet.DataMapper.Test/bin/Debug/
IBatisNet.DataMapper/Configuration/ResultMapping/
IBatisNet.DataMapper/Configuration/Seria...
Author: gbayon
Date: Sun Sep 16 05:04:01 2007
New Revision: 576082
URL: http://svn.apache.org/viewvc?rev=576082&view=rev
Log:
Fix IBATISNET-229 Namespace problems on resultMapping when used with discriminator
Added:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/NewsPaper.xml
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.2005.csproj
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Document.xml
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_Access_OleDb.config
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_Odbc.config
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_OleDb.config
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_SqlClient.config
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MySql_ByteFx.config
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MySql_MySql.config
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_Oracle_ODP.config
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_Oracle_OracleClient.config
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_PostgreSQL_Npgsql.config
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ResultMap.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/SubMap.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Serializers/SubMapDeSerializer.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Scope/ConfigurationScope.cs
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.2005.csproj
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.2005.csproj?rev=576082&r1=576081&r2=576082&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.2005.csproj (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.2005.csproj Sun Sep 16 05:04:01 2007
@@ -336,6 +336,7 @@
<Content Include="Maps\MSSQL\SqlClient\Enumeration.xml" />
<Content Include="Maps\MSSQL\SqlClient\GroupByMapping.xml" />
<Content Include="Maps\MSSQL\SqlClient\LineItem.xml" />
+ <Content Include="Maps\MSSQL\SqlClient\NewsPaper.xml" />
<Content Include="Maps\MSSQL\SqlClient\Nullable.xml" />
<Content Include="Maps\MSSQL\SqlClient\Order.xml" />
<Content Include="Maps\MSSQL\SqlClient\Other.xml" />
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Document.xml
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Document.xml?rev=576082&r1=576081&r2=576082&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Document.xml (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Document.xml Sun Sep 16 05:04:01 2007
@@ -4,39 +4,29 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<alias>
- <typeAlias alias="Document" type="IBatisNet.DataMapper.Test.Domain.Document, IBatisNet.DataMapper.Test" />
<typeAlias alias="Book" type="IBatisNet.DataMapper.Test.Domain.Book, IBatisNet.DataMapper.Test" />
- <typeAlias alias="Newspaper" type="IBatisNet.DataMapper.Test.Domain.Newspaper, IBatisNet.DataMapper.Test" />
<typeAlias alias="DocumentCollection" type="IBatisNet.DataMapper.Test.Domain.DocumentCollection, IBatisNet.DataMapper.Test" />
<typeAlias alias="CustomInheritance" type="IBatisNet.DataMapper.Test.Domain.CustomInheritance, IBatisNet.DataMapper.Test"/>
</alias>
<resultMaps>
- <resultMap id="document" class="Document">
- <result property="Id" column="Document_ID"/>
- <result property="Title" column="Document_Title"/>
+ <resultMap id="document" class="Document" extends="NewsPaper.baseDocument">
<result property="Test" column="Document_Title"/>
<discriminator column="Document_Type" type="string"/>
<subMap value="Book" resultMapping="book" />
- <subMap value="Newspaper" resultMapping="newspaper" />
+ <subMap value="Newspaper" resultMapping="NewsPaper.newspaper" />
</resultMap>
- <resultMap id="document-custom-handler" class="Document">
- <result property="Id" column="Document_ID"/>
- <result property="Title" column="Document_Title"/>
+ <resultMap id="document-custom-handler" class="Document" extends="NewsPaper.baseDocument">
<discriminator column="Document_Type" typeHandler="CustomInheritance"/>
<subMap value="Book" resultMapping="book" />
- <subMap value="Newspaper" resultMapping="newspaper" />
+ <subMap value="Newspaper" resultMapping="NewsPaper.newspaper" />
</resultMap>
<resultMap id="book" class="Book" extends="document">
<result property="PageNumber" column="Document_PageNumber"/>
</resultMap>
-
- <resultMap id="newspaper" class="Newspaper" extends="document">
- <result property="City" column="Document_City"/>
- </resultMap>
-
+
</resultMaps>
<statements>
@@ -74,7 +64,7 @@
</select>
<select id="GetMultipleDocument"
- resultMap="book, newspaper">
+ resultMap="book, NewsPaper.newspaper">
select
Document_ID, Document_Title, Document_PageNumber
from Documents
Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/NewsPaper.xml
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/NewsPaper.xml?rev=576082&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/NewsPaper.xml (added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/NewsPaper.xml Sun Sep 16 05:04:01 2007
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<sqlMap namespace="NewsPaper"
+xmlns="http://ibatis.apache.org/mapping"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
+
+ <alias>
+ <typeAlias alias="Document" type="IBatisNet.DataMapper.Test.Domain.Document, IBatisNet.DataMapper.Test" />
+ <typeAlias alias="Newspaper" type="IBatisNet.DataMapper.Test.Domain.Newspaper, IBatisNet.DataMapper.Test" />
+ </alias>
+
+ <resultMaps>
+
+ <resultMap id="baseDocument" class="Document">
+ <result property="Id" column="Document_ID"/>
+ <result property="Title" column="Document_Title"/>
+ </resultMap>
+
+ <resultMap id="newspaper" class="Newspaper" extends="baseDocument">
+ <result property="City" column="Document_City"/>
+ </resultMap>
+
+ </resultMaps>
+</sqlMap>
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_Access_OleDb.config
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_Access_OleDb.config?rev=576082&r1=576081&r2=576082&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_Access_OleDb.config (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_Access_OleDb.config Sun Sep 16 05:04:01 2007
@@ -33,7 +33,8 @@
<sqlMap resource="../../Maps/Access/OleDb/LineItem.xml"/>
<sqlMap resource="../../Maps/Access/OleDb/Enumeration.xml"/>
<sqlMap resource="../../Maps/Access/OleDb/Other.xml"/>
- <sqlMap resource="../../Maps/Access/OleDb/Document.xml"/>
+ <sqlMap resource="../../Maps/Access/OleDb/NewsPaper.xml"/>
+ <sqlMap resource="../../Maps/Access/OleDb/Document.xml"/>
<sqlMap resource="../../Maps/Access/OleDb/ParameterClass.xml"/>
<sqlMap resource="../../Maps/Access/OleDb/ResultClass.xml"/>
</sqlMaps>
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_Odbc.config
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_Odbc.config?rev=576082&r1=576081&r2=576082&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_Odbc.config (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_Odbc.config Sun Sep 16 05:04:01 2007
@@ -40,7 +40,8 @@
<sqlMap resource="../../Maps/MSSQL/Odbc/Other.xml"/>
<sqlMap resource="../../Maps/MSSQL/Odbc/ParameterClass.xml"/>
<sqlMap resource="../../Maps/MSSQL/Odbc/ResultClass.xml"/>
- <sqlMap resource="../../Maps/MSSQL/Odbc/Document.xml"/>
+ <sqlMap resource="../../Maps/MSSQL/Odbc/NewsPaper.xml"/>
+ <sqlMap resource="../../Maps/MSSQL/Odbc/Document.xml"/>
<sqlMap resource="../../Maps/MSSQL/Odbc/Nullable.xml"/>
<sqlMap resource="../../Maps/MSSQL/Odbc/Simple.xml"/>
</sqlMaps>
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_OleDb.config
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_OleDb.config?rev=576082&r1=576081&r2=576082&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_OleDb.config (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_OleDb.config Sun Sep 16 05:04:01 2007
@@ -39,6 +39,7 @@
<sqlMap resource="../../Maps/MSSQL/OleDb/Other.xml"/>
<sqlMap resource="../../Maps/MSSQL/OleDb/ParameterClass.xml"/>
<sqlMap resource="../../Maps/MSSQL/OleDb/ResultClass.xml"/>
+ <sqlMap resource="../../Maps/MSSQL/OleDb/NewsPaper.xml"/>
<sqlMap resource="../../Maps/MSSQL/OleDb/Document.xml"/>
<sqlMap resource="../../Maps/MSSQL/OleDb/Nullable.xml"/>
<sqlMap resource="../../Maps/MSSQL/OleDb/Simple.xml"/>
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_SqlClient.config
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_SqlClient.config?rev=576082&r1=576081&r2=576082&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_SqlClient.config (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MSSQL_SqlClient.config Sun Sep 16 05:04:01 2007
@@ -48,7 +48,8 @@
<sqlMap resource="../../Maps/MSSQL/SqlClient/Other.xml"/>
<sqlMap resource="../../Maps/MSSQL/SqlClient/ParameterClass.xml"/>
<sqlMap resource="../../Maps/MSSQL/SqlClient/ResultClass.xml"/>
- <sqlMap resource="../../Maps/MSSQL/SqlClient/Document.xml"/>
+ <sqlMap resource="../../Maps/MSSQL/SqlClient/NewsPaper.xml"/>
+ <sqlMap resource="../../Maps/MSSQL/SqlClient/Document.xml"/>
<sqlMap resource="../../Maps/MSSQL/SqlClient/EmbedParameter.xml"/>
<sqlMap resource="../../Maps/MSSQL/SqlClient/Nullable.xml"/>
<sqlMap resource="../../Maps/MSSQL/SqlClient/Simple.xml"/>
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MySql_ByteFx.config
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MySql_ByteFx.config?rev=576082&r1=576081&r2=576082&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MySql_ByteFx.config (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MySql_ByteFx.config Sun Sep 16 05:04:01 2007
@@ -39,7 +39,8 @@
<sqlMap resource="../../Maps/MySql/ByteFx/Other.xml"/>
<sqlMap resource="../../Maps/MySql/ByteFx/ParameterClass.xml"/>
<sqlMap resource="../../Maps/MySql/ByteFx/ResultClass.xml"/>
- <sqlMap resource="../../Maps/MySql/ByteFx/Document.xml"/>
+ <sqlMap resource="../../Maps/MySql/ByteFx/NewsPaper.xml"/>
+ <sqlMap resource="../../Maps/MySql/ByteFx/Document.xml"/>
<!-- Rem : If used as embbeded Resources, use
<sqlMap embedded="Account.xml, IBatisNet.DataMapper.Test"/>
-->
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MySql_MySql.config
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MySql_MySql.config?rev=576082&r1=576081&r2=576082&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MySql_MySql.config (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_MySql_MySql.config Sun Sep 16 05:04:01 2007
@@ -39,7 +39,8 @@
<sqlMap resource="../../Maps/MySql/MySql/Other.xml"/>
<sqlMap resource="../../Maps/MySql/MySql/ParameterClass.xml"/>
<sqlMap resource="../../Maps/MySql/MySql/ResultClass.xml"/>
- <sqlMap resource="../../Maps/MySql/MySql/Document.xml"/>
+ <sqlMap resource="../../Maps/MySql/MySql/NewsPaper.xml"/>
+ <sqlMap resource="../../Maps/MySql/MySql/Document.xml"/>
<sqlMap resource="../../Maps/MySql/MySql/Simple.xml"/>
<!-- Rem : If used as embbeded Resources, use
<sqlMap embedded="Account.xml, IBatisNet.DataMapper.Test"/>
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_Oracle_ODP.config
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_Oracle_ODP.config?rev=576082&r1=576081&r2=576082&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_Oracle_ODP.config (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_Oracle_ODP.config Sun Sep 16 05:04:01 2007
@@ -38,7 +38,8 @@
<sqlMap resource="../../Maps/Oracle/ODP/LineItem.xml"/>
<sqlMap resource="../../Maps/Oracle/ODP/Enumeration.xml"/>
<sqlMap resource="../../Maps/Oracle/ODP/Other.xml"/>
- <sqlMap resource="../../Maps/Oracle/ODP/Document.xml"/>
+ <sqlMap resource="../../Maps/Oracle/ODP/NewsPaper.xml"/>
+ <sqlMap resource="../../Maps/Oracle/ODP/Document.xml"/>
<sqlMap resource="../../Maps/Oracle/ODP/ParameterClass.xml"/>
<sqlMap resource="../../Maps/Oracle/ODP/ResultClass.xml"/>
<sqlMap resource="../../Maps/Oracle/ODP/Nullable.xml"/>
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_Oracle_OracleClient.config
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_Oracle_OracleClient.config?rev=576082&r1=576081&r2=576082&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_Oracle_OracleClient.config (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_Oracle_OracleClient.config Sun Sep 16 05:04:01 2007
@@ -42,7 +42,8 @@
<sqlMap resource="../../Maps/Oracle/OracleClient/LineItem.xml"/>
<sqlMap resource="../../Maps/Oracle/OracleClient/Enumeration.xml"/>
<sqlMap resource="../../Maps/Oracle/OracleClient/Other.xml"/>
- <sqlMap resource="../../Maps/Oracle/OracleClient/Document.xml"/>
+ <sqlMap resource="../../Maps/Oracle/OracleClient/NewsPaper.xml"/>
+ <sqlMap resource="../../Maps/Oracle/OracleClient/Document.xml"/>
<sqlMap resource="../../Maps/Oracle/OracleClient/ParameterClass.xml"/>
<sqlMap resource="../../Maps/Oracle/OracleClient/ResultClass.xml"/>
<sqlMap resource="../../Maps/Oracle/OracleClient/Nullable.xml"/>
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_PostgreSQL_Npgsql.config
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_PostgreSQL_Npgsql.config?rev=576082&r1=576081&r2=576082&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_PostgreSQL_Npgsql.config (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_PostgreSQL_Npgsql.config Sun Sep 16 05:04:01 2007
@@ -44,7 +44,8 @@
<sqlMap resource="../../Maps/PostgreSQL/Npgsql/Other.xml"/>
<sqlMap resource="../../Maps/PostgreSQL/Npgsql/ParameterClass.xml"/>
<sqlMap resource="../../Maps/PostgreSQL/Npgsql/ResultClass.xml"/>
- <sqlMap resource="../../Maps/PostgreSQL/Npgsql/Document.xml"/>
+ <sqlMap resource="../../Maps/PostgreSQL/Npgsql/NewsPaper.xml"/>
+ <sqlMap resource="../../Maps/PostgreSQL/Npgsql/Document.xml"/>
<sqlMap resource="../../Maps/PostgreSQL/Npgsql/Nullable.xml"/>
<sqlMap resource="../../Maps/PostgreSQL/Npgsql/Simple.xml"/>
<!-- Rem : If used as embbeded Resources, use
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ResultMap.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ResultMap.cs?rev=576082&r1=576081&r2=576082&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ResultMap.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ResultMap.cs Sun Sep 16 05:04:01 2007
@@ -385,7 +385,6 @@
configScope.ErrorContext.MoreInfo = "initialize subMap";
subMap = SubMapDeSerializer.Deserialize(resultNode, configScope);
- subMap.ResultMapName = _sqlMapNameSpace + DomSqlMapBuilder.DOT + subMap.ResultMapName;
this.Discriminator.Add( subMap );
}
#endregion
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/SubMap.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/SubMap.cs?rev=576082&r1=576081&r2=576082&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/SubMap.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/SubMap.cs Sun Sep 16 05:04:01 2007
@@ -75,7 +75,6 @@
public string DiscriminatorValue
{
get { return _discriminatorValue; }
- set { _discriminatorValue = value; }
}
/// <summary>
@@ -85,7 +84,6 @@
public string ResultMapName
{
get { return _resultMapName; }
- set { _resultMapName = value; }
}
/// <summary>
@@ -102,11 +100,15 @@
#region Constructor
- /// <summary>
- /// Constructor
- /// </summary>
- public SubMap()
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SubMap"/> class.
+ /// </summary>
+ /// <param name="discriminatorValue">The discriminator value.</param>
+ /// <param name="resultMapName">Name of the result map.</param>
+ public SubMap(string discriminatorValue, string resultMapName)
{
+ _discriminatorValue = discriminatorValue;
+ _resultMapName = resultMapName;
}
#endregion
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Serializers/SubMapDeSerializer.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Serializers/SubMapDeSerializer.cs?rev=576082&r1=576081&r2=576082&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Serializers/SubMapDeSerializer.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Serializers/SubMapDeSerializer.cs Sun Sep 16 05:04:01 2007
@@ -48,13 +48,11 @@
/// <returns></returns>
public static SubMap Deserialize(XmlNode node, ConfigurationScope configScope)
{
- SubMap subMap = new SubMap();
-
NameValueCollection prop = NodeUtils.ParseAttributes(node, configScope.Properties);
- subMap.DiscriminatorValue = NodeUtils.GetStringAttribute(prop, "value");
- subMap.ResultMapName = NodeUtils.GetStringAttribute(prop, "resultMapping");
+ string discriminatorValue = NodeUtils.GetStringAttribute(prop, "value");
+ string resultMapName = configScope.ApplyNamespace(NodeUtils.GetStringAttribute(prop, "resultMapping"));
- return subMap;
+ return new SubMap(discriminatorValue, resultMapName);
}
}
}
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Scope/ConfigurationScope.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Scope/ConfigurationScope.cs?rev=576082&r1=576081&r2=576082&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Scope/ConfigurationScope.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Scope/ConfigurationScope.cs Sun Sep 16 05:04:01 2007
@@ -35,6 +35,7 @@
using IBatisNet.Common.Utilities;
using IBatisNet.Common.Utilities.Objects;
using IBatisNet.Common.Utilities.Objects.Members;
+using IBatisNet.DataMapper.Configuration;
using IBatisNet.DataMapper.DataExchange;
using IBatisNet.DataMapper.TypeHandlers;
@@ -51,10 +52,7 @@
/// Empty parameter map
/// </summary>
public const string EMPTY_PARAMETER_MAP = "iBATIS.Empty.ParameterMap";
- /// <summary>
- /// Dot representation.
- /// </summary>
- public const string DOT = ".";
+
#region Fields
@@ -290,7 +288,7 @@
if (_sqlMapNamespace != null && _sqlMapNamespace.Length > 0
&& id != null && id.Length > 0 && id.IndexOf(".") < 0)
{
- newId = _sqlMapNamespace + DOT + id;
+ newId = _sqlMapNamespace + DomSqlMapBuilder.DOT + id;
}
return newId;
}