Skip to content

Commit

Permalink
GormService accepts an id for delete
Browse files Browse the repository at this point in the history
  • Loading branch information
codeconsole committed Sep 14, 2024
1 parent d4d27b7 commit cdc0cc7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import grails.artefact.Artefact
import grails.gorm.transactions.ReadOnly
import grails.rest.RestfulController
import grails.util.Holders
import org.grails.datastore.gorm.GormEntityApi

@Artefact("Controller")
@ReadOnly
Expand Down Expand Up @@ -38,6 +39,6 @@ class RestfulServiceController<T> extends RestfulController<T> {
}

protected void deleteResource(T resource) {
getService().delete(resource)
getService().delete(((GormEntityApi) resource).ident())
}
}

0 comments on commit cdc0cc7

Please sign in to comment.