This question is locked. New answers and comments are not allowed.
I've read through the documentation on using a discriminator column (flat-mapping) and I just have one issue left to resolve, but first here's what I'm looking at.
DBTable
(
ID int identity(1,1) PK
--other fields here..
pageType nvarchar(5) NOT NULL --THIS IS THE DISCRIMINATOR COLUMN
)
Now in the App.Config I have added this as per the documentation into the base class:
<extension key="db-class-id" value="0">
<extension key="db-column">
<extension key="db-type" value="VARCHAR" />
<extension key="db-column-name" value="page_Type" />
</extension>
</extension>
In the App.Config the inherited class has:
<class name="InheritedClass1Name">
<extension key="db-class-id" value="PAAN" />
</class>
I can read records just fine, but when I attempt to add a record I get an Exception saying that the discrimiator column is in the insert statement twice. The inherited classes have nothing unique to it, no data members on it's own. What am I doing wrong?
Thanks in advance,
Al
DBTable
(
ID int identity(1,1) PK
--other fields here..
pageType nvarchar(5) NOT NULL --THIS IS THE DISCRIMINATOR COLUMN
)
Now in the App.Config I have added this as per the documentation into the base class:
<extension key="db-class-id" value="0">
<extension key="db-column">
<extension key="db-type" value="VARCHAR" />
<extension key="db-column-name" value="page_Type" />
</extension>
</extension>
In the App.Config the inherited class has:
<class name="InheritedClass1Name">
<extension key="db-class-id" value="PAAN" />
</class>
I can read records just fine, but when I attempt to add a record I get an Exception saying that the discrimiator column is in the insert statement twice. The inherited classes have nothing unique to it, no data members on it's own. What am I doing wrong?
Thanks in advance,
Al