I have a class called LoginCommand in domain/my/package/name
class LoginCommand {
String emailAddress
String password
}
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.
They should not go in grails-app/domain
; they are not domain classes. Place them in src/groovy
. Alternatively, a common convention is to put the command class in the same file as the controller that uses it.
Take a look at the Convention Over Configuration section in the grails manual to get an idea of what goes where.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With