This commit is contained in:
parent
caa84189ea
commit
26428e8cb8
@ -8,4 +8,4 @@ class Ingredient(db.Model):
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
name = db.Column(db.String, nullable=False, unique=True)
|
||||
value = db.Column(db.String, nullable=False)
|
||||
items = db.relationship('Meal', secondary=MealIngredient, back_populates='Ingredient')
|
||||
items = db.relationship('Meal', secondary=MealIngredient.__tablename__, back_populates='Ingredient')
|
||||
|
@ -13,4 +13,4 @@ class Meal(db.Model):
|
||||
spicy = db.Column(db.Boolean, nullable=False, default=False)
|
||||
vegan = db.Column(db.Boolean, nullable=False, default=False)
|
||||
glutenfree = db.Column(db.Boolean, nullable=False, default=False)
|
||||
ingredients = db.relationship('Ingredient', secondary=MealIngredient, back_populates='Meal')
|
||||
ingredients = db.relationship('Ingredient', secondary=MealIngredient.__tablename__, back_populates='Meal')
|
||||
|
Loading…
Reference in New Issue
Block a user