therajanmaurya commented on a change in pull request #10: feat: Sync feature
for customer and customer details
URL: https://github.com/apache/fineract-cn-mobile/pull/10#discussion_r203730782
##########
File path:
app/src/main/java/org/apache/fineract/data/models/customer/ContactDetail.kt
##########
@@ -3,16 +3,26 @@ package org.apache.fineract.data.models.customer
import android.os.Parcelable
import com.google.gson.annotations.SerializedName
+import com.raizlabs.android.dbflow.annotation.ConflictAction
+import com.raizlabs.android.dbflow.annotation.ForeignKey
+import com.raizlabs.android.dbflow.annotation.PrimaryKey
+import com.raizlabs.android.dbflow.annotation.Table
+import com.raizlabs.android.dbflow.structure.BaseModel
import kotlinx.android.parcel.Parcelize
+import org.apache.fineract.data.local.database.AppDatabase
@Parcelize
+@Table(name = "ContactDetail", database = AppDatabase::class, allFields =
true, insertConflict =
+ConflictAction.REPLACE, useBooleanGetterSetters = false)
data class ContactDetail(
@SerializedName("type") var type: Type? = null,
- @SerializedName("value") var value: String? = null,
+ @PrimaryKey @SerializedName("value") var value: String? = null,
Review comment:
Can't make `value` PrimaryKey because value is not unique
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services