The error that I am getting is:
Error Number: 23000/544
[Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot insert explicit value for identity column in table 'audit_domain' when IDENTITY_INSERT is set to OFF.
UPDATE "domain" SET "domain_acronym" = 'RM', "domain" = Resource Management', "reference_name" = 'Resource Mgmt' WHERE "id" = '1'
The code that I am using:
$updatedata['domain_acronym'] = $this->postdata['domain_acronym'];
$updatedata['domain_name'] = $this->postdata['domain_name'];
$updatedata['reference_name'] = $this->postdata['reference_name'];
$this->db->where($pk, $pkValue);
$this->db->update('domains', $updatedata);
The domain table has the primary key of Id and the audit table doesn't have any primary key set. I have been trying to fix this for a couple of days now so any pointers on how to debug/fix it would be really appreciated.