diff options
author | Marcin Kuzminski <marcin@python-works.com> | 2012-03-22 02:48:47 +0200 |
---|---|---|
committer | Marcin Kuzminski <marcin@python-works.com> | 2012-03-22 02:48:47 +0200 |
commit | 1889707164132427d88f8990325a66ef20c58c76 (patch) | |
tree | 22911586aa4340cf214f267524dbbf1b27b966f2 | |
parent | f1290022e50ececfd10179be053beb72cd1461b2 (diff) |
Cascade delete comments and notifications when removing user.
--HG--
branch : beta
-rwxr-xr-x | rhodecode/model/db.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/rhodecode/model/db.py b/rhodecode/model/db.py index 30064008..737039b9 100755 --- a/rhodecode/model/db.py +++ b/rhodecode/model/db.py @@ -307,7 +307,11 @@ class User(Base, BaseModel): group_member = relationship('UsersGroupMember', cascade='all') - notifications = relationship('UserNotification',) + notifications = relationship('UserNotification', cascade='all') + # notifications assigned to this user + user_created_notifications = relationship('Notification', cascade='all') + # comments created by this user + user_comments = relationship('ChangesetComment', cascade='all') @hybrid_property def email(self): |