Merge pull request #11596 from freelansam/JAVA-8357

JAVA-8357: Split or move hibernate-jpa module
This commit is contained in:
kwoyke 2021-12-20 09:46:04 +01:00 committed by GitHub
commit dff9baa50f
9 changed files with 30 additions and 19 deletions

View File

@ -4,3 +4,4 @@
- [Hibernate Error “No Persistence Provider for EntityManager”](https://www.baeldung.com/hibernate-no-persistence-provider)
- [TransactionRequiredException Error](https://www.baeldung.com/jpa-transaction-required-exception)
- [Hibernates “Object References an Unsaved Transient Instance” Error](https://www.baeldung.com/hibernate-unsaved-transient-instance-error)
- [EntityNotFoundException in Hibernate](https://www.baeldung.com/hibernate-entitynotfoundexception)

View File

@ -29,6 +29,11 @@
<artifactId>jaxb-api</artifactId>
<version>${jaxb.version}</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
</dependency>
</dependencies>
<properties>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="com.baeldung.hibernate.entitynotfoundexception.h2_persistence_unit">
<description>EntityManager EntityNotFoundException persistence unit</description>
<class>com.baeldung.hibernate.entitynotfoundexception.Category</class>
<class>com.baeldung.hibernate.entitynotfoundexception.Item</class>
<class>com.baeldung.hibernate.entitynotfoundexception.User</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.generate_statistics" value="false"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
<property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:db3;DB_CLOSE_DELAY=-1"/>
<property name="javax.persistence.jdbc.user" value="sa"/>
<property name="javax.persistence.jdbc.password" value=""/>
</properties>
</persistence-unit>
</persistence>

View File

@ -13,5 +13,4 @@ This module contains articles specific to use of Hibernate as a JPA implementati
- [Enabling Transaction Locks in Spring Data JPA](https://www.baeldung.com/java-jpa-transaction-locks)
- [JPA/Hibernate Persistence Context](https://www.baeldung.com/jpa-hibernate-persistence-context)
- [Quick Guide to EntityManager#getReference()](https://www.baeldung.com/jpa-entity-manager-get-reference)
- [JPA Entities and the Serializable Interface](https://www.baeldung.com/jpa-entities-serializable)
- [EntityNotFoundException in Hibernate](https://www.baeldung.com/hibernate-entitynotfoundexception)
- [JPA Entities and the Serializable Interface](https://www.baeldung.com/jpa-entities-serializable)

View File

@ -120,21 +120,4 @@
</properties>
</persistence-unit>
<persistence-unit name="com.baeldung.hibernate.entitynotfoundexception.h2_persistence_unit">
<description>EntityManager EntityNotFoundException persistence unit</description>
<class>com.baeldung.hibernate.entitynotfoundexception.Category</class>
<class>com.baeldung.hibernate.entitynotfoundexception.Item</class>
<class>com.baeldung.hibernate.entitynotfoundexception.User</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.generate_statistics" value="false"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
<property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:db3;DB_CLOSE_DELAY=-1"/>
<property name="javax.persistence.jdbc.user" value="sa"/>
<property name="javax.persistence.jdbc.password" value=""/>
</properties>
</persistence-unit>
</persistence>