Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

没有约定key 主键唯一 #1

Open
litaoyuan opened this issue Sep 23, 2019 · 0 comments
Open

没有约定key 主键唯一 #1

litaoyuan opened this issue Sep 23, 2019 · 0 comments

Comments

@litaoyuan
Copy link

abort at 12 in [INSERT INTO book (name, author, price, publishingHouse, _id) VALUES (?, ?, ?, ?, ?)]: UNIQUE constraint failed: book._id
E/flutter (11772): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: DatabaseException(UNIQUE constraint failed: book._id (code 1555)) sql 'INSERT INTO book (name, author, price, publishingHouse, _id) VALUES (?, ?, ?, ?, ?)' args [flutter大全0, flutter, 0.1, 中国出版, 0]}
E/flutter (11772): #0 wrapDatabaseException (package:sqflite/src/exception.dart:126:7)
E/flutter (11772):
E/flutter (11772): #1 SqfliteDatabase.txnRawInsert. (package:sqflite/src/database.dart:338:14)
E/flutter (11772): #2 SqfliteDatabase.txnSynchronized. (package:sqflite/src/database.dart:297:22)
E/flutter (11772): #3 BasicLock.synchronized (package:synchronized/src/basic_lock.dart:19:26)
E/flutter (11772):
E/flutter (11772): #4 SqfliteDatabase.txnSynchronized (package:sqflite/src/database.dart:293:43)
E/flutter (11772):
E/flutter (11772): #5 SqfliteDatabase.txnWriteSynchronized (package:sqflite/src/database.dart:314:7)
E/flutter (11772): #6 SqfliteDatabase.txnRawInsert (package:sqflite/src/database.dart:337:12)
E/flutter (11772): #7 SqfliteDatabaseExecutor.rawInsert (package:sqflite/src/database.dart:29:10)
E/flutter (11772): #8 SqfliteDatabaseExecutor.insert (package:sqflite/src/database.dart:38:12)
E/flutter (11772): #9 BookSqlite.insert (package:flutter_sqlite_demo/Book.dart:73:24)
E/flutter (11772):
E/flutter (11772): #10 _MyHomePageState.insertData (package:flutter_sqlite_demo/main.dart:62:22)
E/flutter (11772):
E/flutter (11772): #11 _MyHomePageState.initState (package:flutter_sqlite_demo/main.dart:31:5)
E/flutter (11772): #12 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4061:58)
E/flutter (11772): #13 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3912:5)
E/flutter (11772): #14 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3094:14)
E/flutter (11772): #15 Element.updateChild (package:flutter/src/widgets/framework.dart:2897:12)
E/flutter (11772): #16 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5129:14)
E/flutter (11772): #17 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3094:14)
E/flutter (11772): #18 Element.updateChild (package:flutter/src/widgets/framework.dart:2897:12)
E/flutter (11772): #19 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3954:16)
E/flutter (11772): #20 Element.rebuild (package:flutter/src/widgets/framework.dart:3731:5)
E/flutter (11772): #21 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3917:5)
E/flutter (11772): #22 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3912:5)
E/flutter (11772): #23 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3094:14)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant