-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: discriminator field of entity in different table
PostPosted: Sun Oct 03, 2004 12:05 pm 
Regular
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


Top
 Profile  
 
 Post subject: oops
PostPosted: Sun Oct 03, 2004 12:08 pm 
Regular
Regular

Joined: Mon Sep 20, 2004 8:42 am
Posts: 58
Location: Boston, US
Sorry about the entire message being in bold..


Top
 Profile  
 
 Post subject: need the same, did you find a solution?
PostPosted: Tue Jun 13, 2006 5:01 am 
Senior
Senior

Joined: Sun Jun 11, 2006 10:41 am
Posts: 164
need the same, did you find a solution?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.