I have two tables, Users, and Address. A the user table has a field that maps to the primary key of the address table. This field can be null.
In plain english, Address exist independent of other objects. A user may be associated with one address. In the database, I have this set up as a foreign key relationship.
I am attempting to map this relationship in the Entity Framework. I am getting errors on the following code:
<Association Name="fk_UserAddress">
<End Role="User" Type="GenesisEntityModel.Store.User" Multiplicity="1"/>
<End Role="Address" Type="GenesisEntityModel.Store.Address" Multiplicity="0..1" />
<ReferentialConstraint>
<Principal Role="Address">
<PropertyRef Name="addressId"/>
</Principal>
<Dependent Role="User">
<PropertyRef Name="addressId"/>
</Dependent>
</ReferentialConstraint>
</Association>
It is giving a "The Lower Bound of the multiplicity must be 0" error.
I would appreciate it if anyone could explain the error, and the best way to solve it.
Thanks for any help.