-->
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 Map
PostPosted: Thu Nov 13, 2003 2:06 pm 
Newbie

Joined: Mon Oct 20, 2003 12:18 pm
Posts: 12
Location: Mexico
I have table A, table B and table C.


table A {
id_col (Primary Key)
}

table B {
asociation (Primary Key)
id_col (Foreign Key)
name
other fields
}

table C {
asociation (Primary Key)
other fields
}

This model was defined by "the architect" and I can't modify it.

In my object model C is a subclass of B.

I like to have a collection map from A (index is id_col and key is name both from table B).
I already know this is supported, however map can contain instances from B and C.

Is it possible this kind of mapping?

I appreciate any suggestions or alternative solutions.

TIA


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 13, 2003 7:56 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Sure, sounds like a standard joined-subclass mapping, together with a standard polymorphic collection. No problem here.


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.