In grails 4 (grails 3+), we have to mark the domain classes with multi tenant trait and also its respective services and controllers. For eg :
class Book implements MultiTenant<Book> {
String title
}
@CurrentTenant
class BookService {
@WithoutTenant
int countBooks() {
Book.count()
}
}
Is there a configuration for gorm to make everything as multi tenant? My requirement is, based on domain name for eg: abc.com or xyz.com where tenants are abc and xyz i need to switch database but i don't want to go on to annotate each domain class and controllers.