Displaying 1 result from an estimated 1 matches for "my_table_id".
2008 Mar 21
5
foreign key question
Hi-
Say I have a db with following schema:
MyTable:
Id, name, user_id, date
User:
id, name, description
I know that I want to add "belongs_to" in my "user" model but how can
I enforce a proper constraint on the user_id in "MyTable"? Is this
done using a has_one in the "MyTable" model?
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You