On the face of it, I encountered this problem recently when the project was about to go live
In Greendao’s database table, the ID field is unique due to the insertion of data with duplicate IDS
However, our business logic is that if the database is emptied and the data is inserted, it is theoretically impossible to have duplicate ids
DaoUtils.getDaoSession().getPurchaseOrderTableDao().insertInTx(mPurSkuList);
In Greendao’s database table, the ID field is unique due to the insertion of data with duplicate IDS
However, our business logic is that if the database is emptied and the data is inserted, it is theoretically impossible to have duplicate ids
DaoUtils.getDaoSession().getPurchaseOrderTableDao().insertInTx(mPurSkuList);
The number of lines of code goes to this location
The first thing that comes to mind is that the data table may not be completely cleaned up, but after debugging, it is indeed completely cleaned up
Continue debugging and find problems
Read More:
- python sqlite Error IntegrityError: UNIQUE constraint failed: table_area1.user_name
- [Oracle] when inserting data, “ora-00001: unique constraint” appears
- SAP mm receives the purchase order and reports an error – table t169p entry znmi does not exist-
- django.db.utils.IntegrityError: UNIQUE constraint failed: auth_user.username
- Mysql error when deleting the table structure: Error Code: 1217. Cannot delete or update a parent row: a foreign key constraint fails
- IntegrityError at ** NOT NULL constraint failed: learning_logs_topic.owner_id
- django.db.utils .IntegrityError: NOT NULL constraint failed: blog_ blog.author_ ID error resolution
- Failed to add the foreign key constraint. Missing index for constraint ‘stu_ibfk_1’ in the reference
- [Solved] MongoDB Insert Data Error: OperationFailure: Authentication failed…
- 1822 – Failed to add the foreign key constraint. Missing index for constraint ‘tb_emp_ibfk_1’ in the
- SAP Migo 101 receives the work order and reports an error – check table tfbefu_ CR entry 10 does not exist – Countermeasures
- Mybatis batch insert data
- Insert keyframe giving keying set failed to insert any key frames (solved)
- MySQL workbench insert data prompt error: 1046 (errorcode: 1046. No database select…)
- Insert into / delete / update / select of SQL Server database table
- The influence of the loading order of props, data and computed in Vue
- 1072 – Key column ‘xxx_id’ doesn’t exist in table
- Insert keyframe giving keying set failed to insert any key frames
- MySql ERROR CODE:1215 Cannot add the foreign key constraint
- MySQL partitions the existing tables of the data table