Given the following class, how would I allow a node to have a many to many relationship with other nodes (such as parent_node and child_nodes)?
class Node
include MongoMapper::Document
key :text, String
end
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Can children have more than one parent? If not, many/belongs_to should work fine:
If nodes can have multiple parents…
Is that what you’re looking for?