use back_populates properly
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2022-02-13 21:31:37 +01:00
parent cc8164ef4c
commit 65580173d0

View File

@ -7,3 +7,4 @@ class Ingredient(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(255), nullable=False, unique=True)
meal_id = db.Column(db.Integer, db.ForeignKey('Meal.id'))
meal = db.relationship('Meal', back_populates='Ingredient', lazy='dynamic')