@Transactional(TransactionMode.DISABLED) @Test @UsingDataSet({"profile.yml", "social_connections.yml"}) public void testEntityGraphs() throws Exception { EntityGraph entityGraph = entityManager.createEntityGraph(Profile.class); entityGraph.addAttributeNodes("username"); Map<String, Object> hints = new HashMap<>(); hints.put("javax.persistence.fetchgraph", entityGraph); Profile profile = entityManager.find(Profile.class, 1000L, hints); assertEntityGraph(profile); }
@Override public EntityGraph<?> createEntityGraph(String arg0) { // TODO Auto-generated method stub return myEntityManager.createEntityGraph(arg0); }
@Override public <T> EntityGraph<T> createEntityGraph(Class<T> arg0) { // TODO Auto-generated method stub return myEntityManager.createEntityGraph(arg0); }