Chapter 3. Modeling the domain

This chapter covers

  • What GORM is and how it works
  • 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 explore Grails’s support for the data model portion of your applications (getting stuff into the database and querying to get it back), and if you’re worried we’ll dig deep into complex outer joins, you’ll be pleasantly surprised how straightforward Grails makes data access. We won’t write a line of SQL, and you won’t find any Hibernate XML mappings here either. We’ll take full advantage of the convention over configuration paradigm we introduced in chapter 1, which means less time configuring and more time ...

Get Grails in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.