If I set the object aliases for a IEntityRelation object and then add it to a IRelationPredicateBucket relations collection the aliases are cleared.
Is it by design or is there a problem?
The code shown here is to show the behaviour and is used differently in the actual application in seperate functions.
Dim bucket As IRelationPredicateBucket = New RelationPredicateBucket(filter)
Dim relation As IEntityRelation = ParentEntity.Relations.ChildEntityUsingParentId
'Relation properties, aliases
relation.SetAliases("p", "c")
relation.HintForJoins = JoinHint.None
'At the point the AliasPKSide = "p" and AliasFKSide = "c" on the relation variable
bucket.Relations.Add(relation)
'At the point the AliasPKSide = "" and AliasFKSide = "" on the relation variable
To get around this I have come up with the following
Dim aliasStart As String = relation.AliasPKSide
Dim aliasEnd As String = relation.AliasFKSide
bucket.Relations.Add(relation).SetAliases(aliasStart, aliasEnd)
I am using Version 2 of LLBLGen Pro.