On 10/20/06, Jess Robinson <castaway@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> belongs_to means: a field (or fields) in THIS table is a foreign key
> (contains the primary key of) THAT other table.
>
> has_one means: there is a row in THAT table which contains THIS tables
> primary key.
Thank you for that excellent explanation! I now get it. :-)
And to echo what Matt said, you can always change which columns are
used as the keys using explicit join conditions. The direction was the
important part for me.
Drew
--
----------------------------------------------------------------
Drew Taylor * Web development & consulting
Email: drew@xxxxxxxxxxxxxx * Site implementation & hosting
Web : www.drewtaylor.com * perl/mod_perl/DBI/mysql/postgres
----------------------------------------------------------------
|