D
D
Denis Kuznetsov2019-07-02 15:11:56
Hibernate
Denis Kuznetsov, 2019-07-02 15:11:56

How to get string by multiple parameters in Hibernate?

Hello, to get by id there is such an opportunity:
User user = (User) session.load(User.class, id);
what if I want to get an object by two lines (or maybe not get it if the object is valid with your name and surname is not in the database)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2019-07-02
@DennisKingsman

Learn JPQL or Criteria API .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question