Hi,
what is the proper way to map an interface that has only 1 subclass as is the usual case if you want to use interfaces in your domain model?
For example:
Code:
public interface User
{
// some getters only for instance
}
and the implementation:
Code:
public class UserImpl implements User
{
// getters and setters and member variables
}
I can map only UserImpl, but then I cannot do: "from User" in my queries. Also suppose there is also a UserGroup that contains a Set<User>, then I also have to map both.
I seems like overkill to use the normal mechanisms as joined-subclass or discriminator. I only want 1 table in the database for my Users.
regards,
Wim