547343992a2938a683d64bf05b97f171fa17df60
Per review on PR #8 (#8): - Split @Upsert into @Insert(OnConflictStrategy.REPLACE) + @Update in all 3 DAOs. @Upsert returns -1 on the update path, so callers wanting the row ID would get a junk value. Interactors now call insert vs update based on id == 0. UpsertCategory returns category.id explicitly for the id != 0 branch. - Add @Transaction to the 3 @Relation queries (ExpenseDao.subscribeAll, ExpenseDao.subscribeByDateRange, RecurringExpenseDao.subscribeAll). This silences the KSP warnings the PR body mentioned and makes the intent explicit. - Switch MainApplication seeding from a fire-and-forget CoroutineScope to runBlocking(Dispatchers.IO). A fast first-tap on HomeScreen could otherwise call GetCategories.awaitDefault() before seeding completed and crash. - Add documenting comment on CategoryDao.getDefault() noting that the 'only one isDefault = 1' invariant is maintained at the interactor layer (partial unique index would be a v2 migration). - Add trailing newline to app/build.gradle.kts. - File follow-up issue #9 for flipping exportSchema to true before any v2 migration lands.
fix(#1): address PR review — split upsert into insert/update, add @Transaction, runBlocking seed, trailing newline
Description
No description provided
Languages
Kotlin
100%