[sqlalchemy] Re: ORM: read from view but write into separate table

2018-12-04 Thread Stanislav Lobanov
First of all, thank you for such a detailed answer. Thank you for sharing your experience and continued support. Now i understand that using database views is not the best approach. In the previous project we used an approach with Query objects that were using WHERE statements to filter needed

Re: [sqlalchemy] ORM: read from view but write into separate table

2018-12-04 Thread Mike Bayer
On Tue, Dec 4, 2018 at 7:36 AM Stanislav Lobanov wrote: > > Hello. > > I have a table with schema: > > name: users > fields: id int, name text, start datetime, end datetime > primary key: id, start, end > > This is kind of a historical table, where each row defines separate > "historical version

[sqlalchemy] ORM: read from view but write into separate table

2018-12-04 Thread Stanislav Lobanov
Hello. I have a table with schema: name: users fields: id int, name text, start datetime, end datetime primary key: id, start, end This is kind of a historical table, where each row defines separate "historical version" of an object. There are a single business User entity (model) with possib