title: Issue with many-to-many relationship in Flask-SQLAlchemy
body: <p>I've a strange problem with adding many-to-many relation in Flask app.Everything seems to be ok because when I use the code below in "Python Console" (PeCharm) I see a new relation in my database.</p>
  
  <pre><code>f = CAR.query.filter_by(ID_CAR=1).first()
  m = MANAGER.query.filter_by(ID_MANAGER=1).first()
  f.CAR_MENAGO.append(m)
  db.session.commit()
  </code></pre>
  
  <p>but when I want to do it in Flask app using WTForms, nothing happen, I don't get any error even. Do You know what should I add to this code below ?</p>
  
  <pre><code>@app.route('/test1',methods=['GET', 'POST'])
  @login_required
  def test1():
      form = test()
  
      id_car = form.ID_CAR.data 
  
      f = CAR.query.filter_by(ID_CAR=id_car).first()
      m = MANAGER.query.filter_by(ID_MANAGER=1).first()
  
      if form.validate_on_submit():
          f.CAR_MENAGO.append(m)
          db.session.commit()
          return render_template('test1.html',form=form)
      return render_template('test1.html',form=form)
  </code></pre>
  
  <p>Template code:</p>
  
  <pre><code>{% extends "dashboardmanager.html" %}
  {% import "bootstrap/wtf.html" as wtf %}
  {% block content %}
  
  &lt;div class="container"&gt;
      &lt;form class="form-signin" method="post" action="/test1"&gt;
          {{message}}
          {{ form.hidden_tag() }}
          {{ wtf.form_field(form.ID_CAR) }}
  
            &lt;button class="btn btn-success btn-xsy" type="submit"&gt;Submit&lt;/button&gt;
      &lt;/form&gt;
  
    &lt;/div&gt;
  
  {% endblock %}
  </code></pre>