You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Deleting a user should cascade to the related rows in the tables defined by this module.
Currently, attempting to delete a user marks the foreignkey as null but since nullable=False, an integrity error is raised and the transaction is aborted.
Describe the solution you'd like
Add a backref cascade in appropriate places so that related rows gets deleted nicely. Example:
fromsqlalchemy.ormimportbackrefclassRemoteAccount(db.Model, Timestamp):
# ...user=db.relationship(User, backref=backref('remote_accounts', cascade="all,delete"))
"""SQLAlchemy relationship to user."""
Describe alternatives you've considered
I have to delete from the bottom up i.e. figure out all models keying into User and delete those... ugh
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Deleting a user should cascade to the related rows in the tables defined by this module.
Currently, attempting to delete a user marks the foreignkey as null but since
nullable=False
, an integrity error is raised and the transaction is aborted.Describe the solution you'd like
Add a backref cascade in appropriate places so that related rows gets deleted nicely. Example:
Describe alternatives you've considered
I have to delete from the bottom up i.e. figure out all models keying into User and delete those... ugh
The text was updated successfully, but these errors were encountered: