I have two field like store and barcode. I have to create a column which will work as composite primary key and will be the combination of store and barcode. But the table is being inflated from Json. I want to update the row if the combination already exists.
@PrimaryKey
private String CompositePrimaryKey
@SerializedName("barcode")
private String barcode;
public String getStoreCode() {
return storeCode;
}
public void setStoreCode(String storeCode) {
this.storeCode = storeCode;
}
@SerializedName("storeCode")
private String storeCode;
Not sure how to save the value form Json.