Re: [sqlalchemy] Re: Retrieving Objects from DB

2016-12-16 Thread 'Simon Dold' via sqlalchemy
Nice,I feel really stupid now but thank you very much, will verify this later. Best, Simon.. Am 16.12.2016 6:42 nachm. schrieb "Jonathan Vanasco" : > > > On Friday, December 16, 2016 at 12:14:11 PM UTC-5, Simon Moon wrote: >> >> >> It seems m is not a Machine object. I

[sqlalchemy] Re: Retrieving Objects from DB

2016-12-16 Thread Jonathan Vanasco
On Friday, December 16, 2016 at 12:14:11 PM UTC-5, Simon Moon wrote: > > > It seems m is not a Machine object. I think it should be clear what I want > to do, but I can't figure what the > SQLAlchemy way would be to do it > replace this: m = session.query(Machine.name).filter(...

[sqlalchemy] Re: Retrieving Objects from DB

2016-12-16 Thread 'Simon Moon' via sqlalchemy
class Machine(Base): __tablename__='machine' id = Column(Integer, primary_key=True) name = Column(String(250), nullable=False) comment= Column(String(250)) tags = Column(String(250), nullable=True) class GeneralMeasurementData(Base):