Hello
I have a big problem
I have on Entity Berufsgruppe and one Entity Meldenummer
The two Entity's have a Relataion 1 Berufsgruppe -> n Meldenummer
1 Schlosser
---1 Maier true
---2 Müller false (this Entity must be visibible false)
---3 usw true
2 Elektriker
---4 Schulz true
---5 Krause true
---6 usw true
The Entity Meldenummer have a Boolean Field named Sichtbar
How can I fetch a EntityCollection with all Berufsgruppe
and all Meldenummer with Sichtbar = true
The following code dont work
IPrefetchPath2 prefetchPath = new PrefetchPath2((int)EntityType.BerufsgruppeEntity);
prefetchPath.Add(BerufsgruppeEntity.PrefetchPathMeldenummmer);
IRelationPredicateBucket tfilter = new RelationPredicateBucket();
tfilter.Relations.Add(BerufsgruppeEntity.Relations.MeldenummmerEntityUsingBerufsgruppeNummer);
tfilter.PredicateExpression.Add(MeldenummmerFields.Sichtbar == 1);
using (DataAccessAdapter adapter = new DataAccessAdapter(cconnection.cCon))
{
EntityCollection Berufsgruppen = new EntityCollection(new BerufsgruppeEntityFactory());
adapter.FetchEntityCollection(Berufsgruppen, tfilter, prefetchPath);
return Berufsgruppen;
}
Thank's
Christof