def delete_full(id_recipe): for section in SectionDAOimpl.findByRecipe(id_recipe): InstructionDAOimpl.deleteBySection(section.id_sec) SectionDAOimpl.eraseAllMappingBySection(section.id_sec) SectionDAOimpl.deleteById(section.id_sec) for image in ImageDAOImpl.findByRecipe(id_recipe): ImageDAOImpl.deleteById(image.id_img) RecipeDAOimpl.eraseCategoryMapping(id_recipe) RecipeDAOimpl.eraseToolMapping(id_recipe) RecipeDAOimpl.deleteById(id_recipe)
def delete(id_recipe): RecipeDAOimpl.deleteById(id_recipe)