-
**Here I want to insert some static categories when the app will be lunch. the first time it was inserted successfully but the second when the app lunch it show "UNIQUE constraint failed". I want if categories name already exists then it should be ignored ** @database(version: 1, entities: [CategoriesEntity]) Entity DAO List void main() async{ ERROR E/flutter (10713): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: DatabaseException(UNIQUE constraint failed: cate_tbl.cata_name (code 2067 SQLITE_CONSTRAINT_UNIQUE)) sql 'INSERT OR ABORT INTO cate_tbl (id, cata_name) VALUES (NULL, ?)' args [Small] |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
the issue has been solved here #716 |
Beta Was this translation helpful? Give feedback.
the issue has been solved here #716