Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14408/NHibernate.Test
Modified Files:
JoinedSubclassTest.cs
Log Message:
Modified the JoinedSubclass to use the native generator to help fix a bug
with the sql that was being generated.
Index: JoinedSubclassTest.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/JoinedSubclassTest.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** JoinedSubclassTest.cs 10 Feb 2004 19:16:54 -0000 1.1
--- JoinedSubclassTest.cs 28 Apr 2004 03:45:37 -0000 1.2
***************
*** 28,31 ****
--- 28,34 ----
public void TestCRUD() {
+ int one1Id;
+ int base1Id;
+
// test the Save
ISession s1 = sessions.OpenSession();
***************
*** 33,37 ****
JoinedSubclassOne one1 = new JoinedSubclassOne();
! one1.Id = 2;
one1.TestDateTime = new System.DateTime(2003, 10, 17);
one1.TestString = "the test one string";
--- 36,40 ----
JoinedSubclassOne one1 = new JoinedSubclassOne();
! //one1.Id = 2;
one1.TestDateTime = new System.DateTime(2003, 10, 17);
one1.TestString = "the test one string";
***************
*** 42,46 ****
JoinedSubclassBase base1 = new JoinedSubclassBase();
! base1.Id = 1;
base1.TestDateTime = new System.DateTime(2003, 10, 17);
base1.TestString = "the test string";
--- 45,49 ----
JoinedSubclassBase base1 = new JoinedSubclassBase();
! //base1.Id = 1;
base1.TestDateTime = new System.DateTime(2003, 10, 17);
base1.TestString = "the test string";
***************
*** 52,55 ****
--- 55,61 ----
s1.Close();
+ one1Id = one1.Id;
+ base1Id = base1.Id;
+
// lets verify the correct classes were saved
ISession s2 = sessions.OpenSession();
***************
*** 57,62 ****
// perform a load based on the base class
! JoinedSubclassBase base2 = (JoinedSubclassBase)s2.Load(typeof(JoinedSubclassBase), 1);
! JoinedSubclassBase oneBase2 = (JoinedSubclassBase)s2.Load(typeof(JoinedSubclassBase), 2);
// do some quick checks to make sure s2 loaded an object with the same data as s2 saved.
--- 63,68 ----
// perform a load based on the base class
! JoinedSubclassBase base2 = (JoinedSubclassBase)s2.Load(typeof(JoinedSubclassBase), base1Id);
! JoinedSubclassBase oneBase2 = (JoinedSubclassBase)s2.Load(typeof(JoinedSubclassBase), one1Id);
// do some quick checks to make sure s2 loaded an object with the same data as s2 saved.
|