Regular |
|
Joined: Mon Sep 20, 2004 8:42 am Posts: 58 Location: Boston, US
|
Hibernate version: 2.1.6
I have a Users table and a Company table. The Company table has a 'type' field. 0 - Buyer Company, 1- Seller Company.
The user table has a FK relation to the company table. I'd like to model the relationship such that users belonging to a Buyer company get mapped to a BuyerUser class and those belonging to a Seller company get mapped to a SellerUser (In may case a user can only belong to a buyer or seller company).
I'd like to map users to a specific subclass so that my API's can clearly have a BuyerUser or SellerUser in the parameter list.
Is this possible to map in Hibernate?
Thanks, Sanjiv
|
|