Search code examples
grailsscaffold

Grails generating scaffold for another domain


Grails Version: 3.2.7
Groovy Version: 2.4.7
JVM Version: 1.8.0_111

I created 2 controllers and 2 domains

First domain:

package beermembers

class First {
String first
    static constraints = {
    }
}

Seconf domain:

package beermembers

class Second {
String second
    static constraints = {
    }
}

First controller:

package beermembers

class FirstController {
    static scaffold = First
    def index() {
    }
}

Second controller

package beermembers

class SecondController {
    static scaffold = Second
    def index() {
    }
}

I'm starting application and thought that will be

http://localhost:8080/first/index with CRUD for First domain

http://localhost:8080/second/index with CRUD for Second domain

but it shows CRUD for First on both urls.

how it looks

Could you explain please why SecondController shows First domain information?


Solution

  • A newer version of the scaffolding plugin was released that is compatible with Grails 3.2.7+

    Use version 3.3.1 of scaffolding.

    Here is the relevant issue https://github.com/grails/grails-core/issues/10520