title: Looping gets "EntityReference can have no more than one related object" error
body: <p>I am receiving this error: "A relationship multiplicity constraint violation occurred: An EntityReference can have no more than one related object, but the query returned more than one related object. This is a non-recoverable error."</p>
  
  <p>It happens during a loop through a set of objects, in this case when it gets to the second one in the loop. The error seems to indicate that one of the reference properties of the object in the list I am looping through is throwing this error. I know that the data is correct on the database side, so I'm not sure what Entity Framework is seeing here that it doesn't like. </p>
  
  <p>This is the fluent configuration in question:</p>
  
  <pre><code>modelBuilder.Entity&lt;TemplateSubscriber&gt;()
              .HasRequired(r =&gt; r.Role)
              .WithOptional()
              .Map(m =&gt; m.MapKey("RoleID"))
              .WillCascadeOnDelete(false);
  </code></pre>
  
  <p>This particular configuration allowed me to get the correct SQL generated in my DbMigration, and I am happy with the database, however something must be wrong with how EF sees this relationship, because it throws this error when it tries to load up a second "TemplateSubscriber" in a loop, and that error is seen specifically on trying to load the "Role" reference property.</p>
  
  <p>The relationship is a one to many, with the relationship accessible only from the one side. I have no need to access a list of the templateSubscribers from within the role. So what I wanted was a foreign key relationship so that the templateSubscriber must reference an actual role.</p>
  
  <p>What could be the issue here? And how can I see what the SQL statement is that is erroring out, I would probably be able to diagnose if I could see the SQL.</p>