Page 1 of 1

Never define a tinyint table field as an INT class property

Posted: Thu Feb 15, 2018 12:24 am
by AbleMods
FYI for those interested...

If you define a SQL table field as 'tinyint', do NOT define the class property as an 'int' data type. Many, many bad things happen in Able whenever nHibernate tries to flush the session.

The table property was tinyint
The hbm file defined it as byte
but the class file defined the property as 'int'.

That one cost me about 6 hours of work rolling back, and then rolling forward one change at a time until I isolated the root cause.

Oh the lessons we learn from the smallest of mistakes....