You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by ja...@apache.org on 2026/06/17 21:11:08 UTC

(grails-core) branch 8.0.x-hibernate7 updated: Sync Hibernate 7 app clones with the 8.0.x base merge

This is an automated email from the ASF dual-hosted git repository.

jamesfredley pushed a commit to branch 8.0.x-hibernate7
in repository https://gitbox.apache.org/repos/asf/grails-core.git


The following commit(s) were added to refs/heads/8.0.x-hibernate7 by this push:
     new 45120c829d Sync Hibernate 7 app clones with the 8.0.x base merge
45120c829d is described below

commit 45120c829de5c0bc34fa91704c7b71dfec1d12e6
Author: James Fredley <ja...@users.noreply.github.com>
AuthorDate: Wed Jun 17 17:10:44 2026 -0400

    Sync Hibernate 7 app clones with the 8.0.x base merge
    
    The base merge of 8.0.x made SiteMesh 3 the default layout and GORM
    properties nullable by default; those changes adjusted the Hibernate 5
    example apps (SiteMesh toggle in build.gradle, grails.gorm.default.nullable
    opt-out, explicit domain constraints). Mirror the same adjustments into the
    Hibernate 7 clones so each stays identical to its H5 counterpart apart from
    the grails-hibernate7-bom / grails-data-hibernate7 swap and behaves
    consistently on Hibernate 7.
    
    Assisted-by: claude-code:claude-4.8-opus
---
 grails-test-examples/hibernate7/app1/build.gradle                  | 7 +++----
 .../hibernate7/app1/grails-app/conf/application.yml                | 6 ++++++
 .../hibernate7/app1/grails-app/domain/functionaltests/Book.groovy  | 1 +
 .../hibernate7/async-events-pubsub-demo/build.gradle               | 7 +++----
 grails-test-examples/hibernate7/database-cleanup/build.gradle      | 1 -
 grails-test-examples/hibernate7/demo33/build.gradle                | 7 +++----
 .../hibernate7/demo33/grails-app/domain/demo/Car.groovy            | 1 +
 grails-test-examples/hibernate7/gorm/build.gradle                  | 7 +++----
 .../hibernate7/gorm/grails-app/conf/application.yml                | 3 +++
 .../hibernate7/issue-698-domain-save-npe/build.gradle              | 7 +++----
 .../issue-698-domain-save-npe/grails-app/conf/application.yml      | 6 ++++++
 grails-test-examples/hibernate7/scaffolding-fields/build.gradle    | 1 -
 .../hibernate7/scaffolding-fields/grails-app/conf/application.yml  | 6 ++++++
 13 files changed, 38 insertions(+), 22 deletions(-)

