私は2つのテーブルを持っていReportsますVisualizations. Reportsには、外部キーを介して同じ名前の のフィールドVisualizationIDを指すフィールド があります。Visualizationまた、フィールドで宣言された一意のキーもあります。VisualizationIDnull可能ではありません。つまり、関係は 0..1 対 1 でなければなりません。これは、すべて Reportsのレコードに null ではない一意のVisualizationsレコードが関連付けられている必要があるためです。
Entity Framework は、このように認識しません。次のエラーが表示されます。
Error 113: Multiplicity is not valid in Role 'Report' in relationship 'FK_Reports_Visualizations'. Because the Dependent Role properties are not the key properties, the upper bound of the multiplicity of the Dependent Role must be *.
ここで何が問題なのですか?適切な関係の多重度を EF に認識させるにはどうすればよいですか?