I’m using NHibernate and I have some doubts abour how NHibernate handles null values for non-nullable fields. I would assume that NHibernate would throw an exception at the time of creating the entity, but I have found some evidence suggesting it will set the field to the default value of the type.
Which is correct?
From what I have experienced, it would usually assign a default value.
This is the behaviour I have found in my applications. One could probably somehow make it throw exceptions, but I personally have no need for it.