I’m a little confused on the difference between Hibernate session(or JPA entity manager) to database connection.
Does is mean when I call sessionfactory.openSession a database connection is opened and held open till the session is closed?
I read in this book Java Persistence with Hibernate that Hibernate is lazy and db connection is not retrieved until SQL execution is needed .
can someone clarify me the differences?
Than you in advance