This project is read-only.
1
Vote

Computed PK not recognized by nHydrate as PK

description

I have the following table imported from my database:
CREATE TABLE [dbo].[Mde_Months]
(
[Year] INT NOT NULL, 
[MonthNo] INT NOT NULL,
[Id] AS [Year]*12+[MonthNo]-1 PERSISTED NOT NULL, 
CONSTRAINT [PK_Mde_Months] PRIMARY KEY ([Id])
)

In my nHydrate model, properties for Id column are: Is Generated=true, and Is Primary Key=false. If I try to set 'Is Primary Key' property to true, it reverts back to false.

Could this bug be fixed soon?

comments