@Override
	public List<Ingredient> getChildrenIngredients(Ingredient c) {
		try (Connection connection = DriverManager.getConnection(connectionString)) {
			List<Ingredient> children = new ArrayList<Ingredient>();
			PreparedStatement statement = connection.prepareStatement("select id,name from ingredient, parent where ingredient.id = parent.idIngredient and parent.idParent= ?");
			statement.setInt(1, c.getIngredientId());
			ResultSet rs = statement.executeQuery();
			while (rs.next()) {
				int id = rs.getInt("id");
				String name = rs.getString("name");
				Ingredient child = new Ingredient(id, name);
				PreparedStatement statement2 = connection.prepareStatement("select idParent from parent where idIngredient = ?");
				statement2.setInt(1, id);
				ResultSet rs2 = statement2.executeQuery();
				while (rs2.next()) {
					int idParent = rs2.getInt("idParent");
					child.addParent(idParent);
				}
				children.add(child);
			}
			connection.close();
			return children;
		} catch (SQLException ex) {
			ex.printStackTrace();
			return null;
		}
	}