P
Size: a a a
P
AE
AE
A
@Repository
public class CustomerRepositoryImpl implements BaseRepository<Customer, Integer> {
@PersistenceContext
private EntityManager entityManager;
@Override
public Customer findWithGraph(Integer id, String graphName) {
EntityGraph entityGraph = entityManager.getEntityGraph(graphName);
Map<String, Object> properties = new HashMap<>();
properties.put("javax.persistence.fetchgraph", entityGraph);
Customer customer = entityManager.find(Customer.class, id, properties);
return customer;
}
}
AE
@Repository
public class CustomerRepositoryImpl implements BaseRepository<Customer, Integer> {
@PersistenceContext
private EntityManager entityManager;
@Override
public Customer findWithGraph(Integer id, String graphName) {
EntityGraph entityGraph = entityManager.getEntityGraph(graphName);
Map<String, Object> properties = new HashMap<>();
properties.put("javax.persistence.fetchgraph", entityGraph);
Customer customer = entityManager.find(Customer.class, id, properties);
return customer;
}
}
AE
РН
A
DC
D