-->
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.  [ 1 post ] 
Author Message
 Post subject: Discriminator Field in M2M Table
PostPosted: Sat Jul 24, 2010 10:50 am 
Newbie

Joined: Sat Jul 24, 2010 10:39 am
Posts: 1
Hi All,
I have 2 different entities (Contact and Account) which have a M2M relationship with the same entity (Address).
So, in my M2M table, I have 3 fields: AddressId, ObjId, ObjType

Is it possible to define a discriminator field in many-to-many association?

Currently Contact and Account are completely separate tables.
Do I need to create a base table, and define this M2M relationship for this base table,
and then extend Contact and Account classes from this new base table?
Or is there another way to do this?

Thanks,
Onur.


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

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.