1:1 embedded relationship:
M:1 linked relationship(one_direction):
child uses belongs_to
parent uses has_many
1:M embedded relationship:
M:1 embedded relationship:
*annotated link
*"1" side has a primary key and typically has no reference to the child within the document
*"M" side will typically host the foreign key
1:1 Linked relationship - has_one:
child belongs_to
parents has_one
M:M Linked Relationship
has_and_belongs_to_many
原文:https://www.cnblogs.com/vixennn/p/10794826.html