-->
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: Problem Mapping Unique Database Schema
PostPosted: Wed Sep 29, 2004 2:51 pm 
Newbie

Joined: Wed Sep 29, 2004 2:20 pm
Posts: 1
Location: Indianapolis, IN
We have an existing schema that applies the following pattern:

Tables A, B, and C all have a one-to-many relationship to Table X. The data model supports this through two columns on Table X: a generic ENTITY_KEY column, and an ENTITY_TYPE column. The ENTITY_KEY is the foreign key value to the parent table (each has surrogate indentity primary keys), and the ENTITY_TYPE qualifies the parent type (ie 'A', 'B', or 'C'). In the Java code, the Classes A, B, and C have a unidirectional relationship to Class X.

I'm having trouble discovering a way to Map these relationships. From the owned entity's perspective, the owner has a composite key, but the owned entity knows nothing about the TYPE qualifier.

Does anyone have any suggestions on how to map such a thing?

Thanks!


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.