[sqlalchemy] Re: Identical column names in parent and child classes with joined-table inheritance

2009-11-17 Thread bojanb
This does it. One small drawback is that since the field is now defined as an attribute, one can't query on it (ie. session.query (class_).filter_by(modified_by='jack')), but we don't envison such a use case for this funcionality so it's OK for us. Recap of what was done: table columns were

[sqlalchemy] Re: Identical column names in parent and child classes with joined-table inheritance

2009-11-17 Thread Michael Bayer
bojanb wrote: This does it. One small drawback is that since the field is now defined as an attribute, one can't query on it (ie. session.query (class_).filter_by(modified_by='jack')), but we don't envison such a use case for this funcionality so it's OK for us. you get this by using

[sqlalchemy] Re: Identical column names in parent and child classes with joined-table inheritance

2009-11-12 Thread xaotuk
We have tried suggested, but: field 'modified' exists in both parent and child tables, when we redefined property 'modified' in mapper with something like this: mapper(Child, child_table, properties={'modified' = child_table.c.modified, ...}), modified field still returned value from parent's

[sqlalchemy] Re: Identical column names in parent and child classes with joined-table inheritance

2009-11-12 Thread Michael Bayer
xaotuk wrote: We have tried suggested, but: field 'modified' exists in both parent and child tables, when we redefined property 'modified' in mapper with something like this: mapper(Child, child_table, properties={'modified' = child_table.c.modified, ...}), modified field still returned