DB update randomly throwing Validation Error MVC 4 EF
<p>So I have a controller which updates just 2 fields in a db entry, however that entry is linked to two other tables, I know it's a bad explanation but sometimes it works and sometimes it doesn't and I cant identify what's different between submissions since no code changes.  </p>

<p><strong>Error</strong> 
<a href="https://i.stack.imgur.com/JawBz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JawBz.png" alt="enter image description here"></a></p>

<p><strong>Controller</strong>  </p>

<pre><code>GroupFitnessSession session = unitOfWork.GroupFitnessSessionRepository.GetById(item.GroupFitnessSessionId);
session.IsConfirmed = true;
session.Attendees = item.Attendees;
unitOfWork.GroupFitnessSessionRepository.Update(session);
</code></pre>

<p>There are other fields to the Models that i've left out, but non of them are the same name or something to these oens</p>

<p><strong>Models</strong></p>

<pre><code>public class GroupFitnessSession
{
    public string GroupFitnessSessionId { get; set; }
    [Required] 
    public virtual Trainer Trainer { get; set; }
    [Required] 
    public virtual Location Location { get; set; }
}


public class Location
{
    public string LocationId { get; set; }
    public Location()
    {
        GroupFitnessSession = new HashSet&lt;GroupFitnessSession&gt;();
    }
    public ICollection&lt;GroupFitnessSession&gt; GroupFitnessSession { get; set; }
}
public class Trainer
{
    public Trainer()
    {
        GroupFitness = new HashSet&lt;GroupFitnessSession&gt;();        
    }
    public ICollection&lt;GroupFitnessSession&gt; GroupFitness { get; set; }
</code></pre>

<p>If you need any other information feel free to ask.<br>
This is just confusing me too much, any advice would be appceiated</p>

<p>EDIT: showing that Location and Trainer are not empty objects
<a href="https://i.stack.imgur.com/I1LTV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/I1LTV.png" alt="enter image description here"></a></p>

<p>As you can see the auto generated Properties from EF aswell as the propertiy I am trying to update</p>

<p><a href="https://i.stack.imgur.com/81WDA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/81WDA.png" alt="enter image description here"></a></p>