Skip to content

Instantly share code, notes, and snippets.

@gokhanakgul
Last active January 2, 2016 06:09
Show Gist options
  • Save gokhanakgul/8261890 to your computer and use it in GitHub Desktop.
Save gokhanakgul/8261890 to your computer and use it in GitHub Desktop.
private void saveDomainClassProperties(String domainClassName, Map newProperties) {
log.info "domainClass : $domainClassName"
def domainClassInstance = grailsApplication.getDomainClass(domainClassName).newInstance()
domainClassInstance.properties = newProperties
domainClassInstance.save(flush: true)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment