Re: [sqlalchemy] Re: load_only when loading relatinoships from an instance

2023-01-05 Thread 'Tony Cosentini' via sqlalchemy
populate_existing doesn't change the behavior, but expunge_all does. The code works correctly now though - it's just our test setup/teardown that was causing trouble (although it does seem like weird behavior). Thanks again for so much help with such a great library, Tony On Thursday, January

Re: [sqlalchemy] Re: load_only when loading relatinoships from an instance

2023-01-05 Thread Mike Bayer
not as much set-ordering as gc, most likely. add populate_existing to the query, that also should force the lazy loader to take effect On Thu, Jan 5, 2023, at 9:00 AM, Mike Bayer wrote: > the "b" object in question is not really "lazy loaded" in the usual sense > here because it's already

Re: [sqlalchemy] Re: load_only when loading relatinoships from an instance

2023-01-05 Thread Mike Bayer
the "b" object in question is not really "lazy loaded" in the usual sense here because it's already present in the session, that looks like an unexpire query. the delete() might be just changing something where the issue comes down to a set-ordering issue, perhaps. try adding