polymorphic « Component « JPA Q&A





1. polymorphic mapping of components within class    forum.hibernate.org

Hi All, Have a question regarding the mapping of class hierarchy. Let's say (hypothetically) that we have an Owner class that has a reference to a Vehicle interface. There are 3 implementation classes of Vehicle: Car, Truck and Wagon. All information is stored in one table: VehicleReg. So we have the following hibernate mapping: .....

2. Polymorphic components    forum.hibernate.org

Hi, I have the following abstract class IPAddress {...} class IPv4Address extends IPAddress {...} class IPv6Address extends IPAddress {...} then I have class Device { private IPAddress _ip; ... public IPAddress getIPAddress() { ... } ... } and I want to map the IPAddress as a component, is it possible with Hibernate to have inheritance in components. Christophe

3. Is it possible to map polymorphic components    forum.hibernate.org

As I'm still strugling with my problem from thread posted previously I tried to change my strategy. Now I'm trying to create an abstract CustomerName object which would then be implemented as PersonName and CompanyName. As I'm mapping my both customers to the same table (table per class hierarchy strategy) it would be nice to be able to map the names ...

4. CompositeUserType for Polymorphic components?    forum.hibernate.org

5. Polymorphic components? Is it the way to solve this problem?    forum.hibernate.org

Hello, I got a question about a case I meet very frequently and do not know how to map to my db... Can someone help me on this? Suppose that I have a class StudentGroup to which students are registered... A student group might have lectures at weekends or weekdays, and for each of these, they might have lectures at morning ...

6. Polymorphic Components    forum.hibernate.org

I know there has been some interest in polymorphic components. Personally I would find such a feature very compelling because it could be used to elegantly implement the Strategy pattern. Stateful strategy components would be very flexible. I'm a huge fan of the Strategy pattern and use it all the time for static strategies and then map the strategy as a ...