Hi All,
I have two tables within same schema which don't have a relationship at all. Say, it's User(ID,loginName,Pasword,etc..) and Customer(ID,country,etc..).
Here, In order to obtain the loginName, pasword, for a customer who have ID 1 we need to look for user who have the ID 1(In the User table). Currently this is done by means of stored procedures. In my case, I need check whether the user is a Cutomer when some one logs in (Also needs to get both details of User and Customer if the User actually is a customer).
So my approach is to have a Customer class extending User class so that I have all the details required for the above mentioned requirement.
However the problem I have a neither a discriminator column nor relationship between tables to do the inheritance mapping.
Skimming through the Hibernate documentation, what I understood is this is not possible under Hibernate. Any suggestions to accomplish this , or more smart solutions [this doesn't mean my approach is smart, :) ] than my approach is highly appreciated.
Thanks and Regards, Knox.
|