Here is a partial of my database:
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