From b960377e92f336d648b252af7fedbfa0f21a1381 Mon Sep 17 00:00:00 2001 From: Scott Murphy Heiberg Date: Fri, 13 Sep 2024 17:51:13 -0700 Subject: [PATCH 1/2] Static compilation fix --- src/main/groovy/grails/plugin/scaffolding/GormService.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/groovy/grails/plugin/scaffolding/GormService.groovy b/src/main/groovy/grails/plugin/scaffolding/GormService.groovy index 714c9aa..d13d10b 100644 --- a/src/main/groovy/grails/plugin/scaffolding/GormService.groovy +++ b/src/main/groovy/grails/plugin/scaffolding/GormService.groovy @@ -7,6 +7,7 @@ import grails.gorm.transactions.Transactional import grails.util.GrailsNameUtils import groovy.transform.CompileStatic import org.grails.datastore.gorm.GormEntity +import org.grails.datastore.gorm.GormEntityApi @Artefact("Service") @ReadOnly @@ -54,6 +55,6 @@ class GormService> { if (readOnly) { return instance } - instance.save flush: true + (T) ((GormEntityApi) instance).save(flush: true) } } \ No newline at end of file From 3900cb35c0f1ef9ab717a198585f74c2ba2ea0dc Mon Sep 17 00:00:00 2001 From: Scott Murphy Heiberg Date: Fri, 13 Sep 2024 17:53:31 -0700 Subject: [PATCH 2/2] Static compilation fix for delete --- src/main/groovy/grails/plugin/scaffolding/GormService.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/groovy/grails/plugin/scaffolding/GormService.groovy b/src/main/groovy/grails/plugin/scaffolding/GormService.groovy index d13d10b..75c78d8 100644 --- a/src/main/groovy/grails/plugin/scaffolding/GormService.groovy +++ b/src/main/groovy/grails/plugin/scaffolding/GormService.groovy @@ -47,7 +47,7 @@ class GormService> { if (readOnly) { return } - queryForResource(id).delete flush: true + ((GormEntityApi) queryForResource(id)).delete flush: true } @Transactional