I have a hierarchy of objects define as follows:
class Request {
RequestType type
}
class CableRequest extends Request {
RequestType type = RequestType.Cable
}
Hibernate complains with:
java.lang.RuntimeException: duplicate method: getType
What is the right way to preset defaults (or override fields) in the inherited classes?
Update:
So apparently this works fine if the property is marked as Transient… Is there another way to set these the Groovy way without overriding getters?
Try this: