code: public String findTextByQueryReplyAndQueryField(QueryReply queryReply, QueryField queryField) {
      EntityManager entityManager = getEntityManager();
  
      CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
      CriteriaQuery<String> criteria = criteriaBuilder.createQuery(String.class);
      Root<QueryQuestionOptionAnswer> root = criteria.from(QueryQuestionOptionAnswer.class);
      Join<QueryQuestionOptionAnswer, QueryOptionFieldOption> option = root.join(QueryQuestionOptionAnswer_.option);
      
      criteria.select(option.get(QueryOptionFieldOption_.text));
      
      criteria.where(
        criteriaBuilder.and(
          criteriaBuilder.equal(root.get(QueryQuestionOptionAnswer_.queryField), queryField),
          criteriaBuilder.equal(root.get(QueryQuestionOptionAnswer_.queryReply), queryReply)
        )
      );
      
      return getSingleResult(entityManager.createQuery(criteria));
    }
docs: Finds answer text by query reply and query field
  
  @param queryReply reply
  @param queryField field
  @return answer text