title: Multiplicity constraint violation debug
body: <p>I'm getting a multiplicity constraint violation in my entity model. </p>
  
  <p>On my entity model I have two relationship properties:</p>
  
  <ol>
  <li>SubstanceTypeMixConstituents</li>
  <li>Category</li>
  </ol>
  
  <p>SubstanceTypeMixConstituents<br>
   - Multiplicity * (Many)<br>
  Category<br>
   - Multiplicity: 1 (One)<br>
   - Foreign key, not null  </p>
  
  <p><img src="https://i.stack.imgur.com/uEemr.png" alt="enter image description here"></p>
  
  <p>How do I find what causing the problem and resolve this issue?</p>
  
  <pre><code>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.&lt;&gt;c__DisplayClass7`2.&lt;GetInterceptorDelegate&gt;b__2(TProxy proxy, TItem item)
     at System.Data.Entity.DynamicProxies.SubstanceType_BEE32ACA75386E981F7CA3F6A3C565BC1D8ADACA228C603A2EACC918DCDCBA30.get_Category()
  </code></pre>