Title: net.zetetic.database.sqlcipher.SQLiteConstraintException thrown if @Upsert is used · Issue #23 · sqlcipher/sqlcipher-android · GitHub
Open Graph Title: net.zetetic.database.sqlcipher.SQLiteConstraintException thrown if @Upsert is used · Issue #23 · sqlcipher/sqlcipher-android
X Title: net.zetetic.database.sqlcipher.SQLiteConstraintException thrown if @Upsert is used · Issue #23 · sqlcipher/sqlcipher-android
Description: I have implemented the sqlcipher-android in this commit: PrimalHQ/primal-android-app@4bc4482 If I run clean install build I'm getting: net.zetetic.database.sqlcipher.SQLiteConstraintException: UNIQUE constraint failed: ProfileData.ownerI...
Open Graph Description: I have implemented the sqlcipher-android in this commit: PrimalHQ/primal-android-app@4bc4482 If I run clean install build I'm getting: net.zetetic.database.sqlcipher.SQLiteConstraintException: UNIQ...
X Description: I have implemented the sqlcipher-android in this commit: PrimalHQ/primal-android-app@4bc4482 If I run clean install build I'm getting: net.zetetic.database.sqlcipher.SQLiteConstraintException: ...
Opengraph URL: https://github.com/sqlcipher/sqlcipher-android/issues/23
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"net.zetetic.database.sqlcipher.SQLiteConstraintException thrown if @Upsert is used","articleBody":"I have implemented the sqlcipher-android in this commit:\r\nhttps://github.com/PrimalHQ/primal-android-app/commit/4bc4482565e6c0941ca859faae21822e8a347d3d\r\n\r\nIf I run clean install build I'm getting:\r\n```\r\nnet.zetetic.database.sqlcipher.SQLiteConstraintException: UNIQUE constraint failed: ProfileData.ownerId (code 1555)\r\n\tat net.zetetic.database.sqlcipher.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)\r\n\tat net.zetetic.database.sqlcipher.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:815)\r\n\tat net.zetetic.database.sqlcipher.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:823)\r\n\tat net.zetetic.database.sqlcipher.SQLiteStatement.executeInsert(SQLiteStatement.java:113)\r\n\tat androidx.room.EntityInsertionAdapter.insert(EntityInsertionAdapter.kt:51)\r\n\tat androidx.room.EntityUpsertionAdapter.upsert(EntityUpsertionAdapter.kt:91)\r\n\tat net.primal.android.profile.db.ProfileDataDao_Impl.upsertAll(ProfileDataDao_Impl.java:165)\r\n\t.....\r\n```\r\n\r\nIt turns out that `@Upsert` is the cause of the crash. If we replace it with `@Insert(onConflict = OnConflictStrategy.REPLACE)` everything works fine. https://github.com/PrimalHQ/primal-android-app/commit/a46232a1f390f9d0418b4f6189d6ed1d1646d5dc\r\n","author":{"url":"https://github.com/AleksandarIlic","@type":"Person","name":"AleksandarIlic"},"datePublished":"2023-11-03T22:32:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/23/sqlcipher-android/issues/23"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a9fe513b-80fb-e733-45fd-f08123f252f7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C4E8:3D113A:2AA750B:3BE4104:69710807 |
| html-safe-nonce | 713b7a3e797dc0cd739de9d436ae2c1e7e98103c2e858385867566433075fbee |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNEU4OjNEMTEzQToyQUE3NTBCOjNCRTQxMDQ6Njk3MTA4MDciLCJ2aXNpdG9yX2lkIjoiMzM5NDU3Mjk1NjU4NTc1NjY3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6229a8a51a2d09bba0e974fc390a55d94d8f46275f4fb603b305d26ef2f3cb8f |
| hovercard-subject-tag | issue:1977010374 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sqlcipher/sqlcipher-android/23/issue_layout |
| twitter:image | https://opengraph.githubassets.com/efe40c990c215920c70c0380285fd612a0d773d21428cd04e7a6cb4514390040/sqlcipher/sqlcipher-android/issues/23 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/efe40c990c215920c70c0380285fd612a0d773d21428cd04e7a6cb4514390040/sqlcipher/sqlcipher-android/issues/23 |
| og:image:alt | I have implemented the sqlcipher-android in this commit: PrimalHQ/primal-android-app@4bc4482 If I run clean install build I'm getting: net.zetetic.database.sqlcipher.SQLiteConstraintException: UNIQ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AleksandarIlic |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6d0e7b0d5e294a53c55f49e80755e785182080c6e6a48c9ed353bedddaee69f4 |
| turbo-cache-control | no-preview |
| go-import | github.com/sqlcipher/sqlcipher-android git https://github.com/sqlcipher/sqlcipher-android.git |
| octolytics-dimension-user_id | 649049 |
| octolytics-dimension-user_login | sqlcipher |
| octolytics-dimension-repository_id | 490856384 |
| octolytics-dimension-repository_nwo | sqlcipher/sqlcipher-android |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 490856384 |
| octolytics-dimension-repository_network_root_nwo | sqlcipher/sqlcipher-android |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6d5a3a396bc74e65fd3ef897b0a99a6e489debaa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width