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
For example, say I have a model with a reverse relationship to another model. In order to access that related model i would have to select_related(...) or directly load the related model via await some_model.some_related_model.load(). Once that related_model is loaded its no longer a weakref. (perhaps im using the wrong term here to describe a related model pre/post load)
in any case, is there a way to determine that the related_model has not been loaded yet? im aware i could look for fields of that model that are not available pre-load and determine that way, but im looking for a more general approach to determining this.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
For example, say I have a model with a reverse relationship to another model. In order to access that related model i would have to
select_related(...)
or directly load the related model viaawait some_model.some_related_model.load()
. Once that related_model is loaded its no longer aweakref
. (perhaps im using the wrong term here to describe a related model pre/post load)in any case, is there a way to determine that the related_model has not been loaded yet? im aware i could look for fields of that model that are not available pre-load and determine that way, but im looking for a more general approach to determining this.
Beta Was this translation helpful? Give feedback.
All reactions