Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dumpers: implement RelationDumperExt.load(...) #244

Open
slint opened this issue Dec 14, 2020 · 0 comments
Open

dumpers: implement RelationDumperExt.load(...) #244

slint opened this issue Dec 14, 2020 · 0 comments

Comments

@slint
Copy link
Member

slint commented Dec 14, 2020

When loading a record with relations from an ES response, the (partially) dumped relations, should be loaded into their relation record class and be cached (e.g. to avoid accidental DB queries when rendering search results).

This has to be done in the RelationsField (e.g. in RelationResult.__call__), and depending on if the attrs of the field are present in the record data, one can assume that there is no need to resolve the relation ID (i.e. fetch from the DB).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant