What does persistence object means in Hibernate architecture?

后端 未结 6 1905
我寻月下人不归
我寻月下人不归 2021-01-30 06:55

Hibernate is a persistence framework which is used to persist data from Java environment to database.

I am so confused.. if we persist a

6条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-30 07:29

    I will make it more clearer. Persistent objects are instances of POJO classes that you create that represent rows in the table in the database. According to hibernate-doc an instance of POJO class representing table in database goes through 3 states of which persistent is one of them.

    When a POJO instance is in session scope, it is said to be persistent i.e hibernate detects any changes made to that object and synchronizes it with database when we close or flush the session.

    And about hibernate.properties and XML Mapping @Ken Chan is right. Go through hibernate-doc for more illustrations on objects in hibernate.

提交回复
热议问题