Reason: in the configuration file of student table in Hibernate project:
<id name="studentno" column="studentno">
<generator class="native"></generator>
</id>
The primary key is set to the type of automatic growth, but the data type is set to the type of vchar when the database creates a table. How can the + + operation be realized
Set the student number (primary key) to int, and the problem is solved successfully
Similar Posts:
- [Solved] MySQL ERROR 1062 (23000): Duplicate entry ‘0’ for key ‘PRIMARY’
- pymysql.err.OperationalError: (1054, “Unknown column’aa’in’field list’)
- [Solved] Cause: java.sql.SQLException: Field ‘id‘ doesn‘t have a default value
- With check option in SQL
- Ora-01653: table a cannot be extended by 1024 (in table space ABC)
- [Solved] loadrunner11 Run 10000 concurrency Error: The load generator is currently running the maximum number of Vusers of this type
- Program error: the table or view does not exist [Solved]
- MySQL error message: subquery returns more than 1 row and its solution
- Solution of data truncated for column ‘xxx’ in MySQL
- In Oracle, an error is reported: ora-00904