创建表成功,插入数据应该是12条,但最后插入成功只是6条,还报错
code: -1404, message: "android.database.sqlite.SQLiteConstraintException:…(code 1555),https://ask.dcloud.net.cn/article/282"
说明表foreign_table里id重复,所以后面插入失败!
然后网上查找了好久,确实,foreign_table 里for循环的数据ID有相同的ID,所以直插入了6条数据!!!!
解决办法:新建关联表或挂靠其他表。
使用uniapp 的 plus.sqlite 操作本地数据库报错:::table xxx has no column named xxxx_uniapp引入了plus.sqlite-优快云博客