MrCromeDome has asked for the wisdom of the Perl Monks concerning the following question:
In my side-project, every one of my child tables is connected to its parent table by a single ID value. Unfortunately, I am not so lucky with my projects at work. To elaborate, our database tracks information about taxable property, and it tracks it by year. So our master table looks something like this:
parcel_number and parcel_year makes up the primary key for this table.parcel_year ------------- parcel_number parcel_year ...
Our child tables then look like this:
where parcel_number and parcel_year is a foreign key to our parcel_year table.site_address ------------ parcel_number parcel_year site_id ...
I've been over the POD for Class::DBI, super-searched the archives, and Googled for a while, but I haven't been able to find (or extrapolate what I need from what I've read) how to make Class::DBI's has_a() function inflate two columns to a single object. Has anyone done this? Is it possible? If so, how is it done?
Before someone offers the suggestion, it is not at all feasible to change the structure of the tables. It's been a consideration for future versions of our product, but it is simply not feasible or an option at this time.
Thanks for whatever help you can offer! :)
MrCromeDome
|
---|