Hi.
I have a SPBase entity inherited by a SPTask entity. A SPAuditEntry entity has FK to SPBase. I added an additional relationship on this FK to SPTask so that SPBase can have a field called TargetTask of type SPTask.
If I go to v2.6 designer and check Relations of SPTask, I don't see the relation from SPTask to SPAuditEntry, i.e. the model has a one way relationship from SPAuditEntry to SPTask. The v3.1 designer however has this relationship as two way and I am not able to change that without also removing it as SPAuditEntry to SPTask relationship. I tried not entering a navigator name for SPAuditEntry collection of SPTask, but that did not help. It was not listed under navigators anymore though.
Any ideas? Below is the snipped generated code which is not compiling.
Thanks,
Tore.
/// <summary>Returns a new IEntityRelation object, between SPTaskEntity and SPAuditEntryEntity over the 1:n relation they have, using the relation between the fields:
/// SPTask.SPBaseId - SPAuditEntry.SPEntityId
/// </summary>
public override IEntityRelation SPAuditEntryEntityUsingSPEntityId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "AuditLog" , true);
relation.AddEntityFieldPair(SPTaskFields.SPBaseId, SPAuditEntryFields.SPEntityId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("SPTaskEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("SPAuditEntryEntity", false);
return relation;
}
}
/// <summary>Returns a new IEntityRelation object, between SPTaskEntity and SPAuditEntryEntity over the 1:n relation they have, using the relation between the fields:
/// SPTask.SPBaseId - SPAuditEntry.SPEntityId
/// </summary>
public virtual IEntityRelation SPAuditEntryEntityUsingSPEntityId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "" , true);
relation.AddEntityFieldPair(SPTaskFields.SPBaseId, SPAuditEntryFields.SPEntityId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("SPTaskEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("SPAuditEntryEntity", false);
return relation;
}
}