title: Multiplicity constraint violated Entity framework 5
body: <p>Hello i have 3 classes Person, UserProfile(it inherits Person) and Results, a Person can have one or more results, when i try to add i a result to a person a i get the error mentioned in the title, my classes are bellow. Any help would be appreciated.</p>
  
  <pre><code>[Table("People")]
  public class Person : IPerson
  {
  
      [Key]
      [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
      public int Id { get; set; }
      public string FirstName { get; set; }
  
      public string LastName { get; set; }
  
      public string Name
      {
          get
          {
              return FirstName + " " + LastName;
          }
          set{}
      }
  
      public string Email { get; set; }
      public DateTime? LastModified { get; set; }
      public virtual ICollection&lt;Result&gt; Results { get; set; }
  }
  </code></pre>
  
  <p>The UserProfile class</p>
  
  <pre><code>[Table("UserProfile")]
  
  public class UserProfile : Person
  {
      public UserProfile()
      {
          Faculty = new Faculty();
          Projects = new Collection&lt;Project&gt;();
      }
      public string UserName { get; set; }
      public string CNP { get; set; }
      public virtual Faculty Faculty { get; set; }
      public virtual ICollection&lt;Project&gt; Projects { get; set; }
  }
  </code></pre>
  
  <p>The result class</p>
  
  <pre><code>public abstract class Result:INamedEntity
  {
      protected Result()
      {
          ResultType = new ResultType();
      }
      public int Id { get; set; }
      public string Name{get;set;}
      public virtual ResultType ResultType { get; set; }
      public DateTime? LastModified { get; set; }
  }
  </code></pre>
  
  <p>The problem function</p>
  
  <pre><code>public void AddResultForUser(int userId, Result result)
  {
      _ctx.Users.Single(u =&gt; u.Id == userId).Results.Add(result);
  }
  </code></pre>
  
  <p>Whenever after calling this function i call <code>_ctx.SaveChanges()</code></p>
  
  <p>I get the fallowing error</p>
  
  <pre><code>Multiplicity constraint violated. The role 'Person_Results_Source' of the relationship 'Repository.Person_Results' has multiplicity 1 or 0..1.
  </code></pre>
  
  <p>Thank you.</p>