* Common Hibernate Exceptions Every Developer Must Know: https://thorben-janssen.com/hibernate-exceptions/
* Common Hibernate Exceptions Every Developer Must Know: https://thorben-janssen.com/hibernate-exceptions/
* Sequence naming strategies in Hibernate 6: https://thorben-janssen.com/sequence-naming-strategies-in-hibernate-6/
* Sequence naming strategies in Hibernate 6: https://thorben-janssen.com/sequence-naming-strategies-in-hibernate-6/
+
* How to implement an ''AttributeConverter'' to support custom types: https://thorben-janssen.com/jpa-attribute-converter/
Revision as of 03:44, 27 June 2022
Hibernate's goal is to relieve the developer from 95 percent of common data persistence related programming tasks, compared to manual coding with SQL and the JDBC API.
Hibernate Core for Java generates SQL for you, relieves you from manual JDBC result set handling and object conversion, and keeps your application portable to all SQL databases.[1].
The Configuration can of Hibernate Object to Table mapping could be achieve by either of:
XML file by the default name of "hibernate.cfg.xml" or some other name (through customized configuration settings) that can be passed in by default location (root of src folder), by file path, remote URL or as a Hibernate configuration object (pre-defined/loaded)
Annotations such as @Entity and @Table that enable
Provides context to the session (pulls in configuration details to enable access to DB). Typically single SessionFactory per application (and lasts for full application lifecycle).
Session
Acts as the persistence manager (central controller) that allows you to retrieve Objects to get data from the Hibernate cache. Any Transaction starts at the Session.
Transaction
The Transaction is a single operation (such as Create=INSERT, Read=SELECT, UPDATE, DELETE) carried out within a given Session.
Entity
Entities can be associated with one Session (attached), and are implicitly attached to the Session from which they were obtained (explicitly attached when saving for the first time or after using an attach method; implicitly detached after Session closed).
[2]
OGM
Hibernate Object/Grid Mapper (OGM) provides Java Persistence (JPA) support for NoSQL solutions. It reuses Hibernate ORM’s engine but persists entities into a NoSQL datastore instead of a Relational Database. Hibernate OGM's project page boasts: "Many NoSQL stores, one standard way to access them" and support for a "wide range of backends" via store-specific dialects. Currently, there is production-grade support for