jdaugherty commented on code in PR #15568:
URL: https://github.com/apache/grails-core/pull/15568#discussion_r3254926710


##########
grails-data-hibernate5/core/src/test/groovy/grails/gorm/specs/HibernateGormDatastoreSpec.groovy:
##########
@@ -0,0 +1,158 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    https://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package grails.gorm.specs
+
+import org.apache.grails.data.hibernate5.core.GrailsDataHibernate5TckManager
+import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
+import org.grails.datastore.mapping.model.PersistentEntity
+import org.grails.orm.hibernate.AbstractHibernateSession
+import org.grails.orm.hibernate.HibernateDatastore
+import org.grails.orm.hibernate.cfg.GrailsDomainBinder
+import org.grails.orm.hibernate.cfg.HibernateMappingContext
+import org.grails.orm.hibernate.cfg.HibernatePersistentEntity
+import org.grails.orm.hibernate.query.HibernateQuery
+
+import org.hibernate.boot.MetadataSources
+import org.hibernate.boot.internal.BootstrapContextImpl
+import org.hibernate.boot.internal.InFlightMetadataCollectorImpl
+import org.hibernate.boot.internal.MetadataBuilderImpl
+import org.hibernate.boot.registry.BootstrapServiceRegistry
+import org.hibernate.boot.registry.StandardServiceRegistryBuilder
+import org.hibernate.boot.registry.classloading.spi.ClassLoaderService
+import org.hibernate.dialect.H2Dialect
+import org.hibernate.internal.SessionFactoryImpl
+import org.hibernate.service.spi.ServiceRegistryImplementor
+import org.hibernate.boot.spi.MetadataContributor
+
+/**
+ * The original GormDataStoreSpec destroyed the setup
+ * between tests instead of at the end of all tests
+ * It also wqs default configured for H2 which

Review Comment:
   Fixed — changed 'wqs' to 'was'.
   



##########
grails-data-hibernate5/core/src/test/resources/simplelogger.properties:
##########
@@ -18,5 +18,6 @@
 #
 
 #org.slf4j.simpleLogger.defaultLogLevel=debug
-#org.slf4j.simpleLogger.log.org.hibernate=trace
-#org.slf4j.simpleLogger.log.org.hibernate.SQL=debug
\ No newline at end of file
+org.slf4j.simpleLogger.log.org.hibernate=trace

Review Comment:
   All three lines are already commented out.
   



##########
grails-data-hibernate7/README.md:
##########
@@ -0,0 +1,114 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    https://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->

Review Comment:
   Double header removed — README.md now has a single Apache license header.
   



##########
grails-data-hibernate7/core/build.gradle:
##########
@@ -0,0 +1,159 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    https://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+plugins {
+    id 'groovy'
+    id 'java-library'
+    id 'org.apache.grails.buildsrc.properties'
+    id 'org.apache.grails.buildsrc.dependency-validator'
+    id 'org.apache.grails.buildsrc.compile'
+    id 'org.apache.grails.buildsrc.publish'
+    id 'org.apache.grails.buildsrc.sbom'
+    id 'org.apache.grails.gradle.grails-code-style'
+}
+
+version = projectVersion
+group = 'org.apache.grails.data'
+
+ext {
+    gormApiDocs = true
+    pomTitle = 'Grails GORM Hibernate 7'
+    pomDescription = 'GORM - Grails Data Access Framework - Hibernate 7'
+}
+
+dependencies {
+    // TODO: Clarify and clean up dependencies
+    implementation platform(project(':grails-hibernate7-bom'))
+
+    api 'org.slf4j:slf4j-api'
+
+    api 'org.apache.groovy:groovy'
+    api project(':grails-datamapping-core')
+    api project(':grails-data-hibernate7-spring-orm')
+    api 'org.springframework:spring-orm'
+    compileOnly 'org.springframework:spring-webmvc'
+    compileOnly 'jakarta.servlet:jakarta.servlet-api'
+    implementation "net.bytebuddy:byte-buddy"
+    api 'org.hibernate.orm:hibernate-core', {
+        exclude group:'commons-logging', module:'commons-logging'
+        exclude group:'com.h2database', module:'h2'
+        exclude group:'commons-collections', module:'commons-collections'
+        exclude group:'org.slf4j', module:'jcl-over-slf4j'
+        exclude group:'org.slf4j', module:'slf4j-api'
+        exclude group:'org.slf4j', module:'slf4j-log4j12'
+        exclude group:'xml-apis', module:'xml-apis'
+    }
+    api "org.hibernate.models:hibernate-models"
+    api 'org.hibernate.validator:hibernate-validator', {
+        exclude group:'commons-logging', module:'commons-logging'
+        exclude group:'commons-collections', module:'commons-collections'
+        exclude group:'org.slf4j', module:'slf4j-api'
+    }
+    api 'jakarta.validation:jakarta.validation-api'
+    api 'org.checkerframework:checker-qual'
+
+    api 'io.smallrye:jandex'
+
+    compileOnly 'org.hibernate.orm:hibernate-core'
+    compileOnly 'org.hibernate.orm:hibernate-jcache', {
+        exclude group:'commons-collections', module:'commons-collections'
+        exclude group:'commons-logging', module:'commons-logging'
+        exclude group:'com.h2database', module:'h2'
+        exclude group:'net.sf.ehcache', module:'ehcache'
+        exclude group:'net.sf.ehcache', module:'ehcache-core'
+
+        exclude group:'org.slf4j', module:'jcl-over-slf4j'
+        exclude group:'org.slf4j', module:'slf4j-api'
+        exclude group:'org.slf4j', module:'slf4j-log4j12'
+        exclude group:'xml-apis', module:'xml-apis'
+    }
+
+    testImplementation 'org.testcontainers:testcontainers'
+    testImplementation 'org.postgresql:postgresql'
+    testImplementation 'org.testcontainers:testcontainers-postgresql'
+    testImplementation 'com.mysql:mysql-connector-j'
+    testImplementation 'org.testcontainers:testcontainers-mysql'
+    testImplementation 'org.mariadb.jdbc:mariadb-java-client'
+    testImplementation 'org.testcontainers:testcontainers-mariadb'
+    testImplementation 'com.oracle.database.jdbc:ojdbc11'
+    testImplementation 'org.testcontainers:testcontainers-oracle-free'
+    testImplementation 'org.testcontainers:testcontainers-spock'
+    testImplementation 'org.jsr107.ri:cache-ri-impl'
+
+    testImplementation 'org.objenesis:objenesis'
+
+
+    testImplementation 'com.h2database:h2'
+    testImplementation 'org.junit.platform:junit-platform-suite', {
+        // api: SelectClasses, Suite
+    }
+
+    testImplementation 'org.apache.groovy:groovy-test-junit5'
+    testImplementation 'org.apache.groovy:groovy-sql'
+    testImplementation 'org.apache.groovy:groovy-json'
+    testImplementation 'org.hibernate.orm:hibernate-jcache'
+    testImplementation 'org.spockframework:spock-core'
+    testImplementation "org.hibernate.orm:hibernate-core"
+
+    // groovy proxy fixes bytebuddy to be a bit smarter when it comes to 
groovy metaClass
+    testImplementation 'org.yakworks:hibernate-groovy-proxy', {
+        exclude group: 'org.codehaus.groovy', module: 'groovy'
+        exclude group: 'org.hibernate', module: 'hibernate-core'
+        exclude group: 'org.hibernate.orm', module: 'hibernate-core'
+    }
+
+    testImplementation 'org.apache.tomcat:tomcat-jdbc'
+    testImplementation 'org.spockframework:spock-core'
+
+    testRuntimeOnly 'org.slf4j:slf4j-simple'
+    testRuntimeOnly 'org.slf4j:jcl-over-slf4j'
+    testRuntimeOnly 'org.springframework:spring-aop'
+    testRuntimeOnly 'org.mockito:mockito-inline'
+
+}
+
+sourceSets {
+    test {
+        groovy.srcDirs = ['src/test/groovy']
+    }
+}
+
+apply {
+    from 
rootProject.layout.projectDirectory.file('gradle/hibernate7-test-config.gradle')
+    from 
rootProject.layout.projectDirectory.file('gradle/grails-data-tck-config.gradle')
+    from rootProject.layout.projectDirectory.file('gradle/docs-config.gradle')
+}
+
+// spotbugs {

Review Comment:
   Commented SpotBugs block removed — build.gradle no longer contains the 
commented-out configuration.
   



##########
grails-test-examples/hibernate7/grails-schema-per-tenant/src/test/groovy/schemapertenant/SchemaPerTenantSpec.groovy:
##########
@@ -50,6 +51,9 @@ class SchemaPerTenantSpec extends HibernateSpec implements 
GrailsUnitTest {
         hibernateDatastore.addTenantForSchema("moreBooks")
         hibernateDatastore.addTenantForSchema("evenMoreBooks")
     }
+    def cleanup() {

Review Comment:
   Both addressed — `@RestoreSystemProperties` adopted and blank line added 
before `cleanup()`.
   



##########
grails-test-examples/hibernate7/grails-schema-per-tenant/grails-app/controllers/schemapertenant/BookController.groovy:
##########
@@ -54,8 +49,7 @@ class BookController {
     }
 
     def create() {
-        def book = new Book(params.subMap(bindParams))
-        respond book
+        respond new Book(params)

Review Comment:
   Reverted — `create()` is back to `new Book(params.subMap(bindParams))`, 
binding only the explicitly declared fields.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to