Hibernate named parameters

String query = “select max(r.version) from Relationship r where r.target=:id and r.type=:type”; TypedQuery<Integer> typedQuery = em.createQuery(query, Integer.class); typedQuery.setParameter(“id”, target); typedQuery.setParameter(“type”, type); Integer result = typedQuery.getSingleResult();…