Problem Description:
When adding data to the database, the primary key of the data is not specified, and the entity auto increment is not set at this time. As a result, the data cannot be added to the database
Solution:
Set entity class as primary key auto increment, or specify primary key when adding data
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer categoryId;
Read More:
- Error 1146 (42s02): table ‘database name. Table name’ doesn’t exist ‘
- Django. DB. Utils. Programmingerror: (1146, “table * doesn’t exist”) causes and Solutions
- 1072 – Key column ‘xxx_id’ doesn’t exist in table
- mysql Table ‘performance_ schema.session_ Variables’ doesn’t exist solution
- MySQL – ERROR 1146 (42S02): Table ‘mysql.user’ doesn’t exist
- SAP mm receives the purchase order and reports an error – table t169p entry znmi does not exist-
- DB: the solution of table already exist when migrating
- Systemctl command doesn’t exist. How to solve the problem that the service can’t be started
- urllib3 (1.26.4) or chardet (4.0.0) doesn‘t match a supported version!
- Gradle:Using flatDir should be avoided because it doesn‘t support any meta-data formats.
- Solve selenium error — unknown error: devtoolsactivport file doesn’t exist
- Error casting p_sequencer, please verify that this sequence/sequence item is intended to execute
- A cross-origin error was thrown. React doesn‘t have access to the actual error object in development
- SAP Migo 101 receives the work order and reports an error – check table tfbefu_ CR entry 10 does not exist – Countermeasures
- In the SQL query statement, add the column that does not exist in the table and set the fixed value of the column
- Insufficient table space ORA-00604 unable to extend table SYS.AUD by 8192
- Errors in IntelliJ ieeasql statements and table names in @ table
- How to call stored procedure in Hibernate
- The solution of Hibernate query returning all null lists
- Error: field * doesn’t have a default value