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


##########
grails-data-hibernate7/grails-plugin/src/main/groovy/grails/test/hibernate/HibernateSpec.groovy:
##########
@@ -108,8 +214,43 @@ abstract class HibernateSpec extends Specification {
     /**
      * @return The configuration
      */
-    Map getConfiguration() {
-        Collections.singletonMap(Settings.SETTING_DB_CREATE, 'create-drop')
+    Map<String,Object> getConfiguration() {
+        [
+            (Settings.SETTING_DB_CREATE): 'create-drop',
+            'hibernate.proxy_factory_class': 
'org.grails.orm.hibernate.proxy.ByteBuddyGroovyProxyFactory',
+            'hibernate.dialect': 'org.hibernate.dialect.H2Dialect',
+            'jakarta.persistence.validation.mode': 'none'
+        ] as Map<String, Object>
+    }
+
+    @CompileStatic(TypeCheckingMode.SKIP)

Review Comment:
   You were right — I tested it: `getCollector()` compiles fine without 
`TypeCheckingMode.SKIP` under the class-level `@CompileStatic`. The 
method-level SKIP was unnecessary, so I removed it (it now just inherits the 
class default). Verified it compiles and the plugin module tests pass (18/18). 
The SKIP on `setupSpec()` is left in place — that one genuinely needs it for 
the Grails Spring bean-definition DSL, which `@CompileStatic` cannot 
type-check. Resolving.



-- 
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