zoukankan      html  css  js  c++  java
  • 调查一下,EF的Bug?

    数据库中有3表Person、Student、Worker。代码如下:

    Code

    现在在VS里建个ADO.NET Entity Data Model,就叫默认的Model1.edmx好了,操作如下:

    1、建立Model1.edmx时,在数据库中只选择Person表,完成Model1.edmx

    2、编译,通过

    3、现在从数据库中更新,把Student和Worker都添加进来,这是会看到设计器自动把实体和关系都一并生成出来,还算蛮聪明的

    4、编译,还是通过

    5、Bug开始来了,把Student和Worker实体删除

    6、编译,出错,我在中文版和英文版都试过(打正式sp1的,team system),错误如下:

    Error    1    Error 3013: Problem in Mapping Fragment starting at line 144: Missing table mapping: Foreign key constraint 'FK_Student_Person' from table Student (PersonID_FK) to table Person (PersonID): no mapping specified for the table Student.
    Error    2    Error 3013: Problem in Mapping Fragment starting at line 144: Missing table mapping: Foreign key constraint 'FK_Worker_Person' from table Worker (PersonID_FK) to table Person (PersonID): no mapping specified for the table Worker.

    按照微软讲师王然在webcast的说法,EF有时没有自动把后台代码删除完整,当时那webcast演示也是出错所以终止的。但他说是因为他的是beta版的原因。但我这几天测试了N次,发现在sp1正式版也出现这情况……郁闷

    大家也出现过这现象吗?

  • 相关阅读:
    Coursera机器学习week11 单元测试
    关于 TypeReference 的解释
    getModifiers 方法解释。
    instanceof isInstance isAssignableFrom 比较
    elasticsearch 基础 语法总结
    kibana 启动 关闭 和进程查找
    MD5 SHA1 SHA256 SHA512 SHA1WithRSA 的区别
    spring boot 项目 热启动
    java zip 压缩文件
    Packet for query is too large (1660 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.
  • 原文地址:https://www.cnblogs.com/Dreaming/p/1280024.html
Copyright © 2011-2022 走看看