When using flask_sqlalchemy the first element in the result set is a model object which messes up the zipping of the column names to the result value. I was wondering if anyone knew how to deal with this. I can still just do db.session.query().select_from(User) but doing User.query causes it to fail.
If anyone else is looking for an answer, I was able to do it by specifying the columns I wanted with User.query.join(Address).with_entities(User.id, User.name, Address.description, User.created_at).
When using flask_sqlalchemy the first element in the result set is a model object which messes up the zipping of the column names to the result value. I was wondering if anyone knew how to deal with this. I can still just do db.session.query().select_from(User) but doing User.query causes it to fail.