« Return to Thread: No Hibernate Session bound to thread
Brad Booth wrote: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@gmail.com> 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: []
> --
> View this message in context:
> http://www.nabble.com/No-Hibernate-Session-bound-to-thread-tp24169249p24176403.html
> Sent from the grails - dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
« Return to Thread: No Hibernate Session bound to thread
| Free embeddable forum powered by Nabble | Forum Help |