Field 'id' doesn't have a default value error solution

Field 'id' doesn't have a default value error message.

The primary key type is obtained as "native" and is specified by the database.
Check and find that the Employee table already exists in the database, and the default value of id in the table is 0, which is not an auto-increment attribute.
Then delete the Employee table, run the Hibernate program, and run the Hibernate program to create the Employee table. test was successful.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324821689&siteId=291194637