Question on using nullable columns and nhibernate:
There's a bit of a mismatch between nullable columns in your database, and .net value types such as DateTime, and Int32. I've noticed internally null dates are represented as DateTime.MinValue. So its possible to insert rows without setting the date, and they'll become null in the database. Possible to update a date field to MinValue, that also becomes null in the table... No such luck with ints!
Noticed nhibernate appears to have its own implementation of nullable types - DateTimeType extends Nullable type. Attempted to write my business entities using this type, but there doesn't seem to be any way to set a value on DateTimeType! Which makes me think it wasn't intended for what I'm doing.
Has anyone else run into (and solved) this??
|