[sqlalchemy] Re: Reload mapper column definition

2018-03-04 Thread Tolstov Sergey
*Addition:* This is a *relationship* -- 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://stackoverflow.com/help/mcve for a full description. --- Yo

[sqlalchemy] Reload mapper column definition

2018-03-04 Thread Tolstov Sergey
On my project, i use __getattr__ for adding column deifinition to object class Such as: def __getattr__(self,attr): ... my_load_function(...) session.refresh(self) ... return getattr(self,attr) It works, but refresh loses changes on this object. I cannot flush, because i

[sqlalchemy] Re: Dynamically change table name to select from for query

2018-03-04 Thread Stanislav Lobanov
Thank you very much, your answer is very detailed as always. I think that this approach may fit to me, because this tables are read-only, because it is kind of datawarehouse. Thanks! суббота, 3 марта 2018 г., 10:45:45 UTC+3 пользователь Stanislav Lobanov написал: > > Hello! > > I have a databa