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
If find() gets a keyword argument fields: Iterable[str], resulting model objects should only cache those fields. There are two possibilities for what could happen when an unavailable field gets accessed:
The corresponding value gets fetched. This could however have more implications, as it would mean that __get__ will potentially block / become awaitable depending on the pardigm.
An exception is raised. A new method (which is sync or async, depending on context) is defined that fetches all (or only a subset) of the currently unavailable field values. It could be called something like refresh.
The latter approach is probably both easier to implement and better to use in terms of supporting both sync and async frameworks.
The text was updated successfully, but these errors were encountered:
If
find()
gets a keyword argumentfields: Iterable[str]
, resulting model objects should only cache those fields. There are two possibilities for what could happen when an unavailable field gets accessed:__get__
will potentially block / become awaitable depending on the pardigm.refresh
.The latter approach is probably both easier to implement and better to use in terms of supporting both sync and async frameworks.
The text was updated successfully, but these errors were encountered: