List of usage examples for org.hibernate.annotations QueryHints FETCHGRAPH
String FETCHGRAPH
To view the source code for org.hibernate.annotations QueryHints FETCHGRAPH.
Click Source Link
From source file:fi.vm.sade.eperusteet.repository.custom.PerusteRepositoryImpl.java
License:EUPL
@Override public Peruste findById(Long id) { EntityGraph<Peruste> eg = em.createEntityGraph(Peruste.class); eg.addSubgraph(Peruste_.koulutukset); eg.addSubgraph(Peruste_.suoritustavat); HashMap<String, Object> props = new HashMap<>(); props.put(QueryHints.FETCHGRAPH, eg); Peruste p = em.find(Peruste.class, id, props); return p;/*w ww .j av a2 s. co m*/ }