I have a microsoft sql server table with a computed column named “RowOrder”:
CREATE TABLE [dbo].[Miss](
[ID] [int] IDENTITY(1,1) NOT NULL,
[RifID_Soc] [int] NOT NULL,
[Data] [date] NOT NULL,
[Note] [nvarchar](max) NULL,
[Stato] [char](1) NOT NULL,
[Annullata] [bit] NOT NULL,
[RowOrder] AS (case [Stato] when 'I' then (1) when 'P' then (2) else (9) end) PERSISTED NOT NULL,
CONSTRAINT [PK_SVC_Missioni] PRIMARY KEY CLUSTERED
In Cuba Data Model this column is defined as Read Only.
In the Edit Screen, when I create a new record I receive an error:
SQLServerException: The column "RowOrder" cannot be modified because it is either a computed column or is the result of a UNION operator
Because Cuba want to insert a value for this column even if it is readonly.
Thanks for your help