The closure should contain the database work that needs to be done. In the example you game "it" will not be your object. What you need to do is something like this...
backgroundService.execute("Whatever comment you like", {
def foo = Foo.get(someId)
foo.bar = "some value"
foo.save()
}
On Tue, Jun 23, 2009 at 4:47 PM, ray211
<raystiegler@...> wrote:
I think I am real close. However, I am still having a problem.
When I try to do my DB write:
backgroundService.execute("DB Write " + count.toString(), {it.save()} )
I get the following error:
Caused by: groovy.lang.MissingMethodException: No signature of method:
static RcdFact.save() is applicable for argument types: () values: []