When designing a new RoR application are there some fundamental database considerations for selecting which table should contain a foreign key column of one-to-one relationship? Say, in my application I have Orders and Invoices. Both belongs_to and has_one methods give me a way to access the other side of association and I know that belongs_to goes into a model that records the foreign key. But is there some line of reasoning for selecting to store order_id in invoices table vs. storing invoice_id in orders table? Does it make much difference?
on 2006-12-30 20:50