forked from ScoDoc/DocScoDoc
cascade sur les offres et les contacts
This commit is contained in:
parent
30eb738c25
commit
93d026d2ac
@ -9,8 +9,8 @@ class Entreprise(db.Model):
|
|||||||
codepostal = db.Column(db.Text)
|
codepostal = db.Column(db.Text)
|
||||||
ville = db.Column(db.Text)
|
ville = db.Column(db.Text)
|
||||||
pays = db.Column(db.Text)
|
pays = db.Column(db.Text)
|
||||||
contacts = db.relationship('EntrepriseContact', backref='entreprise', lazy='dynamic')
|
contacts = db.relationship('EntrepriseContact', backref='entreprise', lazy='dynamic', cascade="all, delete-orphan")
|
||||||
offres = db.relationship('EntrepriseOffre', backref='entreprise', lazy='dynamic')
|
offres = db.relationship('EntrepriseOffre', backref='entreprise', lazy='dynamic', cascade="all, delete-orphan")
|
||||||
|
|
||||||
class EntrepriseContact(db.Model):
|
class EntrepriseContact(db.Model):
|
||||||
__tablename__ = "entreprise_contact"
|
__tablename__ = "entreprise_contact"
|
||||||
|
Loading…
Reference in New Issue
Block a user