Here is a variant of jaiwo99's answer in a more JPAesque form
BooleanExpression exp = invoice.supplier.number.in(new JPASubQuery()
.from(company)
.where(company.active.isTrue())
.list(company.number));
Feel free to merge this into the original answer.