Re: [sqlalchemy] Temporarily disable/intercept ORM events on mutation

2023-09-15 Thread Mike Bayer
On Fri, Sep 15, 2023, at 8:59 PM, Mike Bayer wrote: > > unfortunately no, that's a backref event handler, that's within the class > instrumentation and has no mechanism to be disabled on a per-class basis, not > to mention the backref handler is not the only aspect of things that expects > a

Re: [sqlalchemy] Temporarily disable/intercept ORM events on mutation

2023-09-15 Thread Mike Bayer
On Fri, Sep 15, 2023, at 4:28 PM, 'Luna Lucadou' via sqlalchemy wrote: > When customers call our JSON:API API, they can use an "include" parameter to > specify related objects to be appended to the response. > > However, requests to include are not always satisfiable (e.g. if > job.supervisor=

[sqlalchemy] Temporarily disable/intercept ORM events on mutation

2023-09-15 Thread 'Luna Lucadou' via sqlalchemy
When customers call our JSON:API API, they can use an "include" parameter to specify related objects to be appended to the response. However, requests to include are not always satisfiable (e.g. if job.supervisor=null, include=supervisor is ignored). In order to prevent Marshmallow from trying t