Chapter 3. Modeling the domain

This chapter covers

  • What GORM is and how it works
  • Defining domain model classes
  • How domain classes are saved and updated
  • Techniques for validating and constraining fields
  • Domain class relationships (1:1, 1:m, m:n)

In this chapter, we’ll explore Grails’ support for the data model portion of your applications, and if you’re worried we’ll be digging deep into outer joins, you’ll be pleasantly surprised. We won’t be writing a line of SQL, and you won’t find any Hibernate XML mappings here either. We’ll be taking full advantage of the Convention over Configuration paradigm, which means less time configuring and more time getting work done.

We’ll be spending most of our time exploring the basics of how Grails persists ...

Get Grails in Action now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.