From: NHibernate J. <mik...@us...> - 2006-10-24 18:30:37
|
Nullable DateTime does not properly persist DateTime.MaxValue ------------------------------------------------------------- Key: NH-773 URL: http://jira.nhibernate.org/browse/NH-773 Project: NHibernate Type: Bug Components: Core Versions: 1.2.0.Beta1 Reporter: Michael Teper public class DateTimeTest { int _id = 0; DateTime? _dt = DateTime.MaxValue; public int Id { get { return _id; } set { _id = value; } } public DateTime? Dt { get { return _dt; } set { _dt = value; } } } <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="DateTimeTest" table="Test"> <id name="Id" column="id" unsaved-value="0"> <generator class="identity" /> </id> <property name="Dt" column="dt" /> </class> </hibernate-mapping> If I save and then load the class, the Dt.Ticks value is 3155378975990000000, whereas DateTime.MaxValue.Ticks = 3155378975999999999. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |