title: Query using variable from url not executing - Flask-SQLAlchemy
body: <p>I have jquery send out a request to the api endpoint. Code below:</p>
  
  <pre><code>$.get("http://localhost:5000/api/update/"+ elm2, function(data){});
  </code></pre>
  
  <p>The endpoint is defined like this:</p>
  
  <pre><code>@app.route('/api/update/&lt;id&gt;', methods=['GET'])
  def check_new_entries(id):
      result = Trades.query.filter_by(id=id).first_or_404()
      new_entries = Trades.query.filter(Trades.time_recorded &gt; result.time_recorded).all()
  </code></pre>
  
  <p>The table being queried from is:</p>
  
  <pre><code>class Trades(db.Model):
      id = db.Column(db.String,default=lambda: str(uuid4().hex), primary_key=True)
      amount = db.Column(db.Integer, unique=False)
      time_recorded = db.Column(db.DateTime, unique=False)
  </code></pre>
  
  <p>The problem:
  Jquery is successfully sending the correct request, with the variable being of type string but when the first query is executed, it fails to return anything. 
  I have a similar endpoint in another application and it works fine.. why is this one an exception? What could be missing? I am sure that the record that I am querying is in the database so it should return it.</p>