Repro Steps:
1. Create a database in MSSQL2008R2.
2. Create one table in database with an int32 PK column and a nullable int32 discriminator column.
3. Create an ADO.NET EDMX, update from database above.
4. Create the following types and mappings:
BaseType
TypeA : BaseType, when discriminator is null
abstract TypeB : BaseType, when discriminator is not null
TypeB1: TypeB, when discriminator is 0
TypeB2: TypeB, when discriminator is 1
5. Run validation of EDMX.
Actual Results:
Validation produces a "Sequence contains no elements" error with no specific location in edmx. (No hint that this mapping is what causes it.)
Expected Results:
Successful validation.
Srikanth Mandadi added a comment.
We fixed the product so that the error message is better but the mapping it self is not supported because we have a very simple check to make sure that NotNull columns are mapped but in this case it need not be mapped.
1. Create a database in MSSQL2008R2.
2. Create one table in database with an int32 PK column and a nullable int32 discriminator column.
3. Create an ADO.NET EDMX, update from database above.
4. Create the following types and mappings:
BaseType
TypeA : BaseType, when discriminator is null
abstract TypeB : BaseType, when discriminator is not null
TypeB1: TypeB, when discriminator is 0
TypeB2: TypeB, when discriminator is 1
5. Run validation of EDMX.
Actual Results:
Validation produces a "Sequence contains no elements" error with no specific location in edmx. (No hint that this mapping is what causes it.)
Expected Results:
Successful validation.
Srikanth Mandadi added a comment.
We fixed the product so that the error message is better but the mapping it self is not supported because we have a very simple check to make sure that NotNull columns are mapped but in this case it need not be mapped.