// TODO This is WRONG - see RDBMS-94. All contains() should do "EXISTS (SELECT ... FROM ...)"
// The problem is that when using UnboundVariables that are referenced in other legs of SQL
// we need to do cross joins up at the parent query, and no mechanism is readily available yet
ScalarExpression joinExpr = getBackingStoreQueryable().joinElementsTo(
expr.getQueryExpression(), qs, mapping, te,
existsTableAlias, clr.classForName(collStore.getElementType()), expr, elementTableAlias, false);
return joinExpr.eq(expr);
}
}
}