add delete-orphan to Vendor.contacts relationship
(cherry picked from commit 3fd6c9212e
)
This commit is contained in:
parent
affd0acf4c
commit
ad9777adb6
|
@ -641,7 +641,8 @@ class Vendor(Base):
|
|||
|
||||
contacts = relationship(VendorContact, backref='vendor',
|
||||
collection_class=ordering_list('preference', count_from=1),
|
||||
order_by=VendorContact.preference)
|
||||
order_by=VendorContact.preference,
|
||||
cascade='save-update, merge, delete, delete-orphan')
|
||||
|
||||
def __repr__(self):
|
||||
return "<Vendor: %s>" % self.name
|
||||
|
|
Loading…
Reference in a new issue