Hi,
I am using the follwoing code to fetch an Entitycollection
Dim _auftraege As New EntityCollection(New MyAuftragskoepfeEntityFactory)
Dim _filter As IRelationPredicateBucket = New RelationPredicateBucket
Dim _prefetchPath As IPrefetchPath2 = _
New PrefetchPath2(CType(EntityType.AuftragskoepfeEntity, Integer))
If MitPositionen Then
If MitDokumente Then
_prefetchPath.Add(MyAuftragskoepfeEntity.PrefetchPathAuftragspositionen).SubPath.Add( _
MyAuftragspositionenEntity.PrefetchPathAuftragsPosDokumente)
End If
If MitArtikel Then
_prefetchPath.Add(MyAuftragskoepfeEntity.PrefetchPathAuftragspositionen).SubPath.Add( _
MyAuftragspositionenEntity.PrefetchPathArtikelstamm)
End If
End If
_filter.PredicateExpression.Add(PredicateFactory.CompareRange(AuftragskoepfeFieldIndex.AuftragsNr, Auftragkeys))
_auftraege = New EntityCollection(New MyAuftragsHerkunftEntityFactory)
Me.Adapter.FetchEntityCollection(_auftraege, _filter, _prefetchPath)
The query generated references a different table (The columns retrieved in the select query are from a different table than Auftragskoepfe)
I regenerated the code, checked if any files are write-protected and I still get the error.
Any help would be greatly appreciated
Best regards and a nice weekend!