From 2ec8f15d02f12a76a5dc68c1388902b11c655572 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Fri, 27 Aug 2021 20:08:36 +0000 Subject: [PATCH] make Room ignore the no-argument Currency constructor the one with all fields should be good --- app/src/main/java/net/ktnx/mobileledger/db/Currency.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/net/ktnx/mobileledger/db/Currency.java b/app/src/main/java/net/ktnx/mobileledger/db/Currency.java index a9f799f8..85524439 100644 --- a/app/src/main/java/net/ktnx/mobileledger/db/Currency.java +++ b/app/src/main/java/net/ktnx/mobileledger/db/Currency.java @@ -20,6 +20,7 @@ package net.ktnx.mobileledger.db; import androidx.annotation.NonNull; import androidx.room.ColumnInfo; import androidx.room.Entity; +import androidx.room.Ignore; import androidx.room.Index; import androidx.room.PrimaryKey; @@ -35,6 +36,7 @@ public class Currency { @NonNull @ColumnInfo(name = "has_gap") private Boolean hasGap; + @Ignore public Currency() { id = 0; name = ""; -- 2.39.5