Changeset - ad9777adb662
[Not reviewed]
0 1 0
Lance Edgar (lance) - 12 years ago 2012-09-18 13:10:14
lance@edbob.org
add delete-orphan to Vendor.contacts relationship
(cherry picked from commit 3fd6c9212e62b8bdda17572cbad1df1541872cf2)
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rattail/db/extension/model.py
Show inline comments
 
@@ -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
0 comments (0 inline, 0 general)