4

I have a Container table with ContainerId as PK (int), and a (readonly) view vwBlobRef with a BlobRefId column set as PK and ContainerId as FK. By the way, I have to manually set the BlobRefId as the Entity Key for the view...

Now I want to create an association to get Navigation properties from the table to the view (the other way around is not as important). So I add the one-to-many association and deselect the checkbox "Add Foreign Key to the vwBlobRef"

Now I get:

Error 3027: No mapping specified for the following EntitySet/AssociationSet - ContainervwBlobRef.

I have no idea how to build this mapping. I can right click on the association line and select either the table or the view. But I don't understand which one to select and what to select in the column names.

4

1 に答える 1

3

参照制約を使用してみてください。あなたの場合、FK を使用せず、マッピングを必要とする関連付けを定義しようとしています。しかし、そのような関係はデータベースに存在しないため、マップするものは何もありません。

于 2012-02-13T15:01:13.093 に答える