title: Flask-SQLAlchemy: How to return a list of single objects after performing a join operation?
body: <p>I have two tables Users and Organization.</p>
  
  <p>I have the following SQL mapped classes:</p>
  
  <pre><code>class User(db.Model):
      __tablename__ = 'user'
      id = db.Column('id', db.Integer, primary_key=True)
      first_name = db.Column('first_name', db.String)
      second_name = db.Column('second_name', db.String)
      last_name = db.Column('last_name', db.String)
      # organization_id = db.Column('organization_id', db.Integer)
      organization_id = db.Column('organization_id',db.Integer,db.ForeignKey('organization.id'),nullable=False)
      # organization = db.relationship('Organization',backref='user',lazy=False)
      email = db.Column('email', db.String)
      mobile_no = db.Column('mobile_no', db.String)
      designation = db.Column('designation', db.String)
      role_id = db.Column('role_id', db.Integer)
      password = db.Column('password', db.String)
  
  class Organization(db.Model):
      __tablename__ = 'organization'
      id = db.Column('id',db.Integer,primary_key=True)
      name = db.Column('name',db.String)
      type_id = db.Column('type_id',db.Integer)
      ward_id = db.Column('ward_id',db.Integer)
      attrs = ['id','name','type_id','ward_id']
      user_organization = db.relationship('User',backref='organization',lazy=False)
  </code></pre>
  
  <p>I want to perform a join operation on User.onrganization_id and Organization.id with the results looking like this</p>
  
  <p>user.id | user.first_name  organization.name | user.email | user.mobile_no </p>
  
  <p>I tried this code:</p>
  
  <pre><code>q = db.session.query(User,Organization).join(Organization).all()
  </code></pre>
  
  <p>This give me a result as list with collection of object: </p>
  
  <pre><code>[(&lt;User 2&gt;, &lt;Organization 1&gt;)]
  </code></pre>
  
  <p>I want the return type to be a list of single object and not a collection of objects. Like this</p>
  
  <pre><code>[(&lt;UsersAndOrganization1&gt;)] //Name of the object doesn't have to be the same
  </code></pre>