Trying to get to the bottom of a huge bug (more on that later perhaps...
when I figure out if it is NH or my code) I noticed that DateTimeType is
only returning the Date part of the data and not the Time part for ToString
and other operations. Any reason for this? I'd like to see it return
everything as that's more useful in log files etc.
Specifically:
public override string ToString(object val)
{
return ((DateTime) val).ToShortDateString();
}
public override string ObjectToSQLString(object value, Dialect.Dialect
dialect)
{
return "'" + ((DateTime)value).ToShortDateString() + "'";
}
It looks like these were copied long ago from the DateType and never
updated. Java Hibernate does NOT have a DateTimeType. I'll change these to
the full DateTimes unless someone has a reason they should not be...
-Will