Root<EntityA_Coll_String> a = q.from(EntityA_Coll_String.class);
q.select(a);
Subquery<Set> sq = q.subquery(Set.class);
Root<EntityA_Coll_String> a1 = sq.from(EntityA_Coll_String.class);
Expression n = a1.get(EntityA_Coll_String_.nickNames);
n.alias("n");
sq.where(cb.like(n, "%1"));
sq.select(n);
q.where(cb.exists(sq));
q.orderBy(cb.asc(a));