Hello
I'd like to understand how to turn off a before_compile listener (e.g. soft
delete, to include deleted items).
For example,
I've adapted the example from the docs:
https://docs.sqlalchemy.org/en/13/orm/events.html?highlight=before_compile#sqlalchemy.orm.events.QueryEvents.before_compile
Thanks Mike, the assurance it's the right idea was what I wanted to check.
All sorted much appreciated.
On Sun, 7 Feb 2021, 21:49 Mike Bayer, wrote:
>
>
> On Sat, Feb 6, 2021, at 8:56 AM, Chris Simpson wrote:
>
> After posting, I have arrived at *a* solution (which might be
an.id==PlanRequirements.plan_id)\
.filter(PlanRequirements.subscription==1).all()
Kind regards,
Chris
On Saturday, 6 February 2021 at 13:42:54 UTC Chris Simpson wrote:
> Hello,
>
> I'm trying to convert this working SQL query: (SQLAlchemy models are below)
>
> SELECT COUN
Hello,
I'm trying to convert this working SQL query: (SQLAlchemy models are below)
SELECT COUNT(*)
FROM person
JOIN subscription ON
person.id = subscription.person_id
JOIN plan ON
subscription.sku_uuid = plan.uuid
JOIN plan_requirements ON
plan.id = plan_requirements.plan_id
WHERE plan_requireme