diff --git a/grails-test-examples/hibernate7/app1/build.gradle b/grails-test-examples/hibernate7/app1/build.gradle
index 38a7f09fb0..434a957d41 100644
--- a/grails-test-examples/hibernate7/app1/build.gradle
+++ b/grails-test-examples/hibernate7/app1/build.gradle
@@ -39,11 +39,10 @@ dependencies {
 
     implementation 'org.apache.grails:grails-dependencies-starter-web'
     implementation 'com.h2database:h2'
-    if(System.getenv('SITEMESH3_TESTING_ENABLED') == 'true') {
-        implementation 'org.apache.grails:grails-sitemesh3'
-    }
-    else {
+    if (System.getenv('SITEMESH2_TESTING_ENABLED') == 'true') {
         implementation 'org.apache.grails:grails-layout'
+    } else {
+        implementation 'org.apache.grails:grails-sitemesh3'
     }
 
     implementation 'org.apache.grails:grails-data-hibernate7'
diff --git a/grails-test-examples/hibernate7/app1/grails-app/conf/application.yml b/grails-test-examples/hibernate7/app1/grails-app/conf/application.yml
index 926a9dcafa..f2e2ff519c 100644
--- a/grails-test-examples/hibernate7/app1/grails-app/conf/application.yml
+++ b/grails-test-examples/hibernate7/app1/grails-app/conf/application.yml
@@ -118,3 +118,9 @@ environments:
                testOnReturn: false
                jdbcInterceptors: ConnectionState
                defaultTransactionIsolation: 2
+
+---
+grails:
+    gorm:
+        default:
+            nullable: false
diff --git a/grails-test-examples/hibernate7/app1/grails-app/domain/functionaltests/Book.groovy b/grails-test-examples/hibernate7/app1/grails-app/domain/functionaltests/Book.groovy
index 3640c51035..a12359d124 100644
--- a/grails-test-examples/hibernate7/app1/grails-app/domain/functionaltests/Book.groovy
+++ b/grails-test-examples/hibernate7/app1/grails-app/domain/functionaltests/Book.groovy
@@ -26,5 +26,6 @@ class Book {
     Date dateCreated
 
     static constraints = {
+        title nullable: false
     }
 }
diff --git a/grails-test-examples/hibernate7/async-events-pubsub-demo/build.gradle b/grails-test-examples/hibernate7/async-events-pubsub-demo/build.gradle
index 7eddcd560a..5159dbcf8f 100644
--- a/grails-test-examples/hibernate7/async-events-pubsub-demo/build.gradle
+++ b/grails-test-examples/hibernate7/async-events-pubsub-demo/build.gradle
@@ -47,11 +47,10 @@ dependencies {
     implementation 'org.apache.grails:grails-services'
     implementation 'org.apache.grails:grails-url-mappings'
     implementation 'org.apache.grails:grails-web-boot'
-    if(System.getenv('SITEMESH3_TESTING_ENABLED') == 'true') {
-        implementation 'org.apache.grails:grails-sitemesh3'
-    }
-    else {
+    if (System.getenv('SITEMESH2_TESTING_ENABLED') == 'true') {
         implementation 'org.apache.grails:grails-layout'
+    } else {
+        implementation 'org.apache.grails:grails-sitemesh3'
     }
 
     implementation 'org.apache.grails:grails-views-gson'
diff --git a/grails-test-examples/hibernate7/database-cleanup/build.gradle b/grails-test-examples/hibernate7/database-cleanup/build.gradle
index 552d14cdd2..50a2a0e234 100644
--- a/grails-test-examples/hibernate7/database-cleanup/build.gradle
+++ b/grails-test-examples/hibernate7/database-cleanup/build.gradle
@@ -34,7 +34,6 @@ dependencies {
 
     implementation 'org.apache.grails:grails-dependencies-starter-web'
     implementation 'com.h2database:h2'
-    implementation 'org.apache.grails:grails-layout'
     implementation 'org.apache.grails:grails-data-hibernate7'
     runtimeOnly 'org.hibernate:hibernate-ehcache', {
         exclude group: 'org.hibernate', module: 'hibernate-core'
diff --git a/grails-test-examples/hibernate7/demo33/build.gradle b/grails-test-examples/hibernate7/demo33/build.gradle
index 233d86481b..8dcd9bcb1d 100644
--- a/grails-test-examples/hibernate7/demo33/build.gradle
+++ b/grails-test-examples/hibernate7/demo33/build.gradle
@@ -45,11 +45,10 @@ dependencies {
     implementation 'org.apache.grails:grails-interceptors'
     implementation 'org.apache.grails:grails-web-boot'
     implementation 'org.apache.grails:grails-gsp'
-    if(System.getenv('SITEMESH3_TESTING_ENABLED') == 'true') {
-        implementation 'org.apache.grails:grails-sitemesh3'
-    }
-    else {
+    if (System.getenv('SITEMESH2_TESTING_ENABLED') == 'true') {
         implementation 'org.apache.grails:grails-layout'
+    } else {
+        implementation 'org.apache.grails:grails-sitemesh3'
     }
     implementation 'org.apache.grails:grails-data-hibernate7'
     implementation 'org.apache.grails:grails-views-gson'
diff --git a/grails-test-examples/hibernate7/demo33/grails-app/domain/demo/Car.groovy b/grails-test-examples/hibernate7/demo33/grails-app/domain/demo/Car.groovy
index 07cc4b08b6..df023a8028 100644
--- a/grails-test-examples/hibernate7/demo33/grails-app/domain/demo/Car.groovy
+++ b/grails-test-examples/hibernate7/demo33/grails-app/domain/demo/Car.groovy
@@ -24,6 +24,7 @@ class Car {
     String color
 
     static constraints = {
+        color nullable: false
     }
 
     static mapping = {
diff --git a/grails-test-examples/hibernate7/gorm/build.gradle b/grails-test-examples/hibernate7/gorm/build.gradle
index 342b32d533..48d105a94b 100644
--- a/grails-test-examples/hibernate7/gorm/build.gradle
+++ b/grails-test-examples/hibernate7/gorm/build.gradle
@@ -34,11 +34,10 @@ dependencies {
 
     implementation 'org.apache.grails:grails-dependencies-starter-web'
     implementation 'com.h2database:h2'
-    if(System.getenv('SITEMESH3_TESTING_ENABLED') == 'true') {
-        implementation 'org.apache.grails:grails-sitemesh3'
-    }
-    else {
+    if (System.getenv('SITEMESH2_TESTING_ENABLED') == 'true') {
         implementation 'org.apache.grails:grails-layout'
+    } else {
+        implementation 'org.apache.grails:grails-sitemesh3'
     }
 
     implementation 'org.apache.grails:grails-data-hibernate7'
diff --git a/grails-test-examples/hibernate7/gorm/grails-app/conf/application.yml b/grails-test-examples/hibernate7/gorm/grails-app/conf/application.yml
index e7afc511af..697aed37b0 100644
--- a/grails-test-examples/hibernate7/gorm/grails-app/conf/application.yml
+++ b/grails-test-examples/hibernate7/gorm/grails-app/conf/application.yml
@@ -18,6 +18,9 @@ grails:
     profile: web
     codegen:
         defaultPackage: gorm
+    gorm:
+        default:
+            nullable: false
 info:
     app:
         name: '@info.app.name@'
diff --git a/grails-test-examples/hibernate7/issue-698-domain-save-npe/build.gradle b/grails-test-examples/hibernate7/issue-698-domain-save-npe/build.gradle
index 8281c58ce0..5d0e9afa06 100644
--- a/grails-test-examples/hibernate7/issue-698-domain-save-npe/build.gradle
+++ b/grails-test-examples/hibernate7/issue-698-domain-save-npe/build.gradle
@@ -32,11 +32,10 @@ dependencies {
 
     implementation 'org.apache.grails:grails-dependencies-starter-web'
     implementation 'com.h2database:h2'
-    if(System.getenv('SITEMESH3_TESTING_ENABLED') == 'true') {
-        implementation 'org.apache.grails:grails-sitemesh3'
-    }
-    else {
+    if (System.getenv('SITEMESH2_TESTING_ENABLED') == 'true') {
         implementation 'org.apache.grails:grails-layout'
+    } else {
+        implementation 'org.apache.grails:grails-sitemesh3'
     }
 
     implementation 'org.apache.grails:grails-data-hibernate7'
diff --git a/grails-test-examples/hibernate7/issue-698-domain-save-npe/grails-app/conf/application.yml b/grails-test-examples/hibernate7/issue-698-domain-save-npe/grails-app/conf/application.yml
index 0af3ad83f2..908a3e402c 100644
--- a/grails-test-examples/hibernate7/issue-698-domain-save-npe/grails-app/conf/application.yml
+++ b/grails-test-examples/hibernate7/issue-698-domain-save-npe/grails-app/conf/application.yml
@@ -97,3 +97,9 @@ environments:
                 testOnReturn: false
                 jdbcInterceptors: ConnectionState
                 defaultTransactionIsolation: 2 # TRANSACTION_READ_COMMITTED
+
+---
+grails:
+    gorm:
+        default:
+            nullable: false
diff --git a/grails-test-examples/hibernate7/scaffolding-fields/build.gradle b/grails-test-examples/hibernate7/scaffolding-fields/build.gradle
index 295fdd9552..f4481ea37b 100644
--- a/grails-test-examples/hibernate7/scaffolding-fields/build.gradle
+++ b/grails-test-examples/hibernate7/scaffolding-fields/build.gradle
@@ -35,7 +35,6 @@ dependencies {
 
     implementation 'org.apache.grails:grails-dependencies-starter-web'
     implementation 'com.h2database:h2'
-    implementation 'org.apache.grails:grails-layout'
     implementation 'org.apache.grails:grails-data-hibernate7'
     implementation 'org.apache.grails:grails-scaffolding'
     implementation 'org.apache.grails:grails-fields'
diff --git a/grails-test-examples/hibernate7/scaffolding-fields/grails-app/conf/application.yml b/grails-test-examples/hibernate7/scaffolding-fields/grails-app/conf/application.yml
index 033d3e5aee..87cf275d46 100644
--- a/grails-test-examples/hibernate7/scaffolding-fields/grails-app/conf/application.yml
+++ b/grails-test-examples/hibernate7/scaffolding-fields/grails-app/conf/application.yml
@@ -78,3 +78,9 @@ environments:
         dataSource:
             dbCreate: update
             url: jdbc:h2:./scaffoldingFieldsProdDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
+
+---
+grails:
+    gorm:
+        default:
+            nullable: false