[sqlalchemy] possible bug when using schema_translate_map and remapping "None"

2017-02-28 Thread Bertrand Mathieu
Hi, I am using sqlalchemy 1.1.5 with python 3.5 and postgresql (9.4). I have encountered what I think is a bug, it occurs when: * no schema is set in metadata or tables (schema = None) * using schema_translate_map={None: 'other_schema_name'}. It happens when joining an aliased table. Basically,

[sqlalchemy] polymorphic: modification of a column on child doesn't update parent's columns marked "onupdate"

2013-11-08 Thread Bertrand Mathieu
Hi, I have a set up class inheritance using joined table inheritance. I'm using sqlalchemy 0.8.2. The Parent class has a DateTime attribute "updated_at", with onupdate=datetime.utcnow. If I update only one of the Child's attributes, only "child" table is updated, parent.updated_at is not chan

Re: [sqlalchemy] polymorphic: modification of a column on child doesn't update parent's columns marked "onupdate"

2013-11-08 Thread Bertrand Mathieu
something* > *object_session(target).commit()* > > *event.listen(Child, 'after_update', update_child)* > > > If you want the same after an insert or delete, you should declare other > events[1] as well. I think there might be other ways to do that, but I > usual

Re: [sqlalchemy] polymorphic: modification of a column on child doesn't update parent's columns marked "onupdate"

2013-11-08 Thread Bertrand Mathieu
king", lol). If don't, polymorphism will not do that > "automagically", at least IMHO. You can also check if there's a way to make > the whole object dirty :) > > Indeed it's a tricky situation, SA is expected by us to do this (and I > think it may be