Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.

Commit b6ee975

Browse files
committedSep 13, 2024
fix: Re-enable @CompileStatic on GormService
1 parent 82db572 commit b6ee975

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/main/groovy/grails/plugin/scaffolding/GormService.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import org.grails.datastore.gorm.GormEntity
1010

1111
@Artefact("Service")
1212
@ReadOnly
13-
//@CompileStatic
13+
@CompileStatic
1414
class GormService<T extends GormEntity<T>> {
1515

1616
GormAllOperations<T> resource
@@ -46,14 +46,14 @@ class GormService<T extends GormEntity<T>> {
4646
if (readOnly) {
4747
return
4848
}
49-
queryForResource(id).delete flush: true
49+
resource.delete(queryForResource(id), [flush: true])
5050
}
5151

5252
@Transactional
5353
T save(T instance) {
5454
if (readOnly) {
5555
return instance
5656
}
57-
instance.save flush: true
57+
resource.save(instance, [flush: true])
5858
}
5959
}

0 commit comments

Comments
 (0)