title: Update relations of one to many
body: <pre><code>class User(UserMixin, db.Model):
      id = db.Column(db.Integer, primary_key=True)
      logs = db.relationship("Logs", uselist=False, backref="user")
  
  class Logs(db.Model):
      id = db.Column(db.Integer, primary_key=True)
      user_id = db.Column(db.Integer, db.ForeignKey('users_user.id'))
      ...
  </code></pre>
  
  <hr>
  
  <p>Both ways will work. Basically my question is about the preferable and why. I am talking about this because in my current work i am using always the second option, and i need to decide if is needed to refactor to make the code like the first example.</p>
  
  <hr>
  
  <pre><code>logs = Logs()
  logs.user = current_user._get_current_object()
  </code></pre>
  
  <hr>
  
  <pre><code>logs = Logs()
  logs.user_id = current_user.get_id()
  </code></pre>