I'm getting a multiplicity constraint violation in my entity model.
On my entity model I have two relationship properties:
- SubstanceTypeMixConstituents
- Category
SubstanceTypeMixConstituents
- Multiplicity * (Many)
Category
- Multiplicity: 1 (One)
- Foreign key, not null

How do I find what causing the problem and resolve this issue?
System.InvalidOperationException: A relationship multiplicity constraint violation occurred: An EntityReference expected at least one related object, but the query returned no related objects from the data store. at System.Data.Objects.DataClasses.EntityReference`1.Load(MergeOption mergeOption) at System.Data.Objects.DataClasses.RelatedEnd.DeferredLoad() at System.Data.Objects.Internal.LazyLoadBehavior.LoadProperty[TItem](TItem propertyValue, String relationshipName, String targetRoleName, Boolean mustBeNull, Object wrapperObject) at System.Data.Objects.Internal.LazyLoadBehavior.<>c__DisplayClass7`2.<GetInterceptorDelegate>b__2(TProxy proxy, TItem item) at System.Data.Entity.DynamicProxies.SubstanceType_BEE32ACA75386E981F7CA3F6A3C565BC1D8ADACA228C603A2EACC918DCDCBA30.get_Category()
I have a multiplicity constraint on one releationship of 1 (One) where the database has a foreign key that are not null and a second relationship of * (Many) where the database has a many to many relationship. Do you have a one-to-many or many-to-many relationship?CategoryandSubstanceTypeMixConstituentwhich have aOne-to-manyrelationship - aCategorycan have multipleSubstanceTypeMixConstituents, but aSubstanceTypeMixConstituentcan have (and must have) only oneCategory(correct me if I am wrong). The error message you get means exactly what it says - you are either trying to save aCategorywith an empty collection ofSubstanceTypeMixConstituents, or aSubstanceTypeMixConstituentwithout aCategory.SubstanceTypeMixConstituentwithoutCategoryas an answer because it will be the problem.