Hi,
I have a question related with annotations and polymorphism where the superclasses has no annotations at all. I would like to extend to existent classes (not persistent) with persistent subclasses (with annotations). Let's imagine this situation:
I have two superclasses, one of those uses the other
Code:
public class Driver {
}
public class Car {
public Driver getDriver() {}
}
I would like to create to extend those two classes with persistent ones, let's say
Code:
@Entity
...
public class PersistentDriver extends Driver {
}
@Entity
public class PersistentCar extends Car {
// THIS SHOULD RETURN A PERSISTENT DRIVER
public Driver getDriver(){}
}
But, when registering the annotated classes in the
Code:
AnnotationConfiguration
, I get the exception
Code:
Could not determine type for: Driver
...
So, it is possible to subclass from classes that have not annotated attributes? Is there a way to return the Driver by using the PersistentDriver class?
Thanks in anticipation,
Bruno