The create-domain-class command will create a domain and associated integration test for the given base name.


grails create-domain-class book


Creates a domain class for the given base name. For example for a base name "book" a domain class called Book will be created in the grails-app/domain directory.

A domain class represents the core model behind in your application and is typically mapped onto database tables. For more information on domain models in Grails refer to the chapter on GORM in the user guide.

Note that this command is merely for convenience and you can also create domain classes in your favourite text editor or IDE if you choose.


grails create-domain-class [name]

Fired Events: