views:

91

answers:

1

I have a table with about 30+ columns, so i decided to group them using complex types. When trying to build the assembly, i get the following error:

Error 3023: Problem in mapping fragments starting at line 933:Column TableName.ColumnName in table TableName must be mapped: It has no default value and is not nullable. One of my complex types includes a property with that exact name, and that exact data type. Any ideas on how i can approach this?

+1  A: 

Ok i was too quick to blame it on Entity Framework, the problem was that i had the same table in the schema before, only mapped to a different table name (both tables have exactly the same structure and are in the same database). Now what i did was remove the reference to the old table and add the new one to the schema, and then i added the complex types that were already built for the old table. This of course was a problem because the complex types were mapped to columns in the old table. So what i did was delete the complex types and recreate new ones from the new table. Problem solved.

scripni