Do I have to set the ID value in entity class in hibernate, When I don't set the value for ID It shows "Column 'ID' doesn't have default value". Datatype for the column is Decimal, but when I use same database in Oracle I didn't get error like this. I was seeing this error when I'm using MySQL. Could you give me an suggestion.