use back_populates properly
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
cc8164ef4c
commit
65580173d0
@ -7,3 +7,4 @@ class Ingredient(db.Model):
|
|||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
name = db.Column(db.String(255), nullable=False, unique=True)
|
name = db.Column(db.String(255), nullable=False, unique=True)
|
||||||
meal_id = db.Column(db.Integer, db.ForeignKey('Meal.id'))
|
meal_id = db.Column(db.Integer, db.ForeignKey('Meal.id'))
|
||||||
|
meal = db.relationship('Meal', back_populates='Ingredient', lazy='dynamic')
|
||||||
|
Loading…
Reference in New Issue
Block a user