{"id":16561366,"url":"https://github.com/iandarwin/jpademo","last_synced_at":"2025-04-12T18:09:55.951Z","repository":{"id":14298147,"uuid":"17006674","full_name":"IanDarwin/jpademo","owner":"IanDarwin","description":"A ton of JPA and Hibernate tutorial demos, both APIs demo'd on the same entities","archived":false,"fork":false,"pushed_at":"2024-08-29T18:37:41.000Z","size":21119,"stargazers_count":2,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T18:09:50.688Z","etag":null,"topics":["database","hibernate","java","jpa","orm","persistence"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IanDarwin.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2014-02-20T02:18:48.000Z","updated_at":"2022-01-07T00:09:26.000Z","dependencies_parsed_at":"2023-01-11T19:45:13.330Z","dependency_job_id":"10686c5a-d41b-4065-8fce-6c80b6d5f6fc","html_url":"https://github.com/IanDarwin/jpademo","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IanDarwin%2Fjpademo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IanDarwin%2Fjpademo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IanDarwin%2Fjpademo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IanDarwin%2Fjpademo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IanDarwin","download_url":"https://codeload.github.com/IanDarwin/jpademo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248610338,"owners_count":21132921,"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":["database","hibernate","java","jpa","orm","persistence"],"created_at":"2024-10-11T20:32:46.054Z","updated_at":"2025-04-12T18:09:55.928Z","avatar_url":"https://github.com/IanDarwin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"== jpademo\n\nThis project contains the MusicRecording/VideoRecording portion of the domain model,\nand has both Hibernate and JPA versions of many of the demo\nprograms, including the famous (working) ManyToManyDemo.\n\nThe domain model is annotated using JPA annotations, and is used by *both\nsets of demos - JPA and Hibernate - without change*.\n\nThis notion-of using both JPA and the Hibernate API to access the same entities-\nis explored http://darwinsys.com/java/hibernate-jpa.html[on my Java web site].\n\nFurther, the *JPA demos can run using either Hibernate or EclipseLink\nas their JPA provider*; see the persistence.xml file for the properties \nto change.\n\nCurrently works with Eclipse (M2E plugin required!) and builds with Maven.\nTo run any of the demos in Maven, use e.g.,:\n\n\tmvn exec:java -Dexec.mainClass=jpa.JpaSimple\n\nHas in the past been run with H2, HSQLDB, MySQL and PostgresQL just by changing which set\nof DB parameters is not commented out in persistence.xml.\n\nShould work with any Java from this decade or part of the last;\nwas recently tested with Java 8 just before upgrading it to Java 17.\nIf you're stuck on a pre-legacy version of Java, you should upgrade to Java 17 or at least 11.\nIf you absolutely can't, you might\ncheckout revision 9084d9e1aa1ac1c261a5bf2dc8cdc8cd180b8162 and stay there\nuntil you get a current Java SE / JDK implementation.\nBut be aware that branch is *not maintained* and will not even receive security updates,\nso _use at own risk!!_\n\n=== Quick Rainforest Demo\n\n* Clone the repo\n* Open in an IDE\n* Overview the domain.media package\n* Show code in classes Recording, MusicRecording, VideoRecording and Actor.\n* run jpa.Basic, jpa.ManyToMany, jpa.RainListerJpa, etc.\n* For \"record\", show code in Person.java and in PersonRecord.java, run jpa.PersonRecordDemo.\n\n=== Database Setup\n\nH2 runs in-memory, in-VM, so no setup is needed.\n\nFor PostgreSQL, you can use the handy _psql_ command-line client for any pre-setup.\nOnce you have your authorization set up as per the Postgres documentation,\nit can be as simple as\n\n[source]\n----\nian=# create user student login password 'student';\nCREATE ROLE\nian=# create database jpademo owner student;\nCREATE DATABASE\nian=# \n----\n\nThis is explored a bit more fully in the file PostgreSQL.adoc / PostgreSQL.html.\n\nFor MySQL, there is a command line client but it is very well hidden\n(e.g., on Mac OS, it installs in /usr/local/mysql-5.6.21-osx10.8-x86_64/bin/mysql).\nInstead, we offer a guided click-through; see the MySQL.adoc / MySQL.html\nfile which has many screenshots with instructions.\n\nDO NOT USE student/student as credentials on any machine that is accessible from the Internet!!\n\n== TODO\n\nThere should be a SEQUENCE demo someplace.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiandarwin%2Fjpademo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiandarwin%2Fjpademo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiandarwin%2Fjpademo/lists"}