-->
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: How to map 2 classes through multiple tables
PostPosted: Thu Oct 08, 2009 2:44 pm 
Newbie

Joined: Tue Sep 29, 2009 2:22 pm
Posts: 2
Here is a partial of my database:

Image

What I need to map is for each Software (suppadmin_software), I need the available Pricing Metrics (suppadmin_pm). So basically, inside of the Software class, I need a list of Pricing Metrics that are associated with that software.

Here is how the foreign keys work to get there (if I could change this, I would and problem would be solved, but this is an existing data structure):

  • Start from the suppadmin_software_pm_mapping table
    • pm_id contains the id in suppadmin_pm (this gets the Pricing Metric)
    • software_id contains the id in suppadmin_offering_suppadmin_software (I know, you would think it would be the id in suppadmin_software, but it's not)
  • Now that we have the id for suppadmin_offering_suppadmin_software
    • software_id contains the id in suppadmin_software (this gets the Software)

I have been pulling my hair out for about a week now trying to get this to work and I am at a total loss. Any help is greatly appreciated.

Thanks,
Jared


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.