This question is generalization of my previous question:
Error in LINQ when work with PostGreSQL by Entity Framework
I have hypothesis, that, If between 2 tables exist more than 1 relation (7 for my example), EF try to normalize this table by adding additional column.
For example model a:
public partial class a
{
[Key]
public int id { get; set; }
[ForeignKey("contractors"), Column(Order = 0)]
public Nullable<int> ot_contractor_id { get; set; }
[ForeignKey("contractors1"), Column(Order = 1)]
public Nullable<int> gvo_contractor_id { get; set; }
public virtual contractors contractors { get; set; }
public virtual contractors contractors1 { get; set; }
}
Table [a] have relations to table [contractors].[id] So, EF generate column's "contractors_id" and "contractors1_id".
Other tables have only 1 relation and they work normal!
The question: Is that hypothesis correct?! And the problem of excess column comes from unnormal tables with a few relations? Thanks!