What is the fastest findByName query with hibernate?
- by Karussell
I am sure I can improve the performance of the following findByName query of hibernate:
public List<User> findByName(String name) {
session.createCriteria(User.class).add(Restrictions.eq("name", name)).list();
}
In which way should I improve it or even more important: in which ways should I improve it first? I will need the full object with all the collections (layz or not) and deps of this class.