Monday 26 March 2007

Nhibernate: Date time field null on insert

Receiving exception when trying to save a record the stack tarce identified theproblem as a null value for a DateTime field.
This is caused by either:
  1. Property not marked as nullable (? after Type in property declaration)
  2. Existing record being flushed that contains an invalid null value for datetime.