What does persistence object means in Hibernate architecture?

Mmd picture Mmd · Dec 24, 2012 · Viewed 58.1k times · Source

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

I am so confused.. if we persist an object to the database, then why does Hibernate Architecture depicts the persistent object in the middle of Application and Hibernate in the picture below?

a busy cat
(source: viralpatel.net)

Answer

DarkHorse picture DarkHorse · Dec 26, 2012

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.