Hey there!
I'm having a little problem setting up my webshop project. Thing is, I have a User() superclass and two subclasses, PrivateUser and BusinessUser.
Now, I'm not quite sure how to get my head around storing this relationship via hibernate.
For the purpose of this question, the User() class contains only one field:
String address;
the PrivateUser contains:
String firstName;
and the BusinessUser contains:
String CompanyName;
Each field has its getter and setter. As is right now, I would only store and be able to get firstName and companyName. When I fetch a user from my DB using Hibernate I would get a PrivateUser/BusinessUser with a null address.
Bottom line is, could someone point me towards a useful tutorial or better yet show a similar example code?
Thanks!