When using a proxy model. Using ProxyModel.base_objects.all() will correctly return a QuerySet of base model instances downcasted as proxy model instances.
But using base_objects prints out this deprecation warning:
:1: DeprecationWarning: Using PolymorphicModel.base_objects is deprecated.
Use PolymorphicModelBase.objects.non_polymorphic() instead.
The problem with using a PolymorphicModelBase.objects.non_polymorphic() QuerySet is that it won't downcast its instances to be proxy model instances.
I have proxy models that contain different properties and methods but refer to the same base model. Without .base_objects there is no way to get this type of QuerySet downcasted with proxy model instances.
When using a proxy model. Using
ProxyModel.base_objects.all()will correctly return a QuerySet of base model instances downcasted as proxy model instances.But using
base_objectsprints out this deprecation warning:The problem with using a
PolymorphicModelBase.objects.non_polymorphic()QuerySet is that it won't downcast its instances to be proxy model instances.I have proxy models that contain different properties and methods but refer to the same base model. Without
.base_objectsthere is no way to get this type of QuerySet downcasted with proxy model instances.