Creating a Domain Class
The heart of a Grails application is its domain model, that is, the set of domain classes and their relationships.
A domain class represents persistent data and, by default, is used to create a table in a database. We’ll talk more about this shortly when we create our first domain class. For creating domain classes, Grails provides a convenience script called (unsurprisingly)[15] create-domain-class.
Just as the domain model is the heart of a Grails application, the TekEvent class will be the heart of the TekDays domain model. TekEvent is the name of the class that we will use to represent an event (or conference or code camp or tech fest). If we were to sit down and put our heads together to come up with a design ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access