Good day. i already checked the other question regarding the same topic. but i cant seem to understand why my app is throwing a Foreign key Mismatch error.
in my Patient table, i declared localUuid as my Primary key.
@Column(isPrimaryKey = true, isUnique = true, isNotNullable = true)
@Expose
@SerializedName("local_uuid")
protected String localUuid;
in my Appointment table, i declared patientUuid a Foreign key
@NOrm.Column(isForeignKey = true, referenceTable = "Patient", referenceColumn = "localUuid", isNotNullable = true)
@Expose
@SerializedName("patient_Uuid")
protected String patientUuid;
so the Problem comes when i update the value of the Column patientUuid
db.execSQL("UPDATE Appointment SET clinicUuid = '289f0c31-a8e3-4906-8ab2-c39e2dad368e'
WHERE localUuid ='a1584d2c-50df-46d6-86f7-6b753697116a'");
many thanks and sorry for bad english