[JDBC Error] Data truncated for column 'xxx'

Background

When I do an insert operation to save the item data to MySQL, occurs an error.

Error Info

Error updating database.  Cause: java.sql.SQLException: Data truncated for column 'xxx' at row 1

Solutions

Check whether the column type is right.

Check whether the length of the field value over the length of the column.

Reasons

The length of the field value over the length of the column.

My passed field value is a set type value, but the column type is enum. The column type should update to set.