Re: [sqlalchemy] Re: polymorphic identity after_delete event

2015-09-16 Thread Jakub Bąk
([Directory, Image]).all() And I still only get the filenames without eager loading of Directory children. W dniu wtorek, 15 września 2015 17:17:12 UTC+2 użytkownik Michael Bayer napisał: > > > > On 9/15/15 10:09 AM, Jakub Bąk wrote: > > I used before_delete and after_commit

Re: [sqlalchemy] Re: polymorphic identity after_delete event

2015-09-15 Thread Jakub Bąk
to that problem Michael? W dniu wtorek, 25 sierpnia 2015 17:16:16 UTC+2 użytkownik Michael Bayer napisał: > > > > On 8/25/15 10:05 AM, Jakub Bąk wrote: > > I just came across a solution to this problem. Adding 'with_polymorphic': > '*' to __mapper_args__ on the Node model w

Re: [sqlalchemy] Re: polymorphic identity after_delete event

2015-08-27 Thread Jakub Bąk
Those are some great ideas. I will try them out. Thanks Michael! W dniu wtorek, 25 sierpnia 2015 17:16:16 UTC+2 użytkownik Michael Bayer napisał: On 8/25/15 10:05 AM, Jakub Bąk wrote: I just came across a solution to this problem. Adding 'with_polymorphic': '*' to __mapper_args__

[sqlalchemy] Re: polymorphic identity after_delete event

2015-08-25 Thread Jakub Bąk
I just came across a solution to this problem. Adding 'with_polymorphic': '*' to __mapper_args__ on the Node model was enough. class Node(db.Model): id = db.Column(db.Integer, primary_key=True) type = db.Column(db.String(20)) name = db.Column(db.String(30), nullable=False) date_added

[sqlalchemy] polymorphic identity after_delete event

2015-08-25 Thread Jakub Bąk
Hello! I'm new to this group and I have a question. This is my model: class Node(db.Model): id = db.Column(db.Integer, primary_key=True) type = db.Column(db.String(20)) name = db.Column(db.String(30), nullable=False) date_added = db.Column(db.DateTime, default=datetime.now())