-->
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.  [ 2 posts ] 
Author Message
 Post subject: collection of interface opbject
PostPosted: Fri Mar 05, 2010 3:37 am 
Newbie

Joined: Fri Mar 05, 2010 3:29 am
Posts: 3
Hallo

How can i map a one-many relationship where the set is a collection of different objects each implementing a common interface. each implementaion of the inteface maps to a different table.

for example.

parent object : Person
common interface : ContactDetail

subclass : Address, email, PhoneNumber e.t.c;

Assitance will be greatly appreciated.


Top
 Profile  
 
 Post subject: Re: collection of interface opbject
PostPosted: Fri Mar 05, 2010 4:15 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
I believe that it don't works if you define ContactDetail as java interface.
It should indeed work if you define ContactDetail as persistent (abstract) superclass of Address, email, PhoneNumber e.t.c.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.