{"id":19944705,"url":"https://github.com/rameshmf/jpa-tutorial","last_synced_at":"2025-03-01T13:41:51.865Z","repository":{"id":99533456,"uuid":"160285762","full_name":"RameshMF/JPA-Tutorial","owner":"RameshMF","description":"Guide to Java Persistence API","archived":false,"fork":false,"pushed_at":"2018-12-15T10:35:05.000Z","size":3,"stargazers_count":14,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-12T05:12:05.420Z","etag":null,"topics":["entity","hibernate","java-persistence-api","jpa-annotations","jpa-entities","jpa-specification","jpa-tutorial"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RameshMF.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-04T02:40:56.000Z","updated_at":"2024-05-02T17:15:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"db10ae42-e759-4bdc-a508-ca0b9604ea7b","html_url":"https://github.com/RameshMF/JPA-Tutorial","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RameshMF%2FJPA-Tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RameshMF%2FJPA-Tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RameshMF%2FJPA-Tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RameshMF%2FJPA-Tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RameshMF","download_url":"https://codeload.github.com/RameshMF/JPA-Tutorial/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241374518,"owners_count":19952544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["entity","hibernate","java-persistence-api","jpa-annotations","jpa-entities","jpa-specification","jpa-tutorial"],"created_at":"2024-11-13T00:22:28.390Z","updated_at":"2025-03-01T13:41:51.843Z","avatar_url":"https://github.com/RameshMF.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# JPA-Tutorial - Guide to Java Persistence API\n\n\n\u003cdiv dir=\"ltr\" style=\"text-align: left;\" trbidi=\"on\"\u003e\n\n\u003cdiv class=\"font-family-page\"\u003e\nThe Java Persistence API (JPA) is the Java standard for mapping Java objects to a relational database. Mapping Java objects to database tables and vice versa is called Object-relational mapping (ORM). The Java Persistence API (JPA) is one possible approach to ORM. Via JPA the developer can map, store, update and retrieve data from relational databases to Java objects and vice versa. JPA can be used in Java-EE and Java-SE applications.\u003cbr\u003e\n\u003cbr\u003e\nJPA is a specification and several implementations are available. Popular implementations are Hibernate, EclipseLink and Apache OpenJPA.\u003cbr\u003e\n\u003cbr\u003e\nIn this tutorial, we will learn JPA in depth with Hibernate as Implementation.\u003cbr\u003e\n\u003cul style=\"text-align: left;\"\u003e\n\u003cli\u003e\u003ca href=\"http://www.javaguides.net/2018/12/jpa-entity-class-basics.html\" target=\"_blank\"\u003eJPA Entity Class Basics\u003c/a\u003e\u0026nbsp;- Check out how to create JPA entity, what are rules to create JPA entity and what are features JPA Entity provides like cascading, lazy, relationships, inheritance etc.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cul style=\"text-align: left;\"\u003e\n\u003cli\u003e\u003ca href=\"http://www.javaguides.net/2018/12/jpa-architecture.html\" target=\"_blank\"\u003eJPA Architecture\u003c/a\u003e\u0026nbsp;-\u0026nbsp;In this article, we will discuss the architecture(core classes and interfaces of Java Persistence API) of the JPA specification.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cul style=\"text-align: left;\"\u003e\n\u003cli\u003e\u003ca href=\"http://www.javaguides.net/2018/12/jpa-obtaining-jpa-database-connection.html\" target=\"_blank\"\u003eJPA - Obtaining a JPA Database Connection\u003c/a\u003e\u0026nbsp;-\u0026nbsp;A connection to a database is represented by an EntityManager instance, which also provides functionality for performing operations on a database.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cul style=\"text-align: left;\"\u003e\n\u003cli\u003e\u003ca href=\"http://www.javaguides.net/2018/11/jpa-with-hibernate-5-bootstrapping-example.html\" target=\"_blank\"\u003eJPA 2 with Hibernate 5 Bootstrapping Example\u003c/a\u003e\u0026nbsp;-\u0026nbsp;The Java Persistence API (a.k.a. JPA) is a Java specification for managing, persisting and accessing data between objects and relational database. Hibernate is an ORM (Object Relational Mapping) tool which implements JPA specification.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cul style=\"text-align: left;\"\u003e\n\u003cli\u003e\u003ca href=\"http://www.javaguides.net/2018/11/all-jpa-annotations-mapping-annotations.html\" target=\"_blank\"\u003eAll JPA Annotations: Mapping Annotations\u003c/a\u003e\u0026nbsp;-\u0026nbsp;This article provides a quick overview of all JPA mapping annotations quick reference or summary.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cul style=\"text-align: left;\"\u003e\n\u003cli\u003e\u003ca href=\"http://www.javaguides.net/2018/11/guide-to-jpa-and-hibernate-cascade-types.html\" target=\"_blank\"\u003eGuide to JPA and Hibernate Cascade Types\u003c/a\u003e\u0026nbsp;- Learn various cascade types JPA supports with examples.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 style=\"text-align: left;\"\u003e\nDomain Model\u003c/h2\u003e\n\u003cul style=\"text-align: left;\"\u003e\n\u003cli\u003e\u003cspan style=\"background-color: white; color: #24292e; font-family: inherit; font-size: 16px;\"\u003e\u003ca href=\"http://www.javaguides.net/2018/11/guide-to-jpa-and-hibernate-cascade-types.html\" target=\"_blank\"\u003eGuide to JPA and Hibernate Cascade Types\u003c/a\u003e\u0026nbsp;- J\u003c/span\u003e\u003cspan style=\"background-color: white; color: #24292e; font-family: inherit; font-size: 16px;\"\u003ePA allows you to propagate the state transition from a parent entity to a child. This article describes all cascade types with an example.\u003c/span\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cul style=\"text-align: left;\"\u003e\n\u003cli\u003e\u003cspan style=\"background-color: white; color: #24292e; font-family: inherit; font-size: 16px;\"\u003e\u003ca href=\"http://www.javaguides.net/2018/12/hibernatejpa-primary-key-generation-stratergies.html\" target=\"_blank\"\u003eHibernate/JPA - Primary Key Generation Strategies\u003c/a\u003e\u0026nbsp;- Let's discuss\u0026nbsp;\u003c/span\u003e\u003cspan style=\"background-color: white; color: #24292e; font-family: inherit; font-size: 16px;\"\u003e4 different primary key generation strategies which generate the primary key values programmatically or use database features, like auto-incremented columns or sequences.\u003c/span\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cul style=\"text-align: left;\"\u003e\n\u003cli\u003e\u003ca href=\"http://www.javaguides.net/2018/11/hibernate-5-enum-type-mapping-example.html\"\u003eHibernate 5 - Enum Type Mapping Example\u003c/a\u003e\u0026nbsp;- In this article, we will show you how a Java enum type is persisted into a database.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cul style=\"text-align: left;\"\u003e\n\u003cli\u003e\u003ca href=\"http://www.javaguides.net/2018/11/hibernate-component-mapping-using-embeddable-embedded-annotation.html\" target=\"_blank\"\u003eHibernate Component Mapping Using @Embeddable and @Embedded Annotation\u003c/a\u003e\u0026nbsp;-\u0026nbsp;\u003cspan style=\"background-color: white; color: #24292e; font-size: 16px;\"\u003eWith Hibernate we can use the\u0026nbsp;\u003c/span\u003e\u003cspan style=\"background-color: rgba(27 , 31 , 35 , 0.05); color: #d73a49; font-family: \u0026quot;consolas\u0026quot; , \u0026quot;liberation mono\u0026quot; , \u0026quot;courier\u0026quot; , monospace; font-size: 14.4px; padding: 0.2em 0.4em;\"\u003e@Embeddable\u003c/span\u003e\u003cspan style=\"background-color: white; color: #24292e; font-size: 16px;\"\u003e\u0026nbsp;annotation to mark a class to be eligible as an embeddable class.\u003c/span\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 style=\"text-align: left;\"\u003e\n\u003cspan style=\"color: #24292e;\"\u003eJPA Operations\u003c/span\u003e\u003c/h2\u003e\n\u003cdiv\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"http://www.javaguides.net/2018/12/different-ways-to-store-jpa-entity.html\" target=\"_blank\"\u003eDifferent Ways to Store JPA Entity Objects into a Database\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"http://www.javaguides.net/2018/12/different-ways-to-retrieve-jpa-entity-objects-from-database.html\" target=\"_blank\"\u003eDifferent Ways to Retrieve JPA Entity Objects from Database\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"http://www.javaguides.net/2018/12/different-ways-to-delete-jpa-entity-objects-from-database.html\" target=\"_blank\"\u003eDifferent Ways to Delete JPA Entity Objects from Database\u003c/a\u003e\u0026nbsp;\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv style=\"text-align: left;\"\u003e\n\u003c/div\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"http://www.javaguides.net/2018/12/different-ways-to-update-jpa-entity-objects-into-database.html\" target=\"_blank\"\u003eDifferent Ways to Update JPA Entity Objects into a Database\u003c/a\u003e\u0026nbsp;\u003c/li\u003e\n\u003c/ul\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"http://www.javaguides.net/2018/12/jpa-crud-example.html\" target=\"_blank\"\u003eJPA CRUD Example\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/div\u003e\n\u003ch2 style=\"text-align: left;\"\u003e\n\u0026nbsp;JPA Core Interfaces\u003c/h2\u003e\n\u003cdiv style=\"text-align: left;\"\u003e\n\u003c/div\u003e\n\u003cul style=\"text-align: left;\"\u003e\n\u003cli\u003e\u003ca href=\"http://www.javaguides.net/2018/12/jpa-entitytransaction-interface-with-example.html\" target=\"_blank\"\u003eJPA EntityTransaction Interface with Example\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cul style=\"text-align: left;\"\u003e\n\u003cli\u003e\u003ca href=\"http://www.javaguides.net/2018/12/jpa-entitymanagerfactory-interface-with-example.html\" target=\"_blank\"\u003eJPA EntityManagerFactory Interface with Example\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cul style=\"text-align: left;\"\u003e\n\u003cli\u003e\u003ca href=\"http://www.javaguides.net/2018/12/jpa-entitytransaction-interface-with-example.html\" target=\"_blank\"\u003eJPA EntityTransaction Interface with Example\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 style=\"text-align: left;\"\u003e\nInheritance Mapping\u003c/h2\u003e\n\u003cdiv\u003e\n\u003cdiv style=\"text-align: left;\"\u003e\n\u003cul style=\"text-align: left;\"\u003e\n\u003cli\u003e\u003ca href=\"http://www.javaguides.net/2018/11/hibernate-5-inheritance-mapping.html\" target=\"_blank\"\u003eHibernate/JPA - Inheritance Mapping\u003c/a\u003e\u0026nbsp;- In this article, we will learn 4 inheritance\u003cspan style=\"background-color: white; font-family: , \u0026quot;blinkmacsystemfont\u0026quot; , \u0026quot;segoe ui\u0026quot; , \u0026quot;helvetica\u0026quot; , \u0026quot;arial\u0026quot; , sans-serif , \u0026quot;apple color emoji\u0026quot; , \u0026quot;segoe ui emoji\u0026quot; , \u0026quot;segoe ui symbol\u0026quot;; font-size: 16px;\"\u003e\u0026nbsp;strategies with examples.\u003c/span\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cul style=\"text-align: left;\"\u003e\n\u003cli\u003e\u003cspan style=\"background-color: white; font-family: , \u0026quot;blinkmacsystemfont\u0026quot; , \u0026quot;segoe ui\u0026quot; , \u0026quot;helvetica\u0026quot; , \u0026quot;arial\u0026quot; , sans-serif , \u0026quot;apple color emoji\u0026quot; , \u0026quot;segoe ui emoji\u0026quot; , \u0026quot;segoe ui symbol\u0026quot;; font-size: 16px;\"\u003e\u003ca href=\"http://www.javaguides.net/2018/11/hibernate-jpa-mappedsuperclass-inheritance-example.html\" target=\"_blank\"\u003eHibernate/JPA MappedSuperclass Inheritance Example\u003c/a\u003e\u0026nbsp;-\u0026nbsp;\u003c/span\u003e\u003cspan style=\"background-color: white; color: #24292e; font-family: , \u0026quot;blinkmacsystemfont\u0026quot; , \u0026quot;segoe ui\u0026quot; , \u0026quot;helvetica\u0026quot; , \u0026quot;arial\u0026quot; , sans-serif , \u0026quot;apple color emoji\u0026quot; , \u0026quot;segoe ui emoji\u0026quot; , \u0026quot;segoe ui symbol\u0026quot;; font-size: 16px;\"\u003eThe JPA standard specification defines the\u0026nbsp;\u003c/span\u003e\u003ca href=\"https://docs.oracle.com/javaee/7/api/javax/persistence/MappedSuperclass.html\" style=\"color: #3d85c6; font-size: 16px;\" target=\"_blank\"\u003e@MappedSuperclass\u003c/a\u003e\u003cspan style=\"background-color: white; color: #24292e; font-family: , \u0026quot;blinkmacsystemfont\u0026quot; , \u0026quot;segoe ui\u0026quot; , \u0026quot;helvetica\u0026quot; , \u0026quot;arial\u0026quot; , sans-serif , \u0026quot;apple color emoji\u0026quot; , \u0026quot;segoe ui emoji\u0026quot; , \u0026quot;segoe ui symbol\u0026quot;; font-size: 16px;\"\u003e\u0026nbsp;annotation to allow an entity to inherit properties from a base class.\u003c/span\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv style=\"text-align: left;\"\u003e\n\u003c/div\u003e\n\u003cul style=\"text-align: left;\"\u003e\n\u003cli\u003e\u003cspan style=\"background-color: white; color: #24292e; font-family: , \u0026quot;blinkmacsystemfont\u0026quot; , \u0026quot;segoe ui\u0026quot; , \u0026quot;helvetica\u0026quot; , \u0026quot;arial\u0026quot; , sans-serif , \u0026quot;apple color emoji\u0026quot; , \u0026quot;segoe ui emoji\u0026quot; , \u0026quot;segoe ui symbol\u0026quot;; font-size: 16px;\"\u003e\u003ca href=\"http://www.javaguides.net/2018/11/hibernatejpa-single-table-inheritance.html\" target=\"_blank\"\u003eHibernate/JPA Single Table Inheritance Example\u003c/a\u003e\u0026nbsp;-\u0026nbsp;\u003c/span\u003e\u003cspan style=\"background-color: white; color: #24292e; font-family: , \u0026quot;blinkmacsystemfont\u0026quot; , \u0026quot;segoe ui\u0026quot; , \u0026quot;helvetica\u0026quot; , \u0026quot;arial\u0026quot; , sans-serif , \u0026quot;apple color emoji\u0026quot; , \u0026quot;segoe ui emoji\u0026quot; , \u0026quot;segoe ui symbol\u0026quot;; font-size: 16px;\"\u003e\u0026nbsp;\u003c/span\u003e\u003cspan style=\"background-color: white; color: #24292e; font-family: , \u0026quot;blinkmacsystemfont\u0026quot; , \u0026quot;segoe ui\u0026quot; , \u0026quot;helvetica\u0026quot; , \u0026quot;arial\u0026quot; , sans-serif , \u0026quot;apple color emoji\u0026quot; , \u0026quot;segoe ui emoji\u0026quot; , \u0026quot;segoe ui symbol\u0026quot;; font-size: 16px;\"\u003eIn this article, we will discuss The single table strategy which maps all entities of the inheritance structure to the same database table.\u003c/span\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cul style=\"text-align: left;\"\u003e\n\u003cli\u003e\u003cspan style=\"background-color: white; color: #24292e; font-family: , \u0026quot;blinkmacsystemfont\u0026quot; , \u0026quot;segoe ui\u0026quot; , \u0026quot;helvetica\u0026quot; , \u0026quot;arial\u0026quot; , sans-serif , \u0026quot;apple color emoji\u0026quot; , \u0026quot;segoe ui emoji\u0026quot; , \u0026quot;segoe ui symbol\u0026quot;; font-size: 16px;\"\u003e\u003ca href=\"http://www.javaguides.net/2018/11/hibernate-jpa-joined-table-inheritance-example.html\" target=\"_blank\"\u003eHibernate JPA Joined Table Inheritance Example\u003c/a\u003e\u0026nbsp;-\u0026nbsp;\u003c/span\u003e\u003cspan style=\"background-color: white; color: #24292e; font-family: , \u0026quot;blinkmacsystemfont\u0026quot; , \u0026quot;segoe ui\u0026quot; , \u0026quot;helvetica\u0026quot; , \u0026quot;arial\u0026quot; , sans-serif , \u0026quot;apple color emoji\u0026quot; , \u0026quot;segoe ui emoji\u0026quot; , \u0026quot;segoe ui symbol\u0026quot;; font-size: 16px;\"\u003eIn this article, we will discuss The Joined table strategy or table-per-subclass mapping strategy.\u003c/span\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cul style=\"text-align: left;\"\u003e\n\u003cli\u003e\u003cspan style=\"background-color: white; color: #24292e; font-family: , \u0026quot;blinkmacsystemfont\u0026quot; , \u0026quot;segoe ui\u0026quot; , \u0026quot;helvetica\u0026quot; , \u0026quot;arial\u0026quot; , sans-serif , \u0026quot;apple color emoji\u0026quot; , \u0026quot;segoe ui emoji\u0026quot; , \u0026quot;segoe ui symbol\u0026quot;; font-size: 16px;\"\u003e\u003ca href=\"http://www.javaguides.net/2018/11/hibernatejpa-table-per-class-inheritance-example.html\" target=\"_blank\"\u003eHibernate/JPA Table Per Class Inheritance Example\u003c/a\u003e\u0026nbsp;-\u0026nbsp;\u003c/span\u003e\u003cspan style=\"background-color: white; color: #24292e; font-family: , \u0026quot;blinkmacsystemfont\u0026quot; , \u0026quot;segoe ui\u0026quot; , \u0026quot;helvetica\u0026quot; , \u0026quot;arial\u0026quot; , sans-serif , \u0026quot;apple color emoji\u0026quot; , \u0026quot;segoe ui emoji\u0026quot; , \u0026quot;segoe ui symbol\u0026quot;; font-size: 16px;\"\u003eIn this article, we’ll look into Hibernate/JPA table per class inheritance.\u003c/span\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frameshmf%2Fjpa-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frameshmf%2Fjpa-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frameshmf%2Fjpa-tutorial/lists"}