add delete-orphan to Vendor.contacts relationship

(cherry picked from commit 3fd6c9212e)
This commit is contained in:
Lance Edgar 2012-09-18 10:34:28 -07:00
parent affd0acf4c
commit ad9777adb6

View file

@ -641,7 +641,8 @@ class Vendor(Base):
contacts = relationship(VendorContact, backref='vendor', contacts = relationship(VendorContact, backref='vendor',
collection_class=ordering_list('preference', count_from=1), 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): def __repr__(self):
return "<Vendor: %s>" % self.name return "<Vendor: %s>" % self.name