Fixes after code review
This commit is contained in:
parent
65d6f8c018
commit
91aa4586e2
@ -317,10 +317,10 @@ supplying the :attr:`reverse_delete_rule` attributes on the
|
|||||||
|
|
||||||
class ProfilePage(Document):
|
class ProfilePage(Document):
|
||||||
...
|
...
|
||||||
profile_page = ReferenceField('Employee', reverse_delete_rule=mongoengine.CASCADE)
|
employee = ReferenceField('Employee', reverse_delete_rule=mongoengine.CASCADE)
|
||||||
|
|
||||||
The declaration in this example means that when an :class:`Employee` object is
|
The declaration in this example means that when an :class:`Employee` object is
|
||||||
removed, the :class:`ProfilePage` that belongs to that employee is removed as
|
removed, the :class:`ProfilePage` that references that employee is removed as
|
||||||
well. If a whole batch of employees is removed, all profile pages that are
|
well. If a whole batch of employees is removed, all profile pages that are
|
||||||
linked are removed as well.
|
linked are removed as well.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user