Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soft deletion and ReferenceField #10

Open
Janekk opened this issue Mar 23, 2022 · 1 comment
Open

soft deletion and ReferenceField #10

Janekk opened this issue Mar 23, 2022 · 1 comment

Comments

@Janekk
Copy link

Janekk commented Mar 23, 2022

would soft deletion trigger a related data delete if we use a ReferenceField? Example:

class ProfilePage(Document):
    employee = ReferenceField('Employee', reverse_delete_rule=mongoengine.CASCADE)

would deletion of employee also delete the ProfilePage?

@jaesivsm
Copy link
Member

For now mongoengine-softdelete doesn't deal at all with reverse deletion rule. So I would say no.

Best would be to fire up a test and have a working example. I'm gonna see about that.

(also sorry for the answer delay :/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants