How to convert this Hibernate Criteria query to instead use javax.jpa.CriteriaQuery Multiple Root Entities

Since the hibernate.criteria API is deprecated, I need assistance converting certain methods to JPA criteriaQuery.

The simpler calls with singular criteria and limited parameters I can handle, but how can I convert from a hibernate criteria created with multiple root entities. Here is the org.hibernate.criteria code that needs conversion

Criteria crit = 
crit.add(Restrictions.ilike("upperName", modelName));

List<Device> matches = crit.list();

The conversion for something like this with a singular call to createCriteria I can manage. They look something like this

CriteriaBuilder cb = entityManager.getCriteriaBuilder();
CriteriaQuery<Workflow> cq = cb.createQuery(getType());
Root<getType()> model = cq.from(getType());;
cq.where(cb.equal(model.get("primaryEntityId"), entityId));
TypedQuery<getType()> q = entityManager.createQuery(cq);
List<Workflow> matches = q.getResultList();

The only thing I can’t seem to recreate in JPA is the two association paths passed in to createCriteria