You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now I need to filter Family object by persons where info meets certain criteria, like in following query:
select
distinct(f.*)
FROM
families f
join persons p onp.family_id=f.idwherep.info->>'last_name'='Connor'
How can I achieve this with Pony if where clause is optional?
I tried like this:
# filter may be "p.info ->> 'last_name' = 'Connor'" or maybe `None`query=Family.select()
iffilter:
query.filter(lambdaf: pforpinf.personsifraw_sql(filter))
But I get Undefined name f
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
I have following models
Now I need to filter
Family
object bypersons
whereinfo
meets certain criteria, like in following query:How can I achieve this with Pony if where clause is optional?
I tried like this:
But I get
Undefined name f
The text was updated successfully, but these errors were encountered: