I have the following (simplified) class structure:
public class Foo
{
public ObservableCollection<Bar> Bars { get; set; }
}
public class Bar
{
public Baz MyBaz { get; set; }
}
public class Baz
{
public ObservableCollection<Quux> Quuces { get; set; }
}
Using the Entity Framework Code First, I initialize an instance of Foo with new (POCO) children.
If each set is Quucesempty, SaveChanges () works fine. However, if any collection Quucescontains Quux, I get:
Violation of plurality. The role "Baz_Quuces_Source", the relation "My.Model.Baz_Quuces", has a multiplicity of 1 or 0..1.
I did not explicitly set any relationships in my model.
What does it mean?
source
share