I have a Record class as :
class Record {
Date dateCreated
Date lastUpdated
def beforeInsert() {
dateCreated = new Date()
}
def beforeUpdate() {
lastUpdated = new Date()
}
static mapping = { tablePerHierarchy false }
}
And this class is inherited by several other domain classes – for example :
class User extends Record{
String userName
String password
String email
}
My question here is : Is there any way to embedd the columns of Record table into the table which extends it?
You can define
tablePerClassortablePerHierarchystrategies.See documentation here.
So, following, your code you should use: