How does SessionFactory work inside Hibernate?

I made 4 files:

1.UserDetail.java
2.UserDTO1.java
3.hibernate.cfg.xml
4.UserDTO1.hbm.xml

In UserDetail.java, I created an object of the SessionFactory class, implemented:

Session Factory factory=new Configuration().configure().buildSessionFactory();

Now the control goes into sleep mode (but I wanted to know if the connection will be established first or if the mapping resource will be created = " UserDTO1.hbm.xml ")

Then in UserDTO1.hbm.xml , how the control will work with the DTO file. And when,

<property name="hbm2ddl.auto">create</property>          

in the configuration file will be executed.

I want to know the thread of execution , how it all happens.

+4
source share
1

cnf.xml , hbm.xml.

+3

Source: https://habr.com/ru/post/1692132/


All Articles