We have a plugin that gives us an Abstract class called PaymentAbstract
It looks like this.
abstract class PaymentAbstract implements Serializable {
static mapping = {
tablePerHierarchy false // avoid creating the base_domain table
tablePerConcreteClass true
token defaultValue: "-1"
...
}
String token
Date authDate
...
}
In our apps we create a Payment that extends the abstract class like this.
class Payment extends PaymentAbstract {
String foo
...
}
A problem arises when we want to add a mapping formula.
class Payment extends PaymentAbstract {
static mapping = {
bar formula: "..."
...
}
String token
Date authDate
...
}
But this overwrites the original mapping and we lose a lot of details on the payment.
Is there any way to merge both of these static mappings?