Never define a tinyint table field as an INT class property

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Never define a tinyint table field as an INT class property

Post by AbleMods » Thu Feb 15, 2018 12:24 am

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....
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Post Reply