hello,
i have database for dynamic website in which i need to store
information about each menu and its relationship with other menu.
it is obvious that each menu can have several submenu but each submenu
must belong to one and ony one menu.
so database goes like this


Pk_Content_id=>integer
title    =>integer, it is name of menu
Image_path=>string, path of image
Content_text=> text contained on click of every menu or description
fK_parent_content_id => integer , THIS LINKS BACK TO pk_content_id ,as
is a foreign key



what i want is to relate pk_content_id and fk_parent_content_id (which
are in same table)

how to accomplish such self refrencing many to one relation???

m extreme beginner in rails please be  more descriptive.

just to mention pk- represents primary key so is unique while fk is
foreign key and is not unique, combinaly forms one to many relation

thanks in advance

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to