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

Fixed: SQLiteConstraintException when inserting the same id item of hisotry/notes in room database. #3900

Merged
merged 2 commits into from
Jun 27, 2024

Commits on Jun 26, 2024

  1. Fixed: SQLiteConstraintException when inserting the same id item of h…

    …isotry/notes in room database.
    
    * id is the primary key for notes/history and when there is an already id available in the room database, and if there is the same id present in the objectbox database and we try to put that entity in the room it gives the SQLiteConstraintException. To fix this we have modified our saving functions of history and notes. If there is already an ID that exists in the room database that we are trying to put in the database it will set the ID to 0 so that the room will automatically assign the ID to that entity and our history/notes will prevent to be lost.
    * Added the test cases to properly test these scenarios.
    MohitMaliDeveloper committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    13233e0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    91eacae View commit details
    Browse the repository at this point in the history