Re: [sqlalchemy] Implementing historical tables

2018-01-31 Thread Martin Marrese
Hi Stanislav, Perhaps a way to avoid using `save` and `add_new` custom methods is to rely on listeners, perhaps `after_update` and `after_insert` will let you create historical records in some place else. A couple of years ago I achieved this with SQLAlchemy Continuum (1), but I'm not sure in whi

Re: [sqlalchemy] Domain models and "leaky abstractions"

2015-11-13 Thread Martin Marrese
On Fri, Nov 13, 2015 at 9:57 AM, Yegor Roganov wrote: > Simon, thanks for your reply. > > As I said, I'm not sure that this can be solved on the ORM-level, rather > I'm interested in how others solve similar issues. In a small project it's > possible to remember what each method is doing internal

[sqlalchemy] ORM Instance field validation

2014-12-09 Thread Martin Marrese
Hi, I have been doing some tests to solve a requirement given in where an object must check some of the values on its attributes before an insert or an update gets triggered into the db. Did some tests with validates decorator and because some of the fields require other fields to be set before,