-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
@CompileStatic
on GormService
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ import org.grails.datastore.gorm.GormEntity | |
|
||
@Artefact("Service") | ||
@ReadOnly | ||
//@CompileStatic | ||
@CompileStatic | ||
class GormService<T extends GormEntity<T>> { | ||
|
||
GormAllOperations<T> resource | ||
|
@@ -46,14 +46,14 @@ class GormService<T extends GormEntity<T>> { | |
if (readOnly) { | ||
return | ||
} | ||
queryForResource(id).delete flush: true | ||
resource.delete(queryForResource(id), [flush: true]) | ||
} | ||
|
||
@Transactional | ||
T save(T instance) { | ||
if (readOnly) { | ||
return instance | ||
} | ||
instance.save flush: true | ||
resource.save(instance, [flush: true]) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
matrei
Author
Contributor
|
||
} | ||
} |
@matrei that doesn't work and broke the build