Hi,
I'm looking for a solution for following solution:
1. A class AppUser is inherits from BaseUser:Code:
pubic class BaseUser{
private Long id;
private username;
private passwort;
// [...]
// setter and getter
}
pubic class AppUser extends BaseUser{
private email;
private company;
// [...]
// setter and getter
}
2. It must be possible to load both Objects.Code:
BaseUser baseUser= (BaseUser )session.load(BaseUser .class, id1);
AppUser appUser = (AppUser )session.load(AppUser .class, id1);
Data witch are stored as AppUser can be loaded as BaseUser !!!
3. The data of both Entities are stored in one DB table: ==================================
| id | username | passwort | email | company |
==================================
4. Configuration via AnnotationsAny Ideas ?
Regards
Kai