使用ADO.NET Entity Data Model时遇到的问题,编译错误。也没找到解决的办法,貌似与主键外键有关。记录下,哪位大侠能帮解决下,感激。~
Error 1 Error 3026: Problem in Mapping Fragment(s) starting at line(s) (435, 489, 516, 527): Data loss or key constraint violation is possible in table Post. The following C-side state is not preserved upon retrieving persisted data from the store. An Entity instance e with Key (k) such that: ((k) plays role 'Post' in Association Set 'FK_Post_UserCategories' AND ((k) does NOT play role 'Post' in Association Set 'FK_Post_UserInfo' OR (k) is NOT in 'Post' Entity Set OR (k) does NOT play role 'Post' in Association Set 'FK_Post_UserCategories')) D:\cbackup\MyBlog\MyBlog\Models\DB.edmx 517 11 MyBlog
Error 2 Error 3007: Problem in Mapping Fragment(s) starting at line(s) (516, 527): Non-primary-key column(s) [EMail] being mapped in both fragments to different C-side properties - data inconsistency is possible since the corresponding C-side properties can be independently modified D:\cbackup\MyBlog\MyBlog\Models\DB.edmx 517 11 MyBlog
Error 3 Error 3012: Problem in Mapping Fragment(s) starting at line(s) (435, 489, 516, 527): Data loss is possible in FK_Post_UserCategories.UserCategories.EMail. The following C-side state is not preserved upon retrieving persisted data from the store. An Entity instance e with Key (k) such that: (((k) plays role 'Post' in Association Set 'FK_Post_UserInfo' AND (k) is NOT in 'Post' Entity Set AND (k) plays role 'Post' in Association Set 'FK_Post_UserCategories') OR ((k) does NOT play role 'Post' in Association Set 'FK_Post_UserInfo' AND (k) plays role 'Post' in Association Set 'FK_Post_UserCategories')) D:\cbackup\MyBlog\MyBlog\Models\DB.edmx 528 11 MyBlog
Error 4 Error 3012: Problem in Mapping Fragment(s) starting at line(s) (435, 489, 516, 527): Data loss is possible in FK_Post_UserCategories.UserCategories.UserCategoryId. The following C-side state is not preserved upon retrieving persisted data from the store. An Entity instance e with Key (k) such that: (((k) is in 'Post' Entity Set AND (k) plays role 'Post' in Association Set 'FK_Post_UserCategories' AND (k) does NOT play role 'Post' in Association Set 'FK_Post_UserInfo') OR ((k) is NOT in 'Post' Entity Set AND (k) plays role 'Post' in Association Set 'FK_Post_UserCategories')) D:\cbackup\MyBlog\MyBlog\Models\DB.edmx 436 15 MyBlog