I have a problem generation te right search query. I have a customer table, linking to cunstomerContacts, who links to contact. Customer also links to customershops, linking to shops, to shopscontacts and also to Contact. So shop uses the contact entity and customer uses the same contact entity. I want to search for the contact name of the shop and the customer. I use te following code:
var search = new RelationPredicateBucket(PPW.Common.Search.FieldsContainsValues(BtnEditSearch.Text, CustomerFields.Name1, ContactFields.Firstname, ShopFields.Name1));
search.Relations.Add(CustomerEntity.Relations.CustomerContactEntityUsingCustomerId);
search.Relations.Add(ContactEntity.Relations.CustomerContactEntityUsingContactId);
search.Relations.Add(CustomerEntity.Relations.CustomerShopEntityUsingCustomerId);
search.Relations.Add(ShopEntity.Relations.CustomerShopEntityUsingShopId);
search.Relations.Add(ShopEntity.Relations.ShopContactEntityUsingShopId);
search.Relations.Add(ContactEntity.Relations.ShopContactEntityUsingContactId);
The contactentity of the customercontact entity is joined when i look to the query, but the contactentity of the shopcontactentity is not.
Many thanks in advance for the help!