I have a method which has domain name as a String parameter.
def modelName="Equity"
I want to use it like
def results=modelName.findAll()
Please guide me!
I have a method which has domain name as a String parameter.
def modelName="Equity"
I want to use it like
def results=modelName.findAll()
Please guide me!
def packageName = 'com.myproject'
def modelName = "Equity"
def domainClass = grailsApplication.classLoader.loadClass("$packageName.$modelName")
def results = domainClass .findAll()