multi-column foreign keys

[prev] [thread] [next] [Date index for 2005/06/18]

From: merlyn (Randal L. Schwartz)
Subject: multi-column foreign keys
Date: 00:45 on 18 Jun 2005
My $client needs them, so I'm enhancing has_a and has_many to Do The
Right Thing with multi-column foreign keys over the next few days.

The code will be submitted to Tony for inclusion in the next CDBI
release.

And yes, I had to resist calling them "Unified Column Foreign Keys",
because the acronym would have been nearly NSFW. :)

The gist is that you can define a virtual column "foo" to
mean "go to that record using foo1, foo2, and foo3 as the mapping
to their primary key".  And has_many should work in reverse.

        -- 
        Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@xxxxxxxxxx.xxx> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

multi-column foreign keys
merlyn (Randal L. Schwartz) 00:45 on 18 Jun 2005

Generated at 16:38 on 28 Jul 2005 by mariachi v0.52