Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9553/NHibernate.DomainModel
Modified Files:
Abstract.cs Foo.cs FooBar.hbm.xml Simple.cs
Log Message:
DateTime values always have a default value now. This is needed
because of the change to DateTimeType so it no longer changes
anything less than 1753 to null.
Index: Abstract.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Abstract.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Abstract.cs 18 Nov 2004 02:45:43 -0000 1.5
--- Abstract.cs 17 Jan 2005 03:31:52 -0000 1.6
***************
*** 7,11 ****
public abstract class Abstract : Foo, AbstractProxy
{
! private DateTime _time;
private Iesi.Collections.ISet _abstracts;
--- 7,13 ----
public abstract class Abstract : Foo, AbstractProxy
{
! // added an initialization because MsSql errors out when inserting
! // dates outside of the range - TODO: fix this to be a DATE type
! private DateTime _time = new DateTime( 2001, 12, 1, 1, 1, 1 );
private Iesi.Collections.ISet _abstracts;
Index: FooBar.hbm.xml
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/FooBar.hbm.xml,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** FooBar.hbm.xml 5 Jan 2005 03:26:35 -0000 1.21
--- FooBar.hbm.xml 17 Jan 2005 03:31:52 -0000 1.22
***************
*** 147,150 ****
--- 147,154 ----
<key column="foo_id"/>
<index column="i"/>
+ <!--
+ in h2.0.3 this was type="date", but with ADO.NET there is no DbType that
+ is equivalent to the JDBC type DATE and java.sql.Date
+ -->
<element column="date_" type="DateTime"/>
</array>
Index: Foo.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Foo.cs,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** Foo.cs 5 Jan 2005 03:26:35 -0000 1.16
--- Foo.cs 17 Jan 2005 03:31:52 -0000 1.17
***************
*** 331,335 ****
{
_string = "a string";
! _date = new DateTime(2123,2,3);
_timestamp = DateTime.Now;
_integer = -666;
--- 331,335 ----
{
_string = "a string";
! _date = new DateTime( 1970, 01, 01 );
_timestamp = DateTime.Now;
_integer = -666;
***************
*** 349,353 ****
"foo", "bar"
};
! _component = new FooComponent("foo", 12, new DateTime[] { _date, _timestamp, DateTime.MinValue, new DateTime( DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day ) }, new FooComponent("bar", 666, new DateTime[] { new DateTime(1999,12,3), DateTime.MinValue }, null ) );
_component.Glarch = new Glarch();
_dependent = new Fee();
--- 349,354 ----
"foo", "bar"
};
! //_component = new FooComponent("foo", 12, new DateTime[] { _date, _timestamp, DateTime.MinValue, new DateTime( DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day ) }, new FooComponent("bar", 666, new DateTime[] { new DateTime(1999,12,3), DateTime.MinValue }, null ) );
! _component = new FooComponent("foo", 12, new DateTime[] { _date, _timestamp, new DateTime( DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day ) }, new FooComponent("bar", 666, new DateTime[] { new DateTime(1999,12,3) }, null ) );
_component.Glarch = new Glarch();
_dependent = new Fee();
Index: Simple.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Simple.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Simple.cs 8 Jun 2004 11:44:47 -0000 1.3
--- Simple.cs 17 Jan 2005 03:31:52 -0000 1.4
***************
*** 8,12 ****
private string address;
private int count;
! private DateTime date;
private Simple other;
--- 8,14 ----
private string address;
private int count;
! // initializing to a value that is ms independent because of MsSql millisecond
! // accurracy issues
! private DateTime date = new DateTime( 2004, 01, 01, 12, 00, 00, 00 );
private Simple other;
|