Skip to Main Content
 

Major Digest Home Java persistence with JPA and Hibernate: Persisting data to a database - Major Digest

Java persistence with JPA and Hibernate: Persisting data to a database

Java persistence with JPA and Hibernate: Persisting data to a database

In this second half of the Java persistence with JPA and Hibernate tutorial, we move past concepts and start writing code that persists data to and from a relational database using JPA with Hibernate. We'll start by configuring an example application to use Hibernate as the JPA provider, then quickly configure the EntityManager and write two classes that we want to persist to the database: Book and Author. Finally, we'll write a simple application that pulls together all the application components and successfully persists our two entities to the database.

To read this article in full, please click here

Source:
Published: