The LLBLGen version I am running is 2.5 Final December 5th. DLL version 2.5.07.1214.
I am getting an exception when using a precreated relationship from the generated code. The relationship looks fine so i don't know why the exception is being thrown. The code is below.
The GetRelationInfoContactCollectionViaSupportGroupMember is generated by the designer and I have not made any changes to the generated classes.
using (IDataAccessAdapter adapter = BLServices.Adapters.InfrastructureCentral)
{
adapter.FetchEntityCollection(this._supportGroupMembers, this._supportGroup.GetRelationInfoContactCollectionViaSupportGroupMember());
}
public virtual IRelationPredicateBucket GetRelationInfoContactCollectionViaSupportGroupMember()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.Relations.Add(SupportGroupEntity.Relations.SupportGroupMemberEntityUsingSupportGroupGuid, "__SupportGroupEntity__", "SupportGroupMember_", JoinHint.None);
bucket.Relations.Add(SupportGroupMemberEntity.Relations.ContactEntityUsingMemberContactGuid, "SupportGroupMember_", string.Empty, JoinHint.None);
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(SupportGroupFields.ContactGuid, null, ComparisonOperator.Equal, this.ContactGuid));
return bucket;
}
public virtual IEntityRelation SupportGroupMemberEntityUsingSupportGroupGuid
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "SupportGroupMember" , true);
relation.AddEntityFieldPair(SupportGroupFields.ContactGuid, SupportGroupMemberFields.SupportGroupGuid);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("SupportGroupEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("SupportGroupMemberEntity", false);
return relation;
}
}
public virtual IEntityRelation ContactEntityUsingMemberContactGuid
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "Contact", false);
relation.AddEntityFieldPair(ContactFields.ContactGuid, SupportGroupMemberFields.MemberContactGuid);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ContactEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("SupportGroupMemberEntity", true);
return relation;
}
}
Any clues. Thanks for your help