[sqlalchemy] Move mapped object from one schema's table to another schema's table

2016-11-16 Thread SElsner
Hello, I would like to move (copy and delete) a mapped instance from one database to another database. The table layout is the same on both sides. This is basically for backup purposes, the "other" database is "read only", so I think I don't have to deal with primary key/auto_increment. I have

Re: [sqlalchemy] Configuring a self-referential relationship with cumstom foreign conditions

2015-08-08 Thread SElsner
Aha, thank you, I was quite close and did not think of also adding the remote() to Item.parent_id! On Friday, August 7, 2015 at 11:18:33 PM UTC+2, Michael Bayer wrote: > > > > On 8/7/15 5:05 PM, SElsner wrote: > > Hello, > > > > I am trying to create a de

[sqlalchemy] Configuring a self-referential relationship with cumstom foreign conditions

2015-08-07 Thread SElsner
Hello, I am trying to create a declarative calss, which is self referential and uses a custom primaryjoin condition, involving other columns like a "is_deleted" column: class Item(Base): __tablename__ = "items" uuid = Column(UUID(), primary_key=True) is_deleted = Column(Boolean,