Grayl abuses the term "domain" slightly. Grails domain classes are persistent classes, regardless of whether they are persistent with Hibernate or NoSQL, or both. If you want to manage things yourself, put them in src / groovy.
If you want to use NoSQL, consider using one of the plugins, for example. mongodb or redis-gorm. If the NoSQL plugin is the only platinum plugin installed (i.e. you have uninstalled the Hibernate plugin), then the domain class in grails-app / domain will use this plugin. If you still have the Hibernate plugin installed, the default domain class will be the Hibernate domain class, but you can specify that it is a NoSQL domain class with the mapWith property, for example. static mapWith = "mongo" . This is described in the plugin docs.
You probably do not want to remove the domain plugin - I do not think that you have any benefit, and most likely it will break important functions.
source share