hi, Walaa
I think - not - because the result of query should be only record for which all child entities are passed some predicate (like 'd%').
Seems to be - I have done the query by following way:
string alias = "alias";
FieldLikePredicate originalPredicate = new FieldLikePredicate(AddressFields.Title, null, alias, "d%");
EntityField2 field = AddressFields.UserId;
field.ObjectAlias = alias;
FieldCompareSetPredicate predicate = new FieldCompareSetPredicate(
null, null,
field, null,
SetOperator.Exist,
(field == UserFields.Id) & !originalPredicate,
alias,
true
);
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(predicate);
EntityCollection<UserEntity> coll = new EntityCollection<UserEntity>(new UserEntityFactory());
using(DataAccessAdapterBase adapter = new DataAccessAdapter())
{
adapter.FetchEntityCollection(coll, bucket);
}