我想知道是否有可能映射米:在EF4型号N在数据库关系的两倍。映射一个M:N关系两次
考虑这个数据库模型:
http://andarki.dk/stackoverflow/db.png
这是一个标准的M:N关系的公司和用户之间。 如果字段works_at.is_locked_out在模型生成过程中会忽略它产生一个很好的*为* EF的关系:
http://andarki.dk/stackoverflow/pretty.png
如果我能works_at.is_locked_out它看起来更像原来的DB模式:
http://andarki.dk/stackoverflow/detailed.png
是否可以同时兼得的关系? 对于某些查询works_at.is_locked_out是没有必要的,具有直接的联系使得它更容易在这些情况下查询。 当我添加这两种关系我得到的错误
Problem in mapping fragments starting at lines 23, 30:Two entities with possibly different keys are mapped to the same row. Ensure these two mapping fragments map both ends of the AssociationSet to the corresponding columns.
TestModel.edml
以任何方式这是可能的,或者是它的我试图让我的蛋糕,吃它太的情况下?