I have this doubt for some time, couldn't find any info in my documentation, it's about how Hibernate persists a "generic" set of objects: Suppose we have a class Customer with a Set of Automobile: Set<Automobile> Truck and Motorcicle are generalization of Automobile.
How do hibernate store this set of Automobile if I add Motorcicle and Truck objects on it? How does it work for the many inheritance strategies that Automobile may have? What if Automobile is concrete? I'm getting a WrongClassException when Automobile is concrete and using the joined subclass strategy, trying to persist a set with a single Truck on it.
Sorry for my bad English, Thank you
|