QL0060 Identity Column Write
The statement attempts to write to a column marked as identity in the schema snapshot.
When It Appears
- Schema-backed validation sees an
INSERTorUPDATEtarget list that includes an identity column - This is only available when Level 3 is active
Example
var insert = new SqlInsert("INSERT INTO dbo.orders (order_id, customer_id) VALUES (@OrderId, @CustomerId)");
Next Steps
- Remove the identity column from the write list
- Let the database generate the key and read it back after insert