Where should Grails Command objects be placed in the project structure?

ben*_*rre 10 grails groovy command-objects

I have a class called LoginCommand in domain/my/package/name

class LoginCommand {

    String emailAddress
    String password

}
Run Code Online (Sandbox Code Playgroud)

My question is why is a table be auto generated in my database for a***Command object in grails? Are these command objects supposed to be placed ouside of /domain to avoid auto generation of a table by hibernate/orm.

ata*_*lor 11

他们不应该进去grails-app/domain; 它们不是域类.把它们放进去src/groovy.或者,常见的约定是将命令类放在与使用它的控制器相同的文件中.

查看grails手册中的Convention Over Configuration部分,了解其中的内容.