Consider this many-to-many join type:
public class JoinType
{
public virtual Guid Id { get; set; }
public virtual int LeftId { get; set; }
public virtual int RightId { get; set; }
}
When performing fixup, the state manager needs to lookup instance where LeftId and RightId match. This fast when these types form the composite PK of the type. In this case Id is the PK, and hence there isn't a way to do a fast lookup for matches of LeftId and RightId.
To fix this, we should create an alternate key for what would usually be the PK in the join table. However, we should likely only do this after #4073 is implemented to avoid making it impossible to change these values, although it does seem unlikely that changing them would be useful.
Consider this many-to-many join type:
When performing fixup, the state manager needs to lookup instance where
LeftIdandRightIdmatch. This fast when these types form the composite PK of the type. In this caseIdis the PK, and hence there isn't a way to do a fast lookup for matches ofLeftIdandRightId.To fix this, we should create an alternate key for what would usually be the PK in the join table. However, we should likely only do this after #4073 is implemented to avoid making it impossible to change these values, although it does seem unlikely that changing them would be useful.