Chuck Stein
08/21/2023, 5:18 PMjava.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
Here is my query:
@Query("SELECT isCompleted FROM $ONBOARDING_STATUS_TABLE_NAME WHERE type = :featureEducationType")
suspend fun isCompleted(featureEducationType: FeatureEducationType): Boolean
I'm not sure how the query is returning null, because the column is defined with a default value:
@Entity(tableName = "table_onboarding_status")
data class OnboardingStatus(
@ColumnInfo(name = "type") @PrimaryKey val type: FeatureEducationType,
@ColumnInfo(name = "isCompleted", defaultValue = "0") val isCompleted: Boolean,
)