Skip to content

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

java/jpa/conf/META-INF/persistence.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
<persistence-unit name="defaultPersistenceUnit" transaction-type="RESOURCE_LOCAL">
77
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
88
<non-jta-data-source>DefaultDS</non-jta-data-source>
9+
<validation-mode>NONE</validation-mode>
10+
<!--
11+
Hibernate ORM 7 no longer performs the old automatic entity discovery by default.
12+
Listing entities explicitly keeps this sample self-contained.
13+
As an alternative, add org.hibernate.orm:hibernate-scan-jandex to your project dependencies
14+
and use Jandex-based scanning.
15+
-->
16+
<class>models.Person</class>
917
<jar-file>build/classes/scala/main</jar-file>
1018
<properties>
1119
<property name="hibernate.hbm2ddl.auto" value="update"/>

java/rest-api/conf/META-INF/persistence.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
<persistence-unit name="defaultPersistenceUnit" transaction-type="RESOURCE_LOCAL">
77
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
88
<non-jta-data-source>DefaultDS</non-jta-data-source>
9+
<validation-mode>NONE</validation-mode>
10+
<!--
11+
Hibernate ORM 7 no longer performs the old automatic entity discovery by default.
12+
Listing entities explicitly keeps this sample self-contained.
13+
As an alternative, add org.hibernate.orm:hibernate-scan-jandex to your project dependencies
14+
and use Jandex-based scanning.
15+
-->
16+
<class>v1.post.PostData</class>
917
<!--
1018
Gradle workaround to use Play with JPA
1119
https://www.playframework.com/documentation/latest/JavaJPA#Deploying-Play-with-JPA

0 commit comments

Comments
 (0)