monal86
monal86

Reputation: 463

Call a method from Service in Domain Class Grails 2.2.2

I have a domain class called Test. I want to call a method from its service TestService in the domain class. What is the right way to call in grails 2.2?

Thank you.

Upvotes: 0

Views: 73

Answers (1)

tim_yates
tim_yates

Reputation: 171154

add:

def testService

to the top of your domain class, and call:

testService.method()

Where you want to call it

Upvotes: 1

Related Questions