Cannot define new concurrency token in the derived class RRS feed

  • Question

  • Hi,

    I have implemented a inheritance schema, having in a base class properties such as identifier and a timestamp column.
    All my POCOs inherit from this base class.

    Here is an example for a simple entity (CSDL):
    	<EntityType Name="EntityBase" Abstract="true">
    			<PropertyRef Name="Id" />
    		<Property Type="Guid" Name="Id" Nullable="false" />
    		<Property Type="Binary" Name="TimeStamp" Nullable="false"/>
    	<EntityType Name="Person" BaseType="MyNamespace.EntityBase">
    		<Property Name="PersonKey" Type="String" Nullable="false" MaxLength="20" />
    		<Property Name="Name" Type="String" Nullable="false" MaxLength="100" />
    And the msl fragment:

    		<EntitySetMapping Name="Persons">
    			<EntityTypeMapping TypeName="MyNamespace.Person">
    				<MappingFragment StoreEntitySet="Persons">
    					<ScalarProperty Name="Id" ColumnName="Id"/>
    					<ScalarProperty Name="TimeStamp" ColumnName="TimeStamp"/>
    					<ScalarProperty Name="PersonKey" ColumnName="PersonKey"/>
    					<ScalarProperty Name="Name" ColumnName="Name"/>
    This is working well. But when i try to activate the concurrency mode in the TimeStamp property (adding the attribute ConcurrencyMode="Fixed") i am getting the following error:

    "error 3008: Problem in mapping fragments starting at line <linenumber>:Cannot define new concurrency token member TimeStamp in the derived class EntityBase of EntitySet Persons"

    Is there any way to handle this, or am i doing something wrong?

    Many thanks.

    Thursday, December 10, 2009 10:20 AM

All replies

  • I've the same problem! Could some one from Microsoft help here please?
    Pedro Salgueiro
    Monday, March 1, 2010 4:47 PM