Skip to content

Commit de0d520

Browse files
author
mikhaild908@gmail.com
committed
added Order2.xml for testing loading sqlmaps from modules
1 parent 4cdd0d2 commit de0d520

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

src/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.Net45.2012.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@
456456
<Content Include="Maps\SQLite3\Enumeration.xml" />
457457
<Content Include="Maps\SQLite3\GroupByMapping.xml" />
458458
<Content Include="Maps\SQLite3\LineItem.xml" />
459+
<EmbeddedResource Include="Maps\SQLite3\Module\Order2.xml" />
459460
<Content Include="Maps\SQLite3\NewsPaper.xml" />
460461
<Content Include="Maps\SQLite3\Nullable.xml" />
461462
<Content Include="Maps\SQLite3\Order.xml" />
@@ -592,7 +593,9 @@
592593
<Content Include="Scripts\SQLite3\swap-procedure.sql" />
593594
<Content Include="Scripts\SQLite3\teardown.sql" />
594595
<Content Include="Scripts\SQLite3\user-init.sql" />
595-
<EmbeddedResource Include="bin\Debug\SqlMap_SQLite3_SQLite3.config" />
596+
<EmbeddedResource Include="bin\Debug\SqlMap_SQLite3_SQLite3.config">
597+
<SubType>Designer</SubType>
598+
</EmbeddedResource>
596599
<None Include="Scripts\SQLite3\ps_SelectByIdList.sql" />
597600
<None Include="bin\Debug\IBatisNet.DataMapper.Test.dll.config" />
598601
<None Include="bin\Debug\SqlMap_Access_OleDb.config" />
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
3+
<sqlMap namespace="Order2"
4+
xmlns="http://ibatis.apache.org/mapping"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
6+
<resultMaps>
7+
<resultMap id="order-with-generic-list-lineitem-module" class="Order">
8+
<result property="Id" column="Order_ID"/>
9+
<result property="Date" column="Order_Date" nullValue="01/01/0001 00:00:00"/>
10+
<result property="CardExpiry" column="Order_CardExpiry"/>
11+
<result property="CardType" column="Order_CardType"/>
12+
<result property="CardNumber" column="Order_CardNumber"/>
13+
<result property="Street" column="Order_Street"/>
14+
<result property="City" column="Order_City"/>
15+
<result property="Province" column="Order_Province"/>
16+
<result property="PostalCode" column="Order_PostalCode"/>
17+
<result property="LineItemsGenericList" column="Order_ID" select="GetLineItemsForOrder" />
18+
</resultMap>
19+
</resultMaps>
20+
<statements>
21+
22+
<statement id="GetOrderWithGenericListLineItemViaModule"
23+
parameterClass="Integer"
24+
resultMap="order-with-generic-list-lineitem-module" >
25+
select * from Orders where Order_ID = #value#
26+
</statement>
27+
28+
</statements>
29+
</sqlMap>

src/IBatisNet.DataMapper.Test/bin/Debug/SqlMap_SQLite3_SQLite3.config

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
5959
<sqlMap resource="../../Maps/SQLite3/Coupons.xml"/>
6060
<sqlMap resource="../../Maps/SQLite3/ParentChild1.xml"/>
6161
<sqlMap resource="../../Maps/SQLite3/ParentChild2.xml"/>
62-
6362
</sqlMaps>
63+
64+
<sqlMapModules>
65+
<sqlMapModule resource="../../Maps/MSSQL/SqlClient/MapModule.xml"/>
66+
</sqlMapModules>
6467
</sqlMapConfig>

0 commit comments

Comments
 (0)