Author: gbayon
Date: Sat Jan 5 07:16:35 2008
New Revision: 609151
URL: http://svn.apache.org/viewvc?rev=609151&view=rev
Log:
Updqte sql srcipt for JIRA issue IBATISNET-253
Added:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/child-parent-init.sql
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/IBatisNet.DataMapper.Test.2005.csproj
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/GroupByTest.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=609151&r1=609150&r2=609151&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
Sat Jan 5 07:16:35 2008
@@ -431,6 +431,7 @@
<Content Include="Scripts\MSSQL\category-init.sql" />
<Content Include="Scripts\MSSQL\category-procedure.sql" />
<Content Include="Scripts\MSSQL\category-procedureWithReturn.sql" />
+ <Content Include="Scripts\MSSQL\child-parent-init.sql" />
<Content Include="Scripts\MSSQL\coupons-init.sql" />
<Content Include="Scripts\MSSQL\DataBase.sql" />
<Content Include="Scripts\MSSQL\DBCreation.sql" />
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/GroupByTest.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/GroupByTest.cs?rev=609151&r1=609150&r2=609151&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/GroupByTest.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/GroupByTest.cs
Sat Jan 5 07:16:35 2008
@@ -31,6 +31,8 @@
InitScript(sqlMap.DataSource, ScriptDirectory +
"petstore-drop.sql");
InitScript(sqlMap.DataSource, ScriptDirectory +
"petstore-schema.sql");
InitScript(sqlMap.DataSource, ScriptDirectory +
"petstore-init.sql");
+ InitScript(sqlMap.DataSource, ScriptDirectory +
"child-parent-init.sql");
+
}
Added:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/child-parent-init.sql
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/child-parent-init.sql?rev=609151&view=auto
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/child-parent-init.sql
(added)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Scripts/MSSQL/child-parent-init.sql
Sat Jan 5 07:16:35 2008
@@ -0,0 +1,33 @@
+-- Creating Table
+
+use [IBatisNet]
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Child]')
and OBJECTPROPERTY(id, N'IsUserTable') = 1)
+begin
+drop table [dbo].[Child]
+end
+
+if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[Parent]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
+begin
+drop table [dbo].[Parent]
+end
+
+CREATE TABLE [dbo].[Child] (
+ [Id] [int] IDENTITY (1, 1) NOT NULL ,
+ [ParentId] [int] NOT NULL ,
+ [Description] [varchar] (100) NOT NULL ,
+ [RowVersion] [timestamp] NOT NULL
+) ON [PRIMARY]
+
+CREATE TABLE [dbo].[Parent] (
+ [Id] [int] IDENTITY (1, 1) NOT NULL ,
+ [Description] [varchar] (100) NOT NULL ,
+ [RowVersion] [timestamp] NOT NULL
+) ON [PRIMARY]
+
+-- Creating Test Data
+insert into Parent ([Description]) values ('Parent 1')
+insert into Parent ([Description]) values ('Parent 2')
+
+insert into Child ([ParentId], [Description]) values (1, 'Child 1')
+insert into Child ([ParentId], [Description]) values (1, 'Child 2')
\ No newline at end of file