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
[REF] util.helpers: introduce new resolve_model_fields_path helper
It is a common occurrence to have models metadata values that use a
"path of fields" approach (e.g. fields depends, domains, server actions,
import/export templates, etc.) and to effectively resolve those with all
the intermediate model+fields references of the path parts, either a
for loop is used in python, issuing multple queries, or a recursive CTE
query that does that resolution entirely within PostgreSQL.
In this commit a new `resolve_model_fields_path` helper is introduced
using a recursive CTE to replace some older code using the python-loop
approach.
An additional `FieldsPathPart` named tuple type is added to represent
information of the resolved part of a fields path, and the helper will
return a list of these for callers to then act upon.
Co-authored-by: Alvaro Fuentes <[email protected]>
0 commit comments