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/01/03 21:39:16 UTC

svn commit: r492291 - in /ibatis/trunk/cs/mapper: IBatisNet.Common/ IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/ IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ IBatisNet.DataMapper/ IBatisNet.DataMapper/MappedStatements/

Author: gbayon
Date: Wed Jan  3 12:39:15 2007
New Revision: 492291

URL: http://svn.apache.org/viewvc?view=rev&rev=492291
Log:
- Added fix for IBATISNET-202 : QueryForDictionary does not process select property

Modified:
    ibatis/trunk/cs/mapper/IBatisNet.Common/IBatisNet.Common.2005.csproj
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Order.xml
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ChangeLog.txt
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj
    ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs

Modified: ibatis/trunk/cs/mapper/IBatisNet.Common/IBatisNet.Common.2005.csproj
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.Common/IBatisNet.Common.2005.csproj?view=diff&rev=492291&r1=492290&r2=492291
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.Common/IBatisNet.Common.2005.csproj (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.Common/IBatisNet.Common.2005.csproj Wed Jan  3 12:39:15 2007
@@ -267,7 +267,9 @@
     <Content Include="ChangeLog.txt" />
     <Content Include="licence.txt" />
     <Content Include="notice.txt" />
-    <Content Include="provider.xsd" />
+    <Content Include="provider.xsd">
+      <SubType>Designer</SubType>
+    </Content>
     <None Include="IBatisNet.Common.build" />
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Order.xml
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Order.xml?view=diff&rev=492291&r1=492290&r2=492291
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Order.xml (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Order.xml Wed Jan  3 12:39:15 2007
@@ -203,6 +203,11 @@
 			<result property="LineItemsIList" lazyLoad="true" column="Order_ID" select="GetLineItemsForOrder" />
 		</resultMap>
 
+    <resultMap id="order-JIAR220" class="Order"
+            extends="lite-order-result-by-name" >
+      <result property="LineItemsIList" column="Order_ID" select="GetLineItemsForOrder" />
+    </resultMap>
+
     <resultMap id="order-with-generic-lines-result" class="Order" 
             extends="lite-order-result-by-name" >
       <result property="LineItemsGenericList" column="Order_ID" select="GetLineItemsForOrderWithListClass2" />
@@ -517,6 +522,11 @@
 			select * from Orders
 		</statement>
 
+    <statement id="JIAR220"
+      resultMap="order-JIAR220" >
+      select * from Orders
+    </statement>
+    
 		<statement id="GetOrderCardExpiryViaResultClass"
 					parameterClass="int"
 					resultClass="date">

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs?view=diff&rev=492291&r1=492290&r2=492291
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs Wed Jan  3 12:39:15 2007
@@ -1225,6 +1225,20 @@
         #region JIRA Tests
 
         /// <summary>
+        /// QueryForDictionary does not process select property
+        /// </summary>
+        [Test]
+        public void TestJIRA220()
+        {
+            IDictionary map = sqlMap.QueryForMap("JIAR220", null, "PostalCode");
+
+            Assert.AreEqual(11, map.Count);
+            Order order = ((Order)map["T4H 9G4"]);
+
+            Assert.AreEqual(2, order.LineItemsIList.Count);
+        }
+
+        /// <summary>
         /// Test JIRA 30 (repeating property)
         /// </summary>
         [Test]

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ChangeLog.txt
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ChangeLog.txt?view=diff&rev=492291&r1=492290&r2=492291
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ChangeLog.txt (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ChangeLog.txt Wed Jan  3 12:39:15 2007
@@ -4,6 +4,7 @@
 1.6.0 - BETA
 ------------------------------
 Issues
+- IBATISNET-202 : QueryForDictionary does not process select property
 - IBATISNET-198 : Cache key for accessors can be ambiguous and can cause cast exceptions  
 - IBATISNET-193 : Implement N+1 Select resolution with groupBy attribute 
 - IBATISNET-191 : Allows Cache for Procedure / Statement tag

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj?view=diff&rev=492291&r1=492290&r2=492291
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj Wed Jan  3 12:39:15 2007
@@ -672,8 +672,12 @@
     <Content Include="ReadMe.txt" />
     <None Include="IBatisNet.DataMapper.build" />
     <None Include="MappedStatements\ResultStrategy\ClassDiagram.cd" />
-    <EmbeddedResource Include="SqlMap.xsd" />
-    <EmbeddedResource Include="SqlMapConfig.xsd" />
+    <EmbeddedResource Include="SqlMap.xsd">
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="SqlMapConfig.xsd">
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\IBatisNet.Common\IBatisNet.Common.2005.csproj">

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs?view=diff&rev=492291&r1=492290&r2=492291
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs Wed Jan  3 12:39:15 2007
@@ -1021,6 +1021,7 @@
                     reader.Close();
                     reader.Dispose();
                 }
+                ExecutePostSelect(request);
             }
             return map;
 
@@ -1147,6 +1148,7 @@
                     reader.Close();
                     reader.Dispose();
                 }
+                ExecutePostSelect(request);
             }
             return map;