OK, I did a little work, and I answered my question :)
In fact, it is as simple as declaring MappedSuperclass as abstract and grails will not create a table for it. I realized re-reading the manual (RTFM basically ... works wonders): "GORM supports inheritance from both abstract base classes and concrete GORM constants." That is, concrete classes are constant, so abstract classes are not. Pays to read more carefully.
eg.
abstract class Auditable { Date dateCreated Date lastUpdated } class Book extends Auditable { String title String description }
Only a book table will be created, and it will have
date_created
and
LAST_UPDATED
the columns. In addition, as an added bonus, the DateCreated and lastUpdated properties are automatically timestamped by Grails.
Hope this helps others.
source share