objectbox / objectbox/objectbox-java

DbExceptionListener for migration issues

Open
#355 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
4.6k
Forks
311
PR merge metrics
No merged PRs in 30d

Description

Hi. Is possible to use new DbExceptionListener to handle migration issues and for example drop db?
I tried to add listener just after builder but it's too late and exception is thrown earlier.
I know that there shouldn't be any if everything is done correctly but in my case I can just drop db and recreate it with data from backend.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing initialization around the builder, DbExceptionListener, and the migration path to identify where the exception is raised before the listener is added. Determine the expected behavior for handling that migration failure, including the requested drop-and-recreate flow; the payload names no specific files or tests, so completion criteria need maintainer clarification.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.