docs: @SuppressWarnings("unchecked")
      public static <T, K> Join<T, K> findJoinedType(Root<T> root, Class<T> rootClass, Class<K> joinClass) {
          Join<T, K> join = null;
          for (Join<T, ?> j : root.getJoins()) {
              if (j.getJavaType().equals(joinClass)) {
                  join = (Join<T, K>) j;
              }
          }
          return join;
      }