Re: [sqlalchemy] Events and bidirectionnal datas modification

2018-02-08 Thread tonthon
Thanks a lot for this helpfull and precise answer. I'll tend to say "as usual" :). Have a nice day Gaston Le 07/02/2018 à 16:13, Mike Bayer a écrit : > On Wed, Feb 7, 2018 at 7:16 AM, tonthon wrote: >> Hi, >> >> I'd like to setup bidirectionnal data synchornization between the lastname >> attr

[sqlalchemy] Is accessing the ResultProxy like objects a supported feature?

2018-02-08 Thread David Michael Gang
Hi, As explained here: https://stackoverflow.com/a/31275607/2343743 The result set of fetchone can be accessed: row = fetchone() col1 = row[0] # access via integer position col2 = row['col2'] # access via name col3 = row[mytable.c.mycol] # access via Column object. I accessed it like an obj

Re: [sqlalchemy] Is accessing the ResultProxy like objects a supported feature?

2018-02-08 Thread Mike Bayer
On Thu, Feb 8, 2018 at 1:52 PM, David Michael Gang wrote: > Hi, > > As explained here: > https://stackoverflow.com/a/31275607/2343743 > > The result set of fetchone can be accessed: > > row = fetchone() > > col1 = row[0] # access via integer position > > col2 = row['col2'] # access via name > > co

Re: [sqlalchemy] Help resolving Could not determine join condition between parent/child tables on relationship error message

2018-02-08 Thread Jeremy Flowers
> > I reposted this on Stack Overflow - and solved my own question in this > instance with a bit of Google Kung Fu https://stackoverflow.com/questions/48666026/sqlalchemy-could-not-determine-join-condition-between-parent-child-tables-on-re/48672033#48672033 -- usrms

[sqlalchemy] Ways with SQLAlchemy ORM to get back some of the columns for a table

2018-02-08 Thread Jeremy Flowers
I've seen you can do things like this: fields = ['jobmst_type', 'jobmst_name'] print(session.query(Jobmst).options(load_only(*fields)).first()) But according to the documentation, you should be able to do something with Query values()

Re: [sqlalchemy] Ways with SQLAlchemy ORM to get back some of the columns for a table

2018-02-08 Thread Mike Bayer
On Thu, Feb 8, 2018 at 3:29 PM, Jeremy Flowers wrote: > I've seen you can do things like this: > fields = ['jobmst_type', 'jobmst_name'] > print(session.query(Jobmst).options(load_only(*fields)).first()) > > But according to the documentation, you should be able to do something with > Query value

[sqlalchemy] Query a query in SQLAlchemy

2018-02-08 Thread Charles Heizer
Hello, does anyone know if it's possible to query a query result in SQLAlchemy? Thanks! -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stacko