[sqlalchemy] composite secondary join variant

2020-04-23 Thread Jonathan Vanasco
i'm stuck on a variant of the Composite Secondary Join ( https://docs.sqlalchemy.org/en/13/orm/join_conditions.html#composite-secondary-joins ) I hope someone can see what my tired eyes are missing. I'm fairly certain the issue is in `secondary' and 'secondaryjoin'. I've tried a handful of

Re: [sqlalchemy] debugging DetachedInstanceError

2020-04-23 Thread Jonathan Vanasco
On Thursday, April 23, 2020 at 10:17:12 AM UTC-4, Mike Bayer wrote: > > Using the event hook is likely the most direct way to see where it's > happening, either via logging or pdb: > > >

Re: [sqlalchemy] debugging DetachedInstanceError

2020-04-23 Thread Mike Bayer
also the item can be detached if it was deleted in a previous flush On Wed, Apr 22, 2020, at 8:57 PM, Jonathan Vanasco wrote: > I'm trying to figure out how I got a DetatchedInstanceError > > > DetachedInstanceError: Parent instance is > not bound to a Session; lazy load operation of

Re: [sqlalchemy] debugging DetachedInstanceError

2020-04-23 Thread Mike Bayer
Using the event hook is likely the most direct way to see where it's happening, either via logging or pdb: https://docs.sqlalchemy.org/en/13/orm/events.html?highlight=persistent_to_detached#sqlalchemy.orm.events.SessionEvents.persistent_to_detached On Wed, Apr 22, 2020, at 8:57 PM, Jonathan