gorm-hibernate5
gorm-hibernate5 copied to clipboard
Subclass schema mapping with tablePerHierarchy false
When using tablePerHierarchy false, i lost subclass schema mapping and consequently, get this error:
Caused by: org.postgresql.util.PSQLException: ERROR: relation "school_year_regular" does not exist
class SchoolYear {
...
static mapping = {
table schema: 'agis'
discriminator column: "type"
tablePerHierarchy false
}
}
class SchoolYearRegular extends SchoolYear {
...
static mapping = {
table schema: 'agis'
discriminator "Regular"
}
}
Environment Information
grailsVersion=4.0.8 gormVersion=7.0.4 gradleWrapperVersion=5.6.4